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/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 6d6dcb35c9..67eae62c4b 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -58,5 +58,33 @@ branches: - >- google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java branch: 2.30.x + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + extraFiles: + - >- + google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java + branch: 2.39.x + - 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 extraFiles: - google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh new file mode 100644 index 0000000000..92efcf8819 --- /dev/null +++ b/.github/scripts/update_generation_config.sh @@ -0,0 +1,177 @@ +#!/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}") + latest=$(xmllint --xpath 'metadata/versioning/latest/text()' - <<< "${xml_content}") + 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 9ffb25af12..7be7e5e5f1 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,11 +137,88 @@ 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.39.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 + - 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 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b91fa381f5..185101dfe0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,22 +20,806 @@ on: pull_request: name: ci jobs: - units: + units1: runs-on: ubuntu-latest strategy: fail-fast: false matrix: - java: [11, 17, 21] + java: [11, 17, 21, 24] steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: ${{matrix.java}} - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: test + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units2: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units3: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units4: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units5: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units6: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units7: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units8: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units9: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units10: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units11: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units12: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units13: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units14: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units15: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units16: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units17: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units18: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units19: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units20: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units21: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units22: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units23: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units24: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units25: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units26: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units27: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units28: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units29: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units30: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units31: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units32: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units33: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units34: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units35: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units36: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units37: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units38: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units39: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units40: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units41: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units42: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units43: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units44: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units45: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units46: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units47: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units48: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units49: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + units50: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [11, 17, 21, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test units-java8: # Building using Java 17 and run the tests with Java 8 runtime name: "units (8)" @@ -104,7 +888,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..5a97a43802 --- /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.61.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 9794f51093..9d008fd94a 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.32.0 + uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.51.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..a7e14bb483 --- /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_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_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/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index b8016eda9a..bbb1d6468b 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -8,7 +8,7 @@ env_vars: { env_vars: { key: "INTEGRATION_TEST_ARGS" - value: "-P bigtable-emulator-it,bigtable-prod-it,bigtable-prod-batch-it -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: "-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: { diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native-a.cfg similarity index 62% rename from .kokoro/presubmit/graalvm-native.cfg rename to .kokoro/presubmit/graalvm-native-a.cfg index 2e530cba3d..783727ef01 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.32.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.51.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 -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 60% rename from .kokoro/presubmit/graalvm-native-17.cfg rename to .kokoro/presubmit/graalvm-native-b.cfg index 24c9688171..83c7afee07 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.32.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.51.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 -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..3a9bbf8c3a --- /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.51.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/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg index b32d0e2b18..75fe18007c 100644 --- a/.kokoro/presubmit/integration.cfg +++ b/.kokoro/presubmit/integration.cfg @@ -8,7 +8,7 @@ env_vars: { env_vars: { key: "INTEGRATION_TEST_ARGS" - value: "-P bigtable-emulator-it,bigtable-prod-it,bigtable-prod-batch-it -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: "-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: { 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..154ecb6af5 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/api-bigtable @googleapis/api-bigtable-partners", "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 003e895f9c..471d2ef201 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,485 @@ # Changelog +## [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) + + +### Features + +* Support float32, float64, and array type query params ([#2297](https://github.com/googleapis/java-bigtable/issues/2297)) ([a65640e](https://github.com/googleapis/java-bigtable/commit/a65640e285950d02136544bac913b2852cfe0274)) + + +### Bug Fixes + +* Adapt toString tests to introduction of java.time in gax ([93f66a7](https://github.com/googleapis/java-bigtable/commit/93f66a70371f8095fd5c001a977d71e5622be46d)) + + +### Dependencies + +* Update shared dependencies ([93f66a7](https://github.com/googleapis/java-bigtable/commit/93f66a70371f8095fd5c001a977d71e5622be46d)) + +## [2.41.0](https://github.com/googleapis/java-bigtable/compare/v2.40.0...v2.41.0) (2024-07-24) + + +### Features + +* Add MergeToCell to Mutation APIs ([#2279](https://github.com/googleapis/java-bigtable/issues/2279)) ([0ce8a2a](https://github.com/googleapis/java-bigtable/commit/0ce8a2a38703233da58208655f41f6e81e03576e)) +* Add support for MergeToCell API ([#2258](https://github.com/googleapis/java-bigtable/issues/2258)) ([191d15c](https://github.com/googleapis/java-bigtable/commit/191d15c5284dbb702e11669931272877bf05f44e)) +* Add support for new functions ([#2287](https://github.com/googleapis/java-bigtable/issues/2287)) ([dd6583a](https://github.com/googleapis/java-bigtable/commit/dd6583a22504385b7a1f7dc91b3bc3d2500ea0c5)) +* Create new environment variable to toggle directpath scoped to cloud bigtable. ([#2261](https://github.com/googleapis/java-bigtable/issues/2261)) ([9062944](https://github.com/googleapis/java-bigtable/commit/9062944610277eb7ae77f395dc79ce94239c5bee)) +* Implement ExecuteQuery API for SQL support ([#2280](https://github.com/googleapis/java-bigtable/issues/2280)) ([25218e8](https://github.com/googleapis/java-bigtable/commit/25218e8cc46f9a51d4b6515afdb8931e574b0bb1)) + + +### Dependencies + +* Update dependency com.google.truth.extensions:truth-proto-extension to v1.4.4 ([#2282](https://github.com/googleapis/java-bigtable/issues/2282)) ([d00a9e0](https://github.com/googleapis/java-bigtable/commit/d00a9e01b2b329f3bae50f48a15692d87ad0f3bf)) + ## [2.40.0](https://github.com/googleapis/java-bigtable/compare/v2.39.5...v2.40.0) (2024-06-28) 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 4d6e81feb8..f0632fb704 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.50.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.39.5 + 2.50.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.42.0') +implementation platform('com.google.cloud:libraries-bom:26.65.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.39.5' +implementation 'com.google.cloud:google-cloud-bigtable:2.65.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.39.5" +libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.65.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) | @@ -450,6 +374,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. @@ -542,7 +470,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-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.39.5 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.65.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 +482,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..4d5df91da1 --- /dev/null +++ b/generation_config.yaml @@ -0,0 +1,38 @@ +gapic_generator_version: 2.61.0 +googleapis_commitish: b0316578aaf7434e3c5bb93badd252f67aacf8d5 +libraries_bom_version: 26.65.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/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 + 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 371b2ebe89..a2dfbc2945 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.40.1-SNAPSHOT + 2.65.1-SNAPSHOT pom com.google.cloud sdk-platform-java-config - 3.32.0 + 3.51.0 @@ -63,37 +63,37 @@ com.google.cloud google-cloud-bigtable - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT com.google.cloud google-cloud-bigtable-emulator - 0.177.1-SNAPSHOT + 0.202.1-SNAPSHOT com.google.cloud google-cloud-bigtable-emulator-core - 0.177.1-SNAPSHOT + 0.202.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT diff --git a/google-cloud-bigtable-deps-bom/pom.xml b/google-cloud-bigtable-deps-bom/pom.xml index 939cb20b41..055ae2337c 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.32.0 + 3.51.0 com.google.cloud google-cloud-bigtable-deps-bom - 2.40.1-SNAPSHOT + 2.65.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.40.0 + 1.62.0 pom import diff --git a/google-cloud-bigtable-emulator-core/pom.xml b/google-cloud-bigtable-emulator-core/pom.xml index 66f13e1d5f..c63adfc8e5 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.40.1-SNAPSHOT + 2.65.1-SNAPSHOT + Google Cloud Java - Bigtable Emulator Core google-cloud-bigtable-emulator-core - 0.177.1-SNAPSHOT + 0.202.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..5ae045c8f7 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 @@ -52,6 +52,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 +91,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 @@ -141,6 +145,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) { @@ -162,6 +171,7 @@ public synchronized int getPort() { } return port; } + // /** Gets the current platform, which will be used to select the appropriate emulator binary. */ diff --git a/google-cloud-bigtable-emulator/pom.xml b/google-cloud-bigtable-emulator/pom.xml index 289aa754b5..06ba48b212 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.177.1-SNAPSHOT + 0.202.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.40.1-SNAPSHOT + 2.65.1-SNAPSHOT scm:git:git@github.com:googleapis/java-bigtable.git @@ -81,14 +81,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT pom import @@ -99,7 +99,7 @@ com.google.cloud google-cloud-bigtable-emulator-core - 0.177.1-SNAPSHOT + 0.202.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 034168c2a1..23ddeafdda 100644 --- a/google-cloud-bigtable/clirr-ignored-differences.xml +++ b/google-cloud-bigtable/clirr-ignored-differences.xml @@ -210,4 +210,190 @@ com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter$ChangeStreamRecordBuilder * + + + 2000 + com/google/cloud/bigtable/admin/v2/models/Type + + + 2000 + com/google/cloud/bigtable/admin/v2/models/Type$SumAggregateInput + + + 5001 + com/google/cloud/bigtable/admin/v2/models/Type$SumAggregateInput + com/google/cloud/bigtable/admin/v2/models/Type + + + 5001 + com/google/cloud/bigtable/admin/v2/models/Type$Aggregate + com/google/cloud/bigtable/admin/v2/models/Type + + + 5001 + com/google/cloud/bigtable/admin/v2/models/Type$Bytes + com/google/cloud/bigtable/admin/v2/models/Type + + + 5001 + com/google/cloud/bigtable/admin/v2/models/Type$Int64 + com/google/cloud/bigtable/admin/v2/models/Type + + + 5001 + com/google/cloud/bigtable/admin/v2/models/Type$Int64 + com/google/cloud/bigtable/admin/v2/models/Type$SumAggregateInput + + + 5001 + com/google/cloud/bigtable/admin/v2/models/Type$Raw + com/google/cloud/bigtable/admin/v2/models/Type + + + 7004 + com/google/cloud/bigtable/admin/v2/models/Type$Int64$Encoding$BigEndianBytes + * + + + 7002 + 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 + * + + + + 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* + * + diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index 862eede954..ffaa06614a 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-bigtable - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT jar Google Cloud Bigtable https://github.com/googleapis/java-bigtable @@ -12,11 +12,11 @@ com.google.cloud google-cloud-bigtable-parent - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT google-cloud-bigtable @@ -25,12 +25,19 @@ false ${skipTests} ${skipTests} - + + src/test/resources/logging.properties + + 1.65.0 - 3.25.3 + 3.25.5 @@ -47,14 +54,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT pom import @@ -129,6 +136,10 @@ com.google.protobuf protobuf-java-util + + com.google.code.gson + gson + io.opencensus opencensus-api @@ -197,6 +208,10 @@ io.grpc grpc-protobuf + + io.grpc + grpc-opentelemetry + org.threeten threetenbp @@ -326,17 +341,114 @@ mockito-core test + + com.google.guava + guava-testlib + test + - + enable-enforcer-rules + + + + !performRelease + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.5.0 + + + + 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 -XepExcludedPaths:.*/generated-sources/.* + + -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 true - + src/test/resources/logging-verbose.properties @@ -346,6 +458,7 @@ 1 none + true @@ -409,6 +522,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 @@ -459,6 +573,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 @@ -490,11 +605,11 @@ false - 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 @@ -536,6 +651,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 @@ -574,6 +690,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 @@ -646,54 +763,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 @@ -702,7 +771,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 @@ -725,6 +793,9 @@ false + + ${java-log-config} + 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 c7f280b3d1..4c9652c5b4 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.40.1-SNAPSHOT"; + public static String VERSION = "2.65.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..46660a8774 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 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. @@ -37,12 +37,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 +62,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 +78,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; @@ -185,7 +205,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 +259,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 +643,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 +679,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 +2409,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,77 +3114,1544 @@ 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> { - - private ListAppProfilesPage( - PageContext context, - ListAppProfilesResponse response) { - super(context, response); - } - - private static ListAppProfilesPage createEmptyPage() { - return new ListAppProfilesPage(null, null); - } - - @Override - protected ListAppProfilesPage createPage( - PageContext context, + // 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) { + super(context, response); + } + + private static ListAppProfilesPage createEmptyPage() { + return new ListAppProfilesPage(null, null); + } + + @Override + protected ListAppProfilesPage createPage( + PageContext context, ListAppProfilesResponse response) { return new ListAppProfilesPage(context, response); } @@ -3204,4 +4763,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..8223e0fc24 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 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. @@ -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.InternalApi; @@ -38,12 +40,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 +63,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 +76,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; @@ -225,6 +245,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(); @@ -472,6 +581,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 799aebf58e..7453b2e1f8 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 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,11 +41,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 +56,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 +64,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 +73,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 +86,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; @@ -944,6 +954,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 +984,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 +1016,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 +1048,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 +1832,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 @@ -4068,7 +4082,7 @@ public final UnaryCallable listBackupsC * 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.RestoreTableMetadata]. The + * [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The * [response][google.longrunning.Operation.response] type is * [Table][google.bigtable.admin.v2.Table], if successful. * @@ -4104,7 +4118,7 @@ public final OperationFuture restoreTableAsync( * 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.RestoreTableMetadata]. The + * [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The * [response][google.longrunning.Operation.response] type is * [Table][google.bigtable.admin.v2.Table], if successful. * @@ -4140,7 +4154,7 @@ public final OperationFuture restoreTableAsync( * 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.RestoreTableMetadata]. The + * [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The * [response][google.longrunning.Operation.response] type is * [Table][google.bigtable.admin.v2.Table], if successful. * @@ -4197,7 +4211,7 @@ public final UnaryCallable restoreTableCallable( * } * * @param parent Required. The name of the destination cluster that will contain the backup copy. - * The cluster must already exists. Values are of the form: + * The cluster must already exist. Values are of the form: * `projects/{project}/instances/{instance}/clusters/{cluster}`. * @param backupId Required. The id of the new backup. The `backup_id` along with `parent` are * combined as {parent}/backups/{backup_id} to create the full backup name, of the form: @@ -4255,7 +4269,7 @@ public final OperationFuture copyBackupAsync( * } * * @param parent Required. The name of the destination cluster that will contain the backup copy. - * The cluster must already exists. Values are of the form: + * The cluster must already exist. Values are of the form: * `projects/{project}/instances/{instance}/clusters/{cluster}`. * @param backupId Required. The id of the new backup. The `backup_id` along with `parent` are * combined as {parent}/backups/{backup_id} to create the full backup name, of the form: @@ -4312,7 +4326,7 @@ public final OperationFuture copyBackupAsync( * } * * @param parent Required. The name of the destination cluster that will contain the backup copy. - * The cluster must already exists. Values are of the form: + * The cluster must already exist. Values are of the form: * `projects/{project}/instances/{instance}/clusters/{cluster}`. * @param backupId Required. The id of the new backup. The `backup_id` along with `parent` are * combined as {parent}/backups/{backup_id} to create the full backup name, of the form: @@ -4370,7 +4384,7 @@ public final OperationFuture copyBackupAsync( * } * * @param parent Required. The name of the destination cluster that will contain the backup copy. - * The cluster must already exists. Values are of the form: + * The cluster must already exist. Values are of the form: * `projects/{project}/instances/{instance}/clusters/{cluster}`. * @param backupId Required. The id of the new backup. The `backup_id` along with `parent` are * combined as {parent}/backups/{backup_id} to create the full backup name, of the form: @@ -4506,8 +4520,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 +4533,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 +4553,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 +4582,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 +4598,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 +4615,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 +4631,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 +4648,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 +4660,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 +4685,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 +4718,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 +4733,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 +4751,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 +4766,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 +4784,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 +4796,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 +4823,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 +4861,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 +4876,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 +4894,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 +4909,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,77 +4925,813 @@ 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 { - - private ListTablesPage( - PageContext context, - ListTablesResponse response) { - super(context, response); - } - - private static ListTablesPage createEmptyPage() { - return new ListTablesPage(null, null); - } + // 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(); + } - @Override - protected ListTablesPage createPage( - PageContext context, - ListTablesResponse response) { - return new ListTablesPage(context, response); - } + // 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); + } + + private static ListTablesPage createEmptyPage() { + return new ListTablesPage(null, null); + } + + @Override + protected ListTablesPage createPage( + PageContext context, + ListTablesResponse response) { + return new ListTablesPage(context, response); + } @Override public ApiFuture createPageAsync( @@ -5237,4 +5996,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..3eabd43290 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 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. @@ -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; @@ -43,11 +44,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 +59,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 +75,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 +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.BigtableTableAdminStubSettings; @@ -316,6 +326,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 +690,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..94e9ed7ddf 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 @@ -22,13 +22,23 @@ 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 +46,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; @@ -1392,6 +1408,594 @@ public List apply(TestIamPermissionsResponse input) { MoreExecutors.directExecutor()); } + /** + * 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") + public MaterializedView createMaterializedView(CreateMaterializedViewRequest request) { + return ApiExceptions.callAndTranslateApiException(createMaterializedViewAsync(request)); + } + + /** + * 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") + 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()); + } + + /** + * Gets the materialized view by ID. + * + *

    Sample code: + * + *

    {@code
    +   * MaterializedView materializedView = client.getMaterializedView("my-instance", "my-materialized-view");
    +   * }
    + * + * @see MaterializedView + */ + public MaterializedView getMaterializedView(String instanceId, String materializedViewId) { + return ApiExceptions.callAndTranslateApiException( + getMaterializedViewAsync(instanceId, materializedViewId)); + } + + /** + * 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") + 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()); + } + + /** + * Lists all materialized views of the specified instance. + * + *

    Sample code: + * + *

    {@code
    +   * List materializedViews = client.listMaterializedViews("my-instance");
    +   * }
    + * + * @see MaterializedView + */ + @SuppressWarnings("WeakerAccess") + public List listMaterializedViews(String instanceId) { + return ApiExceptions.callAndTranslateApiException(listMaterializedViewsAsync(instanceId)); + } + + /** + * 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") + 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()); + } + + /** + * 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") + public MaterializedView updateMaterializedView(UpdateMaterializedViewRequest request) { + return ApiExceptions.callAndTranslateApiException(updateMaterializedViewAsync(request)); + } + + /** + * 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") + 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()); + } + + /** + * Deletes the specified materialized view. + * + *

    Sample code: + * + *

    {@code
    +   * client.deleteMaterializedView("my-instance", "my-materialized-view");
    +   * }
    + */ + @SuppressWarnings("WeakerAccess") + public void deleteMaterializedView(String instanceId, String materializedViewId) { + ApiExceptions.callAndTranslateApiException( + deleteMaterializedViewAsync(instanceId, materializedViewId)); + } + + /** + * Asynchronously deletes the specified materialized view. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture deleteFuture = client.deleteMaterializedViewAsync("my-instance", "my-materialized-view");
    +   *
    +   * deleteFuture.get();
    +   * }
    + */ + @SuppressWarnings("WeakerAccess") + 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()); + } + + /** + * 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") + public LogicalView createLogicalView(CreateLogicalViewRequest request) { + return ApiExceptions.callAndTranslateApiException(createLogicalViewAsync(request)); + } + + /** + * 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") + 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()); + } + + /** + * Gets the logical view by ID. + * + *

    Sample code: + * + *

    {@code
    +   * LogicalView logicalView = client.getLogicalView("my-instance", "my-logical-view");
    +   * }
    + * + * @see LogicalView + */ + public LogicalView getLogicalView(String instanceId, String logicalViewId) { + return ApiExceptions.callAndTranslateApiException( + getLogicalViewAsync(instanceId, logicalViewId)); + } + + /** + * 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") + 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()); + } + + /** + * Lists all logical views of the specified instance. + * + *

    Sample code: + * + *

    {@code
    +   * List logicalViews = client.listLogicalViews("my-instance");
    +   * }
    + * + * @see LogicalView + */ + @SuppressWarnings("WeakerAccess") + public List listLogicalViews(String instanceId) { + return ApiExceptions.callAndTranslateApiException(listLogicalViewsAsync(instanceId)); + } + + /** + * 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") + 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()); + } + + /** + * 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") + public LogicalView updateLogicalView(UpdateLogicalViewRequest request) { + return ApiExceptions.callAndTranslateApiException(updateLogicalViewAsync(request)); + } + + /** + * 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") + 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()); + } + + /** + * Deletes the specified logical view. + * + *

    Sample code: + * + *

    {@code
    +   * client.deleteLogicalView("my-instance", "my-logical-view");
    +   * }
    + */ + @SuppressWarnings("WeakerAccess") + public void deleteLogicalView(String instanceId, String logicalViewId) { + ApiExceptions.callAndTranslateApiException(deleteLogicalViewAsync(instanceId, logicalViewId)); + } + + /** + * Asynchronously deletes the specified logical view. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture deleteFuture = client.deleteLogicalViewAsync("my-instance", "my-logical-view");
    +   *
    +   * deleteFuture.get();
    +   * }
    + */ + @SuppressWarnings("WeakerAccess") + 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..136fc8f3ab 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 @@ -24,13 +24,16 @@ 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 +44,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,11 +63,14 @@ 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.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -154,8 +164,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); } @@ -917,6 +929,11 @@ 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. * @@ -1788,6 +1805,340 @@ public ApiFuture deleteAuthorizedViewAsync(String tableId, String authoriz return transformToVoid(this.stub.deleteAuthorizedViewCallable().futureCall(request)); } + /** + * 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. + */ + public SchemaBundle createSchemaBundle(CreateSchemaBundleRequest request) { + return ApiExceptions.callAndTranslateApiException(createSchemaBundleAsync(request)); + } + + /** + * 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. + */ + 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()); + } + + /** + * 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. + */ + public SchemaBundle updateSchemaBundle(UpdateSchemaBundleRequest request) { + return ApiExceptions.callAndTranslateApiException(updateSchemaBundleAsync(request)); + } + + /** + * 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. + */ + 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()); + } + + /** + * 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");
    +   * }
    + */ + public SchemaBundle getSchemaBundle(String tableId, String schemaBundleId) { + return ApiExceptions.callAndTranslateApiException( + getSchemaBundleAsync(tableId, schemaBundleId)); + } + + /** + * 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());
    +   * }
    + */ + 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()); + } + + /** + * Lists all schema bundle IDs in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * List schemaBundles = client.listSchemaBundles("my-table");
    +   * }
    + */ + public List listSchemaBundles(String tableId) { + return ApiExceptions.callAndTranslateApiException(listSchemaBundlesAsync(tableId)); + } + + /** + * 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());
    +   * }
    + */ + 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()); + } + + /** + * Deletes an schema bundle with the specified schema bundle ID in the specified table. Note that + * the deletion is prohibited if the schema bundle has deletion_protection field set to true. + * + *

    Sample code: + * + *

    {@code
    +   * client.deleteSchemaBundle("my-table", "my-schema-bundle");
    +   * }
    + */ + public void deleteSchemaBundle(String tableId, String schemaBundleId) { + ApiExceptions.callAndTranslateApiException(deleteSchemaBundleAsync(tableId, schemaBundleId)); + } + + /** + * Asynchronously deletes an schema bundle with the specified schema bundle ID in the specified + * table. Note that the deletion is prohibited if the schema bundle has deletion_protection field + * set to true. + * + *

    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()
    +   * );
    +   * }
    + */ + 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} 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..3918b40dd0 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 @@ -18,6 +18,7 @@ import com.google.api.core.InternalApi; import java.util.regex.Matcher; import java.util.regex.Pattern; +import javax.annotation.Nonnull; /** * Internal helper to compose full resource names. @@ -37,6 +38,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 +53,16 @@ public static String formatTableName(String projectId, String instanceId, String return formatInstanceName(projectId, instanceId) + "/tables/" + tableId; } + 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 +77,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 +107,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..2d41c74847 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()) { @@ -267,6 +270,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. 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..1c340910a0 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. * 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..0fea8985a0 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 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..0718af03c1 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequest.java @@ -0,0 +1,71 @@ +/* + * 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 javax.annotation.Nonnull; + +@AutoValue +public abstract class ConsistencyRequest { + @Nonnull + protected abstract String getTableId(); + + @Nonnull + protected abstract CheckConsistencyRequest.ModeCase getMode(); + + public static ConsistencyRequest forReplication(String tableId) { + return new AutoValue_ConsistencyRequest( + tableId, CheckConsistencyRequest.ModeCase.STANDARD_READ_REMOTE_WRITES); + } + + public static ConsistencyRequest forDataBoost(String tableId) { + return new AutoValue_ConsistencyRequest( + tableId, CheckConsistencyRequest.ModeCase.DATA_BOOST_READ_LOCAL_WRITES); + } + + @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/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..ea966d81c4 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateSchemaBundleRequest.java @@ -0,0 +1,109 @@ +/* + * 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) + throws IOException { + 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/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/Table.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Table.java index 31aa612f18..9fb66c41c0 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; @@ -58,7 +60,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 +101,49 @@ 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) { + 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; + private static AutomatedBackupPolicy automatedBackupPolicy; @InternalApi public static Table fromProto(@Nonnull com.google.bigtable.admin.v2.Table proto) { @@ -131,23 +170,35 @@ public static Table fromProto(@Nonnull com.google.bigtable.admin.v2.Table proto) proto.getChangeStreamConfig().getRetentionPeriod().getNanos()); } + if (proto.hasAutomatedBackupPolicy()) { + automatedBackupPolicy = AutomatedBackupPolicy.fromProto(proto.getAutomatedBackupPolicy()); + } else { + automatedBackupPolicy = null; + } + 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, + AutomatedBackupPolicy automatedBackupPolicy) { this.instanceId = tableName.getInstance(); this.id = tableName.getTable(); this.replicationStatesByClusterId = replicationStatesByClusterId; this.columnFamilies = columnFamilies; this.changeStreamRetention = changeStreamRetention; + this.deletionProtection = deletionProtection; + Table.automatedBackupPolicy = automatedBackupPolicy; } /** Gets the table's id. */ @@ -172,6 +223,21 @@ 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 ? false : true; + } + + /** Returns the automated backup policy config. */ + public AutomatedBackupPolicy getAutomatedBackupPolicy() { + return automatedBackupPolicy; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -185,12 +251,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 e6a77dc2bf..99f7f98c79 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,16 +27,19 @@ * @see com.google.bigtable.admin.v2.Type */ @BetaApi -public abstract class Type { - private Type() {} - +public interface Type { /** - * This type is a marker type that allows types to be used as the input to the SUM aggregate - * function. + * These types are marker types that allow types to be used as the input to aggregate function. */ - public abstract static class SumAggregateInput extends Type {} + public static interface SumAggregateInput extends Type {} + + public static interface MinAggregateInput extends Type {} + + public static interface MaxAggregateInput extends Type {} - abstract com.google.bigtable.admin.v2.Type toProto(); + public static interface HllAggregateInput extends Type {} + + com.google.bigtable.admin.v2.Type toProto(); static Type fromProto(com.google.bigtable.admin.v2.Type source) { switch (source.getKindCase()) { @@ -73,7 +76,7 @@ public static Bytes bytes(Bytes.Encoding encoding) { * Creates an Int64 type with a big-endian encoding. The bytes are then encoded in "raw" format. */ public static Int64 bigEndianInt64() { - return Int64.create(Int64.Encoding.BigEndianBytes.create(Bytes.rawBytes())); + return Int64.create(Int64.Encoding.BigEndianBytes.create()); } /** Creates an Int64 type with the specified encoding. */ @@ -91,9 +94,39 @@ public static Aggregate sum(SumAggregateInput inputType) { return Aggregate.create(inputType, Aggregate.Aggregator.Sum.create()); } + /** Creates an Aggregate type with a MIN aggregator and Int64 input type. */ + public static Aggregate int64Min() { + return min(bigEndianInt64()); + } + + /** Creates an Aggregate type with a MIN aggregator and specified input type. */ + public static Aggregate min(MinAggregateInput inputType) { + return Aggregate.create(inputType, Aggregate.Aggregator.Min.create()); + } + + /** Creates an Aggregate type with a MAX aggregator and Int64 input type. */ + public static Aggregate int64Max() { + return max(bigEndianInt64()); + } + + /** Creates an Aggregate type with a MAX aggregator and specified input type. */ + public static Aggregate max(MaxAggregateInput inputType) { + return Aggregate.create(inputType, Aggregate.Aggregator.Max.create()); + } + + /** Creates an Aggregate type with a HLL aggregator and Int64 input type. */ + public static Aggregate int64Hll() { + return hll(bigEndianInt64()); + } + + /** Creates an Aggregate type with a HLL aggregator and specified input type. */ + public static Aggregate hll(HllAggregateInput inputType) { + return Aggregate.create(inputType, Aggregate.Aggregator.Hll.create()); + } + /** Represents a string of bytes with a specific encoding. */ @AutoValue - public abstract static class Bytes extends Type { + public abstract static class Bytes implements Type { public static Bytes create(Encoding encoding) { return new AutoValue_Type_Bytes(encoding); } @@ -102,7 +135,7 @@ public static Bytes create(Encoding encoding) { public abstract Encoding getEncoding(); @Override - com.google.bigtable.admin.v2.Type toProto() { + public com.google.bigtable.admin.v2.Type toProto() { com.google.bigtable.admin.v2.Type.Builder builder = com.google.bigtable.admin.v2.Type.newBuilder(); builder.getBytesTypeBuilder().setEncoding(getEncoding().toProto()); @@ -142,7 +175,7 @@ public static Raw create() { .build(); @Override - com.google.bigtable.admin.v2.Type.Bytes.Encoding toProto() { + public com.google.bigtable.admin.v2.Type.Bytes.Encoding toProto() { return PROTO_INSTANCE; } } @@ -151,7 +184,8 @@ com.google.bigtable.admin.v2.Type.Bytes.Encoding toProto() { /** Represents a 64-bit integer with a specific encoding. */ @AutoValue - public abstract static class Int64 extends SumAggregateInput { + public abstract static class Int64 + implements SumAggregateInput, MinAggregateInput, MaxAggregateInput, HllAggregateInput { public static Int64 create(Encoding encoding) { return new AutoValue_Type_Int64(encoding); } @@ -166,10 +200,9 @@ public abstract static class Encoding { static Encoding fromProto(com.google.bigtable.admin.v2.Type.Int64.Encoding source) { switch (source.getEncodingCase()) { case BIG_ENDIAN_BYTES: - return BigEndianBytes.create( - Bytes.fromProto(source.getBigEndianBytes().getBytesType())); + return BigEndianBytes.create(); case ENCODING_NOT_SET: - return BigEndianBytes.create(Bytes.rawBytes()); + return BigEndianBytes.create(); } throw new UnsupportedOperationException(); } @@ -177,25 +210,22 @@ static Encoding fromProto(com.google.bigtable.admin.v2.Type.Int64.Encoding sourc @AutoValue public abstract static class BigEndianBytes extends Encoding { - public static BigEndianBytes create(Bytes bytes) { - return new AutoValue_Type_Int64_Encoding_BigEndianBytes(bytes); + public static BigEndianBytes create() { + return new AutoValue_Type_Int64_Encoding_BigEndianBytes(); } - @Nonnull - public abstract Bytes getBytes(); - @Override - com.google.bigtable.admin.v2.Type.Int64.Encoding toProto() { + public com.google.bigtable.admin.v2.Type.Int64.Encoding toProto() { com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder builder = com.google.bigtable.admin.v2.Type.Int64.Encoding.newBuilder(); - builder.getBigEndianBytesBuilder().setBytesType(getBytes().toProto().getBytesType()); + builder.getBigEndianBytesBuilder(); return builder.build(); } } } @Override - com.google.bigtable.admin.v2.Type toProto() { + public com.google.bigtable.admin.v2.Type toProto() { com.google.bigtable.admin.v2.Type.Builder builder = com.google.bigtable.admin.v2.Type.newBuilder(); builder.getInt64TypeBuilder().setEncoding(getEncoding().toProto()); @@ -208,13 +238,13 @@ static Int64 fromProto(com.google.bigtable.admin.v2.Type.Int64 source) { } @AutoValue - public abstract static class Raw extends Type { + public abstract static class Raw implements Type { public static Raw create() { return new AutoValue_Type_Raw(); } @Override - com.google.bigtable.admin.v2.Type toProto() { + public com.google.bigtable.admin.v2.Type toProto() { return com.google.bigtable.admin.v2.Type.getDefaultInstance(); } } @@ -226,7 +256,7 @@ com.google.bigtable.admin.v2.Type toProto() { * the `input_type` or `state_type`, and reads will always return the `state_type` . */ @AutoValue - public abstract static class Aggregate extends Type { + public abstract static class Aggregate implements Type { public static Aggregate create(Type inputType, Aggregator aggregator) { return new AutoValue_Type_Aggregate(inputType, aggregator); } @@ -250,11 +280,49 @@ void buildTo(com.google.bigtable.admin.v2.Type.Aggregate.Builder builder) { } } + @AutoValue + public abstract static class Min extends Aggregator { + public static Min create() { + return new AutoValue_Type_Aggregate_Aggregator_Min(); + } + + @Override + void buildTo(com.google.bigtable.admin.v2.Type.Aggregate.Builder builder) { + builder.setMin(com.google.bigtable.admin.v2.Type.Aggregate.Min.getDefaultInstance()); + } + } + + @AutoValue + public abstract static class Max extends Aggregator { + public static Max create() { + return new AutoValue_Type_Aggregate_Aggregator_Max(); + } + + @Override + void buildTo(com.google.bigtable.admin.v2.Type.Aggregate.Builder builder) { + builder.setMax(com.google.bigtable.admin.v2.Type.Aggregate.Max.getDefaultInstance()); + } + } + + @AutoValue + public abstract static class Hll extends Aggregator { + public static Hll create() { + return new AutoValue_Type_Aggregate_Aggregator_Hll(); + } + + @Override + void buildTo(com.google.bigtable.admin.v2.Type.Aggregate.Builder builder) { + builder.setHllppUniqueCount( + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance()); + } + } + abstract void buildTo(com.google.bigtable.admin.v2.Type.Aggregate.Builder builder); } @Override - com.google.bigtable.admin.v2.Type toProto() { + public com.google.bigtable.admin.v2.Type toProto() { com.google.bigtable.admin.v2.Type.Builder typeBuilder = com.google.bigtable.admin.v2.Type.newBuilder(); com.google.bigtable.admin.v2.Type.Aggregate.Builder aggregateBuilder = @@ -271,6 +339,15 @@ static Aggregate fromProto(com.google.bigtable.admin.v2.Type.Aggregate source) { case SUM: aggregator = Aggregator.Sum.create(); break; + case MIN: + aggregator = Aggregator.Min.create(); + break; + case MAX: + aggregator = Aggregator.Max.create(); + break; + case HLLPP_UNIQUE_COUNT: + aggregator = Aggregator.Hll.create(); + break; case AGGREGATOR_NOT_SET: throw new UnsupportedOperationException(); } 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/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..4d65d14e16 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) { 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..7cdcb66599 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallable.java @@ -0,0 +1,195 @@ +/* + * 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.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.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) { + 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 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(); + } + } +} 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..2cb8549f5d 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,25 @@ *

    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; + private final AwaitConsistencyCallable awaitConsistencyCallable; - static AwaitReplicationCallable create( - UnaryCallable - generateCallable, - UnaryCallable checkCallable, - ClientContext clientContext, - RetrySettings pollingSettings) { + static AwaitReplicationCallable create(AwaitConsistencyCallable awaitConsistencyCallable) { - RetryAlgorithm retryAlgorithm = - new RetryAlgorithm<>( - new PollResultAlgorithm(), - new ExponentialPollAlgorithm(pollingSettings, clientContext.getClock())); - - 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); - } + ConsistencyRequest consistencyRequest = ConsistencyRequest.forReplication(tableName.getTable()); - 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 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; - } + return awaitConsistencyCallable.futureCall(consistencyRequest, context); } - /** - * 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..51218575d9 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 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. @@ -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.InternalApi; import com.google.api.gax.core.BackgroundResource; @@ -30,12 +32,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 +55,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 +68,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; @@ -199,6 +219,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 588e64bc99..6678392d32 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 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. @@ -18,9 +18,12 @@ 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; +import com.google.api.core.ObsoleteApi; import com.google.api.gax.core.GaxProperties; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; @@ -51,12 +54,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; @@ -67,6 +78,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; @@ -74,6 +91,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; @@ -86,9 +107,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. /** @@ -105,7 +126,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.
    @@ -122,11 +145,48 @@
      *             .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://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) 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") public class BigtableInstanceAdminStubSettings @@ -186,6 +246,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> @@ -220,9 +312,7 @@ public String extractNextToken(ListAppProfilesResponse payload) { @Override public Iterable extractResources(ListAppProfilesResponse payload) { - return payload.getAppProfilesList() == null - ? ImmutableList.of() - : payload.getAppProfilesList(); + return payload.getAppProfilesList(); } }; @@ -257,9 +347,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(); } }; @@ -297,6 +462,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; @@ -444,6 +652,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() @@ -467,6 +760,7 @@ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuild } /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") public static String getDefaultEndpoint() { return "bigtableadmin.googleapis.com:443"; } @@ -553,6 +847,24 @@ 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(); } /** Builder for BigtableInstanceAdminStubSettings. */ @@ -610,6 +922,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; @@ -617,14 +965,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(); } @@ -636,31 +984,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(); @@ -700,6 +1048,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( @@ -723,7 +1086,17 @@ protected Builder(ClientContext clientContext) { getIamPolicySettings, setIamPolicySettings, testIamPermissionsSettings, - listHotTabletsSettings); + listHotTabletsSettings, + createLogicalViewSettings, + getLogicalViewSettings, + listLogicalViewsSettings, + updateLogicalViewSettings, + deleteLogicalViewSettings, + createMaterializedViewSettings, + getMaterializedViewSettings, + listMaterializedViewsSettings, + updateMaterializedViewSettings, + deleteMaterializedViewSettings); initDefaults(this); } @@ -759,6 +1132,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( @@ -782,7 +1171,17 @@ protected Builder(BigtableInstanceAdminStubSettings settings) { getIamPolicySettings, setIamPolicySettings, testIamPermissionsSettings, - listHotTabletsSettings); + listHotTabletsSettings, + createLogicalViewSettings, + getLogicalViewSettings, + listLogicalViewsSettings, + updateLogicalViewSettings, + deleteLogicalViewSettings, + createMaterializedViewSettings, + getMaterializedViewSettings, + listMaterializedViewsSettings, + updateMaterializedViewSettings, + deleteMaterializedViewSettings); } private static Builder createDefault() { @@ -800,53 +1199,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() @@ -855,61 +1254,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)) @@ -918,13 +1367,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 @@ -932,8 +1381,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)) @@ -942,13 +1391,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 @@ -956,8 +1405,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)) @@ -966,21 +1415,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)) @@ -989,13 +1438,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 @@ -1014,13 +1463,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 @@ -1028,8 +1477,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)) @@ -1038,13 +1487,113 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelayDuration(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .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) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(600000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); return builder; @@ -1220,6 +1769,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..0b382ae121 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 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. @@ -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; @@ -35,11 +36,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 +51,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 +67,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 +77,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; @@ -284,6 +294,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 b5d9e94af5..79a3813af8 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 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. @@ -18,11 +18,13 @@ 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.ApiFuture; +import com.google.api.core.ObsoleteApi; import com.google.api.gax.core.GaxProperties; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; @@ -56,11 +58,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; @@ -68,12 +73,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; @@ -81,6 +89,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; @@ -90,6 +99,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; @@ -104,9 +115,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. /** @@ -123,7 +134,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.
    @@ -140,11 +153,48 @@
      *             .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://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) 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") public class BigtableTableAdminStubSettings extends StubSettings { @@ -223,6 +273,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 = @@ -254,9 +317,7 @@ public String extractNextToken(ListTablesResponse payload) { @Override public Iterable extractResources(ListTablesResponse payload) { - return payload.getTablesList() == null - ? ImmutableList.
    of() - : payload.getTablesList(); + return payload.getTablesList(); } }; @@ -294,9 +355,7 @@ public String extractNextToken(ListAuthorizedViewsResponse payload) { @Override public Iterable extractResources(ListAuthorizedViewsResponse payload) { - return payload.getAuthorizedViewsList() == null - ? ImmutableList.of() - : payload.getAuthorizedViewsList(); + return payload.getAuthorizedViewsList(); } }; @@ -330,9 +389,7 @@ public String extractNextToken(ListSnapshotsResponse payload) { @Override public Iterable extractResources(ListSnapshotsResponse payload) { - return payload.getSnapshotsList() == null - ? ImmutableList.of() - : payload.getSnapshotsList(); + return payload.getSnapshotsList(); } }; @@ -366,9 +423,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(); } }; @@ -444,6 +537,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; @@ -660,6 +774,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() @@ -683,6 +836,7 @@ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuild } /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") public static String getDefaultEndpoint() { return "bigtableadmin.googleapis.com:443"; } @@ -782,6 +936,15 @@ 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(); } /** Builder for BigtableTableAdminStubSettings. */ @@ -860,6 +1023,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; @@ -875,7 +1055,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(); @@ -888,39 +1073,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) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) + .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) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) .build(); definitions.put("no_retry_1_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); @@ -973,6 +1169,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( @@ -1005,7 +1208,12 @@ protected Builder(ClientContext clientContext) { copyBackupSettings, getIamPolicySettings, setIamPolicySettings, - testIamPermissionsSettings); + testIamPermissionsSettings, + createSchemaBundleSettings, + updateSchemaBundleSettings, + getSchemaBundleSettings, + listSchemaBundlesSettings, + deleteSchemaBundleSettings); initDefaults(this); } @@ -1054,6 +1262,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( @@ -1086,7 +1303,12 @@ protected Builder(BigtableTableAdminStubSettings settings) { copyBackupSettings, getIamPolicySettings, setIamPolicySettings, - testIamPermissionsSettings); + testIamPermissionsSettings, + createSchemaBundleSettings, + updateSchemaBundleSettings, + getSchemaBundleSettings, + listSchemaBundlesSettings, + deleteSchemaBundleSettings); } private static Builder createDefault() { @@ -1169,8 +1391,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() @@ -1179,8 +1401,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() @@ -1252,6 +1474,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( @@ -1268,13 +1515,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 @@ -1291,13 +1538,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 @@ -1315,13 +1562,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 @@ -1340,13 +1587,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 @@ -1365,13 +1612,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 @@ -1389,13 +1636,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 @@ -1413,13 +1660,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 @@ -1437,13 +1684,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 @@ -1460,13 +1707,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) - .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 + .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) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); return builder; @@ -1713,6 +2010,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..1cb80e0c49 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,42 @@ public class EnhancedBigtableTableAdminStub extends GrpcBigtableTableAdminStub { private final BigtableTableAdminStubSettings settings; private final ClientContext clientContext; + private final TableAdminRequestContext requestContext; + 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(); } private AwaitReplicationCallable createAwaitReplicationCallable() { + return AwaitReplicationCallable.create(awaitConsistencyCallable); + } + + private AwaitConsistencyCallable createAwaitConsistencyCallable() { // TODO(igorbernstein2): expose polling settings RetrySettings pollingSettings = RetrySettings.newBuilder() @@ -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 @@ -194,6 +212,10 @@ 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..d7561fb5dd 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 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. 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..e6b2c733c3 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 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. @@ -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.InternalApi; import com.google.api.gax.core.BackgroundResource; @@ -35,12 +37,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 +60,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 +73,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; @@ -279,6 +299,113 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { ProtoUtils.marshaller(ListHotTabletsResponse.getDefaultInstance())) .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())) + .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())) + .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())) + .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())) + .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())) + .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())) + .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())) + .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())) + .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())) + .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())) + .build(); + private final UnaryCallable createInstanceCallable; private final OperationCallable createInstanceOperationCallable; @@ -320,6 +447,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; @@ -580,6 +736,115 @@ protected GrpcBigtableInstanceAdminStub( return builder.build(); }) .build(); + GrpcCallSettings createLogicalViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createLogicalViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLogicalViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLogicalViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listLogicalViewsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLogicalViewsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .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(); + }) + .build(); + GrpcCallSettings + createMaterializedViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createMaterializedViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getMaterializedViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getMaterializedViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listMaterializedViewsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listMaterializedViewsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .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(); + }) + .build(); this.createInstanceCallable = callableFactory.createUnaryCallable( @@ -692,6 +957,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 +1198,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..4a203da32d 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 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. 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..752cf0d49e 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 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. @@ -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; @@ -40,11 +41,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 +56,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 +72,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 +82,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; @@ -377,6 +387,57 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) .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())) + .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())) + .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())) + .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())) + .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())) + .build(); + private final UnaryCallable createTableCallable; private final UnaryCallable createTableFromSnapshotCallable; @@ -440,6 +501,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; @@ -793,6 +868,58 @@ protected GrpcBigtableTableAdminStub( return builder.build(); }) .build(); + GrpcCallSettings createSchemaBundleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSchemaBundleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .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(); + }) + .build(); + GrpcCallSettings + listSchemaBundlesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSchemaBundlesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteSchemaBundleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSchemaBundleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); this.createTableCallable = callableFactory.createUnaryCallable( @@ -970,6 +1097,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 +1379,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/common/Type.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/common/Type.java new file mode 100644 index 0000000000..bc1d7f14ec --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/common/Type.java @@ -0,0 +1,402 @@ +/* + * 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.common; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.auto.value.AutoValue; +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.collect.ImmutableList; +import com.google.protobuf.ByteString; +import java.time.Instant; +import java.util.List; + +/** + * Shared type implementations. Right now this is only used by SqlType but this will become a shared + * definition with Schema type (called {@link com.google.cloud.bigtable.admin.v2.models.Type} right + * now), and any other type interfaces needed in the future. + * + *

    This is considered an internal implementation detail and not meant to be used by applications. + * Types should only be used through the relevant interfaces and factories, e.g. {@link SqlType}. + */ +@BetaApi +@InternalApi +public interface Type { + + @AutoValue + abstract class Bytes implements Type, SqlType { + + public static Bytes create() { + return DefaultInstances.BYTES; + } + + @Override + public Code getCode() { + return Code.BYTES; + } + + @Override + public java.lang.String toString() { + return getCode().name(); + } + } + + @AutoValue + abstract class String implements Type, SqlType { + public static String create() { + return DefaultInstances.STRING; + } + + @Override + public Code getCode() { + return Code.STRING; + } + + @Override + public java.lang.String toString() { + return getCode().name(); + } + } + + @AutoValue + abstract class Int64 implements Type, SqlType { + public static Int64 create() { + return DefaultInstances.INT64; + } + + @Override + public Code getCode() { + return Code.INT64; + } + + @Override + public java.lang.String toString() { + return getCode().name(); + } + } + + @AutoValue + abstract class Float64 implements Type, SqlType { + public static Float64 create() { + return DefaultInstances.FLOAT64; + } + + @Override + public Code getCode() { + return Code.FLOAT64; + } + + @Override + public java.lang.String toString() { + return getCode().name(); + } + } + + @AutoValue + abstract class Float32 implements Type, SqlType { + public static Float32 create() { + return DefaultInstances.FLOAT32; + } + + @Override + public Code getCode() { + return Code.FLOAT32; + } + + @Override + public java.lang.String toString() { + return getCode().name(); + } + } + + @AutoValue + abstract class Bool implements Type, SqlType { + public static Bool create() { + return DefaultInstances.BOOL; + } + + @Override + public Code getCode() { + return Code.BOOL; + } + + @Override + public java.lang.String toString() { + return getCode().name(); + } + } + + @AutoValue + abstract class Timestamp implements Type, SqlType { + public static Timestamp create() { + return DefaultInstances.TIMESTAMP; + } + + @Override + public Code getCode() { + return Code.TIMESTAMP; + } + + @Override + public java.lang.String toString() { + return getCode().name(); + } + } + + @AutoValue + abstract class Date implements Type, SqlType { + public static Date create() { + return DefaultInstances.DATE; + } + + @Override + public Code getCode() { + return Code.DATE; + } + + @Override + public java.lang.String toString() { + return getCode().name(); + } + } + + /** + * This is a special version of struct that is intended to only be used in the {@link + * com.google.cloud.bigtable.data.v2.models.sql.StructReader} getters that require types. We don't + * want users to need to specify the struct schema when the schema will be validated on calls to + * {@link com.google.cloud.bigtable.data.v2.models.sql.StructReader} methods on the struct. + * + *

    Any attempts to interact with the schema will throw an exception. + * + *

    For example the historical map data type uses this as follows: + * + *

    {@code
    +   * Map> historicalMap =
    +   *     resultSet.getMap(
    +   *        "cf",
    +   *        SqlType.mapOf(SqlType.bytes(), SqlType.arrayOf(SqlType.struct())));
    +   * Struct struct = historicalMap.get("column").get(0);
    +   * // Struct schema will be validated here so there's no need for users to pass the schema to getMap above
    +   * ByteString value = struct.getBytes("value");
    +   * }
    + */ + @AutoValue + abstract class SchemalessStruct implements Type, SqlType.Struct { + public static SchemalessStruct create() { + return DefaultInstances.SCHEMALESS_STRUCT; + } + + @Override + public Code getCode() { + return Code.STRUCT; + } + + @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."); + } + + @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."); + } + + @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."); + } + + @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."); + } + + @Override + public java.lang.String toString() { + return getCode().name(); + } + } + + /** + * Struct implementation that contains a schema that users can access. This should never be + * constructed by users. It is only intended to be created directly from Type protobufs. + */ + class StructWithSchema extends ColumnToIndexMapper implements Type, SqlType.Struct { + + private final List fields; + + @InternalApi("Visible for testing") + public StructWithSchema(List fields) { + super(fields); + this.fields = fields; + } + + @InternalApi("Visible for testing") + @AutoValue + public abstract static class Field implements SqlType.Struct.Field { + public static Field fromProto(com.google.bigtable.v2.Type.Struct.Field proto) { + return new AutoValue_Type_StructWithSchema_Field( + proto.getFieldName(), SqlType.fromProto(proto.getType())); + } + + @Override + public abstract java.lang.String name(); + + @Override + public abstract SqlType type(); + } + + public static StructWithSchema fromProto(com.google.bigtable.v2.Type.Struct proto) { + ImmutableList.Builder fields = ImmutableList.builder(); + for (com.google.bigtable.v2.Type.Struct.Field protoField : proto.getFieldsList()) { + fields.add(Field.fromProto(protoField)); + } + return new StructWithSchema(fields.build()); + } + + @Override + public Code getCode() { + return Code.STRUCT; + } + + @Override + public List getFields() { + return fields; + } + + @Override + public SqlType getType(int fieldIndex) { + return fields.get(fieldIndex).type(); + } + + @Override + public SqlType getType(java.lang.String fieldName) { + int index = getColumnIndex(fieldName); + return getType(index); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null || getClass() != obj.getClass()) { + return false; + } + StructWithSchema struct = (StructWithSchema) obj; + // Everything is derived from fields so that's all we need to compare; + return Objects.equal(getFields(), struct.getFields()); + } + + @Override + public int hashCode() { + // Everything is derived from fields so that's all we need; + return Objects.hashCode(fields); + } + + @Override + public java.lang.String toString() { + return getCode().name() + "{fields=" + fields.toString() + "}"; + } + } + + @AutoValue + abstract class Array implements Type, SqlType.Array { + // Do we need non-sql type array elements? Might get messy + public static Type.Array create(SqlType elemType) { + return new AutoValue_Type_Array<>(elemType); + } + + protected abstract SqlType elementType(); + + @Override + public Code getCode() { + return Code.ARRAY; + } + + @Override + public SqlType getElementType() { + return elementType(); + } + + @Override + public java.lang.String toString() { + return getCode().name() + "{elementType=" + getElementType().getCode() + "}"; + } + } + + @AutoValue + abstract class Map implements Type, SqlType.Map { + // Same question as for array + public static Type.Map create(SqlType keyType, SqlType valueType) { + return new AutoValue_Type_Map<>(keyType, valueType); + } + + protected abstract SqlType keyType(); + + protected abstract SqlType valueType(); + + @Override + public Code getCode() { + return Code.MAP; + } + + @Override + public SqlType getKeyType() { + return keyType(); + } + + @Override + public SqlType getValueType() { + return valueType(); + } + + @Override + public java.lang.String toString() { + return getCode().name() + + "{keyType=" + + getKeyType().toString() + + ", valueType=" + + getValueType().toString() + + "}"; + } + } + + // 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(); + private static final Float64 FLOAT64 = new AutoValue_Type_Float64(); + private static final Float32 FLOAT32 = new AutoValue_Type_Float32(); + private static final Bool BOOL = new AutoValue_Type_Bool(); + private static final Timestamp TIMESTAMP = new AutoValue_Type_Timestamp(); + private static final Date DATE = new AutoValue_Type_Date(); + private static final SchemalessStruct SCHEMALESS_STRUCT = new AutoValue_Type_SchemalessStruct(); + } +} 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 8f08f82d8a..fa6b14c2cb 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 @@ -30,6 +30,10 @@ 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; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; @@ -47,11 +51,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.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; @@ -1275,6 +1285,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. @@ -1310,6 +1367,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 @@ -2610,6 +2707,65 @@ public void readChangeStreamAsync( return stub.readChangeStreamCallable(); } + /** + * 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]";
    +   *   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 {@link PreparedStatement} & {@link BoundStatement} for query options. + */ + public ResultSet executeQuery(BoundStatement boundStatement) { + boundStatement.assertUsingSameStub(stub); + SqlServerStream stream = stub.executeQueryCallable().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..cddea20c7d 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,10 @@ 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.stub.BigtableClientContext; 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; /** @@ -66,11 +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; /** * Create a instance of this factory. @@ -80,30 +74,16 @@ 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); + BigtableClientContext sharedClientContext = + EnhancedBigtableStub.createBigtableClientContext(defaultSettings.getStubSettings()); + + return new BigtableDataClientFactory(sharedClientContext, defaultSettings); } private BigtableDataClientFactory( - ClientContext sharedClientContext, - BigtableDataSettings defaultSettings, - OpenTelemetry openTelemetry) { + BigtableClientContext sharedClientContext, BigtableDataSettings defaultSettings) { this.sharedClientContext = sharedClientContext; this.defaultSettings = defaultSettings; - this.openTelemetry = openTelemetry; } /** @@ -113,9 +93,7 @@ private BigtableDataClientFactory( */ @Override public void close() throws Exception { - for (BackgroundResource resource : sharedClientContext.getBackgroundResources()) { - resource.close(); - } + sharedClientContext.close(); } /** @@ -130,11 +108,10 @@ public void close() throws Exception { public BigtableDataClient createDefault() { try { ClientContext clientContext = - sharedClientContext - .toBuilder() + sharedClientContext.getClientContext().toBuilder() .setTracerFactory( EnhancedBigtableStub.createBigtableTracerFactory( - defaultSettings.getStubSettings(), openTelemetry)) + defaultSettings.getStubSettings(), sharedClientContext.getOpenTelemetry())) .build(); return BigtableDataClient.createWithClientContext(defaultSettings, clientContext); @@ -159,11 +136,10 @@ public BigtableDataClient createForAppProfile(@Nonnull String appProfileId) thro defaultSettings.toBuilder().setAppProfileId(appProfileId).build(); ClientContext clientContext = - sharedClientContext - .toBuilder() + sharedClientContext.getClientContext().toBuilder() .setTracerFactory( EnhancedBigtableStub.createBigtableTracerFactory( - settings.getStubSettings(), openTelemetry)) + settings.getStubSettings(), sharedClientContext.getOpenTelemetry())) .build(); return BigtableDataClient.createWithClientContext(settings, clientContext); } @@ -180,19 +156,17 @@ public BigtableDataClient createForAppProfile(@Nonnull String appProfileId) thro public BigtableDataClient createForInstance(@Nonnull String projectId, @Nonnull String instanceId) throws IOException { BigtableDataSettings settings = - defaultSettings - .toBuilder() + defaultSettings.toBuilder() .setProjectId(projectId) .setInstanceId(instanceId) .setDefaultAppProfileId() .build(); ClientContext clientContext = - sharedClientContext - .toBuilder() + sharedClientContext.getClientContext().toBuilder() .setTracerFactory( EnhancedBigtableStub.createBigtableTracerFactory( - settings.getStubSettings(), openTelemetry)) + settings.getStubSettings(), sharedClientContext.getOpenTelemetry())) .build(); return BigtableDataClient.createWithClientContext(settings, clientContext); @@ -211,18 +185,16 @@ public BigtableDataClient createForInstance( @Nonnull String projectId, @Nonnull String instanceId, @Nonnull String appProfileId) throws IOException { BigtableDataSettings settings = - defaultSettings - .toBuilder() + defaultSettings.toBuilder() .setProjectId(projectId) .setInstanceId(instanceId) .setAppProfileId(appProfileId) .build(); ClientContext clientContext = - sharedClientContext - .toBuilder() + sharedClientContext.getClientContext().toBuilder() .setTracerFactory( EnhancedBigtableStub.createBigtableTracerFactory( - settings.getStubSettings(), openTelemetry)) + settings.getStubSettings(), sharedClientContext.getOpenTelemetry())) .build(); return BigtableDataClient.createWithClientContext(settings, clientContext); } 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..b8a514433f 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}. @@ -127,14 +127,18 @@ public static Builder newBuilderForEmulator(String hostname, int port) { .setEndpoint(hostname + ":" + port) // disable channel refreshing when creating an emulator .setRefreshingChannel(false) + .setMetricsProvider(NoopMetricsProvider.INSTANCE) // disable exporting metrics for emulator + .disableInternalMetrics() .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 + .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); @@ -142,6 +146,7 @@ public static Builder newBuilderForEmulator(String hostname, int port) { } /** + * @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 @@ -175,7 +180,7 @@ public static Builder newBuilderForEmulator(String hostname, int port) { * 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 +189,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 +298,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 +326,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. * @@ -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 495762d219..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 @@ -13,6 +13,9 @@ "CheckAndMutateRow": { "methods": ["checkAndMutateRow", "checkAndMutateRow", "checkAndMutateRow", "checkAndMutateRow", "checkAndMutateRow", "checkAndMutateRowCallable"] }, + "ExecuteQuery": { + "methods": ["executeQueryCallable"] + }, "GenerateInitialChangeStreamPartitions": { "methods": ["generateInitialChangeStreamPartitionsCallable"] }, @@ -25,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 new file mode 100644 index 0000000000..953db55182 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/AbstractProtoStructReader.java @@ -0,0 +1,334 @@ +/* + * 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.bigtable.v2.Value; +import com.google.bigtable.v2.Value.KindCase; +import com.google.cloud.Date; +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.models.sql.StructReader; +import com.google.common.base.Preconditions; +import com.google.protobuf.ByteString; +import java.time.Instant; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@InternalApi +public abstract class AbstractProtoStructReader implements StructReader { + + abstract List values(); + + // Force subclasses to override equals and hashcode. We need this for tests. + public abstract boolean equals(Object other); + + public abstract int hashCode(); + + /** + * @param columnName name of the column + * @return the index of the column named {@code columnName} + * @throws IllegalArgumentException if there is not exactly one column with the given name + */ + public abstract int getColumnIndex(String columnName); + + /** + * @param columnIndex index of the column + * @return the type of the column at the given index + */ + public abstract SqlType getColumnType(int columnIndex); + + /** + * @param columnName name of the column + * @return the type of the column with the given name + * @throws IllegalArgumentException if there is not exactly one column with the given name + */ + public SqlType getColumnType(String columnName) { + return getColumnType(getColumnIndex(columnName)); + } + + @Override + public boolean isNull(int columnIndex) { + Value value = values().get(columnIndex); + return value.getKindCase().equals(KindCase.KIND_NOT_SET); + } + + @Override + public boolean isNull(String columnName) { + return isNull(getColumnIndex(columnName)); + } + + @Override + public ByteString getBytes(int columnIndex) { + checkNonNullOfType(columnIndex, SqlType.bytes(), columnIndex); + Value value = values().get(columnIndex); + return value.getBytesValue(); + } + + @Override + public ByteString getBytes(String columnName) { + int columnIndex = getColumnIndex(columnName); + checkNonNullOfType(columnIndex, SqlType.bytes(), columnName); + Value value = values().get(columnIndex); + return value.getBytesValue(); + } + + @Override + public String getString(int columnIndex) { + checkNonNullOfType(columnIndex, SqlType.string(), columnIndex); + Value value = values().get(columnIndex); + return value.getStringValue(); + } + + @Override + public String getString(String columnName) { + int columnIndex = getColumnIndex(columnName); + checkNonNullOfType(columnIndex, SqlType.string(), columnName); + Value value = values().get(columnIndex); + return value.getStringValue(); + } + + @Override + public long getLong(int columnIndex) { + checkNonNullOfType(columnIndex, SqlType.int64(), columnIndex); + Value value = values().get(columnIndex); + return value.getIntValue(); + } + + @Override + public long getLong(String columnName) { + int columnIndex = getColumnIndex(columnName); + checkNonNullOfType(columnIndex, SqlType.int64(), columnName); + Value value = values().get(columnIndex); + return value.getIntValue(); + } + + @Override + public double getDouble(int columnIndex) { + checkNonNullOfType(columnIndex, SqlType.float64(), columnIndex); + Value value = values().get(columnIndex); + return value.getFloatValue(); + } + + @Override + public double getDouble(String columnName) { + int columnIndex = getColumnIndex(columnName); + checkNonNullOfType(columnIndex, SqlType.float64(), columnName); + Value value = values().get(columnIndex); + return value.getFloatValue(); + } + + @Override + public float getFloat(int columnIndex) { + checkNonNullOfType(columnIndex, SqlType.float32(), columnIndex); + Value value = values().get(columnIndex); + return (float) value.getFloatValue(); + } + + @Override + public float getFloat(String columnName) { + int columnIndex = getColumnIndex(columnName); + checkNonNullOfType(columnIndex, SqlType.float32(), columnName); + Value value = values().get(columnIndex); + return (float) value.getFloatValue(); + } + + @Override + public boolean getBoolean(int columnIndex) { + checkNonNullOfType(columnIndex, SqlType.bool(), columnIndex); + Value value = values().get(columnIndex); + return value.getBoolValue(); + } + + @Override + public boolean getBoolean(String columnName) { + int columnIndex = getColumnIndex(columnName); + checkNonNullOfType(columnIndex, SqlType.bool(), columnName); + Value value = values().get(columnIndex); + return value.getBoolValue(); + } + + @Override + public Instant getTimestamp(int columnIndex) { + checkNonNullOfType(columnIndex, SqlType.timestamp(), columnIndex); + Value value = values().get(columnIndex); + return TimestampUtil.toInstant(value.getTimestampValue()); + } + + @Override + public Instant getTimestamp(String columnName) { + int columnIndex = getColumnIndex(columnName); + checkNonNullOfType(columnIndex, SqlType.timestamp(), columnName); + Value value = values().get(columnIndex); + return TimestampUtil.toInstant(value.getTimestampValue()); + } + + @Override + public Date getDate(int columnIndex) { + checkNonNullOfType(columnIndex, SqlType.date(), columnIndex); + Value value = values().get(columnIndex); + return fromProto(value.getDateValue()); + } + + @Override + public Date getDate(String columnName) { + int columnIndex = getColumnIndex(columnName); + checkNonNullOfType(columnIndex, SqlType.date(), columnName); + Value value = values().get(columnIndex); + return fromProto(value.getDateValue()); + } + + @Override + public Struct getStruct(int columnIndex) { + checkNonNullOfType(columnIndex, SqlType.struct(), columnIndex); + Value value = values().get(columnIndex); + SqlType.Struct schema = (SqlType.Struct) getColumnType(columnIndex); + // A struct value is represented as an array + return ProtoStruct.create(schema, value.getArrayValue()); + } + + @Override + public Struct getStruct(String columnName) { + int columnIndex = getColumnIndex(columnName); + checkNonNullOfType(columnIndex, SqlType.struct(), columnName); + Value value = values().get(columnIndex); + SqlType.Struct schema = (SqlType.Struct) getColumnType(columnIndex); + // A struct value is represented as an array + return ProtoStruct.create(schema, value.getArrayValue()); + } + + @Override + public List getList(int columnIndex, SqlType.Array arrayType) { + // Note it is important that we use the actualType to decode bc user passed struct types + // won't have schemas + SqlType actualType = getColumnType(columnIndex); + checkNonNullOfType(columnIndex, arrayType, actualType, columnIndex); + Value value = values().get(columnIndex); + return (List) decodeValue(value, actualType); + } + + @Override + public List getList(String columnName, SqlType.Array arrayType) { + int columnIndex = getColumnIndex(columnName); + // Note it is important that we use the actualType to decode bc user passed struct types + // won't have schemas + SqlType actualType = getColumnType(columnIndex); + checkNonNullOfType(columnIndex, arrayType, actualType, columnName); + Value value = values().get(columnIndex); + return (List) decodeValue(value, actualType); + } + + @Override + public Map getMap(int columnIndex, SqlType.Map mapType) { + // Note it is important that we use the actualType to decode bc user passed struct types + // won't have schemas + SqlType actualType = getColumnType(columnIndex); + checkNonNullOfType(columnIndex, mapType, actualType, columnIndex); + Value value = values().get(columnIndex); + return (Map) decodeValue(value, actualType); + } + + @Override + public Map getMap(String columnName, SqlType.Map mapType) { + int columnIndex = getColumnIndex(columnName); + // Note it is important that we use the actualType to decode bc user passed struct types + // won't have schemas + SqlType actualType = getColumnType(columnIndex); + checkNonNullOfType(columnIndex, mapType, actualType, columnName); + Value value = values().get(columnIndex); + return (Map) decodeValue(value, actualType); + } + + Object decodeValue(Value value, SqlType type) { + if (value.getKindCase().equals(KindCase.KIND_NOT_SET)) { + return null; + } + switch (type.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 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 ARRAY: + ArrayList listBuilder = new ArrayList<>(); + SqlType.Array arrayType = (SqlType.Array) type; + SqlType elemType = arrayType.getElementType(); + for (Value elem : value.getArrayValue().getValuesList()) { + listBuilder.add(decodeValue(elem, elemType)); + } + // We use unmodifiableList instead of guava ImmutableList to allow null elements + return Collections.unmodifiableList(listBuilder); + case MAP: + HashMap mapBuilder = new HashMap<>(); + SqlType.Map mapType = (SqlType.Map) type; + SqlType keyType = mapType.getKeyType(); + SqlType valType = mapType.getValueType(); + // A map value is represented as an array of k, v tuples where the tuple is a nested array + for (Value entry : value.getArrayValue().getValuesList()) { + Object key = decodeValue(entry.getArrayValue().getValues(0), keyType); + Object val = decodeValue(entry.getArrayValue().getValues(1), valType); + mapBuilder.put(key, val); + } + // We use unmodifiableMap instead of guava ImmutableMap to allow null keys & values + return Collections.unmodifiableMap(mapBuilder); + default: + // We should have already thrown an exception in the SqlRowMerger + throw new IllegalStateException("Unrecognized type: " + type); + } + } + + private void checkNonNullOfType( + int columnIndex, SqlType expectedType, Object columnNameForError) { + SqlType actualType = getColumnType(columnIndex); + checkNonNullOfType(columnIndex, expectedType, actualType, columnNameForError); + } + + private void checkNonNullOfType( + int columnIndex, SqlType expectedType, SqlType actualType, Object columnNameForError) { + Preconditions.checkState( + SqlType.typesMatch(expectedType, actualType), + "Column %s is not of correct type: expected %s but was %s", + columnNameForError, + expectedType.toString(), + actualType.toString()); + if (isNull(columnIndex)) { + throw new NullPointerException("Column " + columnNameForError + " contains NULL value"); + } + } + + 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/ColumnMetadataImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ColumnMetadataImpl.java new file mode 100644 index 0000000000..966cca5e60 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ColumnMetadataImpl.java @@ -0,0 +1,38 @@ +/* + * 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 com.google.cloud.bigtable.data.v2.models.sql.ColumnMetadata; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; + +/** + * Implementation of {@link ColumnMetadata} using AutoValue + * + *

    This is considered an internal implementation detail and not meant to be used by applications. + */ +@InternalApi("For internal use only") +@AutoValue +public abstract class ColumnMetadataImpl implements ColumnMetadata { + public static ColumnMetadata create(String name, SqlType type) { + return new AutoValue_ColumnMetadataImpl(name, type); + } + + static ColumnMetadata fromProto(com.google.bigtable.v2.ColumnMetadata proto) { + return create(proto.getName(), SqlType.fromProto(proto.getType())); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ColumnToIndexMapper.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ColumnToIndexMapper.java new file mode 100644 index 0000000000..aec1c5897c --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ColumnToIndexMapper.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.internal; + +import com.google.api.core.InternalApi; +import com.google.cloud.bigtable.data.v2.models.sql.ColumnMetadata; +import com.google.common.collect.ImmutableMap; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * This is an internal helper to share the index to column name lookup and the handling of ambiguous + * columns described below for Rows and Structs + */ +@InternalApi +public abstract class ColumnToIndexMapper { + // It is valid for a select query to return columns with the same name. This marker is used + // internally in the client to designate that getting a value by column name is invalid and will + // be converted into an exception. + private static final int AMBIGUOUS_FIELD_MARKER = -1; + + private Map columnNameMapping; + + protected ColumnToIndexMapper(List columns) { + columnNameMapping = buildColumnNameMapping(columns); + } + + public int getColumnIndex(String columnName) { + Integer index = columnNameMapping.get(columnName); + if (index == null) { + throw new IllegalArgumentException("Column name not found: " + columnName); + } + int unboxedIndex = index; + if (unboxedIndex == AMBIGUOUS_FIELD_MARKER) { + throw new IllegalArgumentException( + "Ambiguous column name: " + columnName + ". Same name is used for multiple columns."); + } + return unboxedIndex; + } + + private Map buildColumnNameMapping(List columns) { + HashMap mapping = new HashMap<>(columns.size()); + for (int i = 0; i < columns.size(); i++) { + String columnName = columns.get(i).name(); + if (mapping.containsKey(columnName)) { + mapping.put(columnName, AMBIGUOUS_FIELD_MARKER); + } else { + mapping.put(columnName, i); + } + } + return ImmutableMap.copyOf(mapping); + } +} 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..575298b5c6 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; @@ -53,6 +56,11 @@ public static String formatAuthorizedViewName( return formatTableName(projectId, instanceId, tableId) + "/authorizedViews/" + authorizedViewId; } + public static String formatMaterializedViewName( + @Nonnull String projectId, @Nonnull String instanceId, @Nonnull String materializedViewId) { + return formatInstanceName(projectId, instanceId) + "/materializedViews/" + materializedViewId; + } + public static String extractTableIdFromTableName(@Nonnull String fullTableName) { Matcher matcher = TABLE_PATTERN.matcher(fullTableName); if (!matcher.matches()) { @@ -88,31 +96,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..2e5c0d44cd --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/PreparedStatementImpl.java @@ -0,0 +1,286 @@ +/* + * 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.BoundStatement.Builder; +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 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 new file mode 100644 index 0000000000..45542d96e6 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ProtoResultSetMetadata.java @@ -0,0 +1,103 @@ +/* + * 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.bigtable.v2.ProtoSchema; +import com.google.bigtable.v2.ResultSetMetadata.SchemaCase; +import com.google.bigtable.v2.Type; +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; +import javax.annotation.Nullable; + +/** + * Implementation of {@link ResultSetMetadata} using an underlying protobuf schema. + * + *

    This is considered an internal implementation detail and not meant to be used by applications. + */ +@InternalApi +public class ProtoResultSetMetadata extends ColumnToIndexMapper implements ResultSetMetadata { + private final List columns; + + public static ResultSetMetadata create(List columns) { + return new ProtoResultSetMetadata(columns); + } + + private ProtoResultSetMetadata(List columns) { + super(columns); + this.columns = ImmutableList.copyOf(columns); + } + + @Override + public List getColumns() { + return columns; + } + + @Override + public SqlType getColumnType(int columnIndex) { + return columns.get(columnIndex).type(); + } + + @Override + public SqlType getColumnType(String columnName) { + return getColumnType(getColumnIndex(columnName)); + } + + @InternalApi + public static ResultSetMetadata fromProto(com.google.bigtable.v2.ResultSetMetadata proto) { + Preconditions.checkState( + proto.getSchemaCase().equals(SchemaCase.PROTO_SCHEMA), + "Unsupported schema type: %s", + proto.getSchemaCase().name()); + ProtoSchema schema = proto.getProtoSchema(); + validateSchema(schema); + ImmutableList.Builder columnsBuilder = ImmutableList.builder(); + for (com.google.bigtable.v2.ColumnMetadata protoColumn : schema.getColumnsList()) { + columnsBuilder.add(ColumnMetadataImpl.fromProto(protoColumn)); + } + return create(columnsBuilder.build()); + } + + private static void validateSchema(ProtoSchema schema) { + List columns = schema.getColumnsList(); + Preconditions.checkState(!columns.isEmpty(), "columns cannot be empty"); + for (com.google.bigtable.v2.ColumnMetadata column : columns) { + Preconditions.checkState( + column.getType().getKindCase() != Type.KindCase.KIND_NOT_SET, + "Column type cannot be empty"); + } + } + + @Override + public boolean equals(@Nullable Object other) { + if (other instanceof ProtoResultSetMetadata) { + ProtoResultSetMetadata o = (ProtoResultSetMetadata) other; + // columnNameMapping is derived from columns, so we only need to compare columns + return columns.equals(o.columns); + } + 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/ProtoSqlRow.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ProtoSqlRow.java new file mode 100644 index 0000000000..3a63fe089a --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ProtoSqlRow.java @@ -0,0 +1,50 @@ +/* + * 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 com.google.bigtable.v2.Value; +import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import java.util.List; + +@InternalApi +@AutoValue +public abstract class ProtoSqlRow extends AbstractProtoStructReader implements SqlRow { + /** + * Creates a new SqlRow + * + * @param metadata the {@link ResultSetMetadata} for the results + * @param values list of the values for each column + */ + public static ProtoSqlRow create(ResultSetMetadata metadata, List values) { + return new AutoValue_ProtoSqlRow(values, metadata); + } + + /** {@link ResultSetMetadata} describing the schema of the row. */ + abstract ResultSetMetadata metadata(); + + @Override + public int getColumnIndex(String columnName) { + return metadata().getColumnIndex(columnName); + } + + @Override + public SqlType getColumnType(int columnIndex) { + return metadata().getColumnType(columnIndex); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ProtoStruct.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ProtoStruct.java new file mode 100644 index 0000000000..f9da3ef9fb --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ProtoStruct.java @@ -0,0 +1,58 @@ +/* + * 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 com.google.bigtable.v2.ArrayValue; +import com.google.bigtable.v2.Value; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import com.google.cloud.bigtable.data.v2.models.sql.Struct; +import java.util.List; + +/** + * Implementation of a {@link Struct} backed by protobuf {@link Value}s. + * + *

    This is considered an internal implementation detail and not meant to be used by applications. + */ +@InternalApi("For internal use only") +@AutoValue +public abstract class ProtoStruct extends AbstractProtoStructReader implements Struct { + + @InternalApi + static ProtoStruct create(SqlType.Struct type, ArrayValue fieldValues) { + return new AutoValue_ProtoStruct(type, fieldValues); + } + + protected abstract SqlType.Struct type(); + + protected abstract ArrayValue fieldValues(); + + @Override + List values() { + return fieldValues().getValuesList(); + } + + @Override + public int getColumnIndex(String columnName) { + return type().getColumnIndex(columnName); + } + + @Override + public SqlType getColumnType(int columnIndex) { + return type().getType(columnIndex); + } +} 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..a838b4fb51 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 @@ -40,6 +40,7 @@ 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/ResultSetImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ResultSetImpl.java new file mode 100644 index 0000000000..53044c3b37 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ResultSetImpl.java @@ -0,0 +1,218 @@ +/* + * 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.ApiFuture; +import com.google.api.core.InternalApi; +import com.google.api.gax.rpc.ApiExceptions; +import com.google.api.gax.rpc.ServerStream; +import com.google.cloud.Date; +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.models.sql.Struct; +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.ByteString; +import java.time.Instant; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +/** + * The primary implementation of a ResultSet. + * + *

    This passes through StructReader calls to each row rather than implementing + * AbstractProtoStructReader directly so that it can support different types of rows in the future. + * + *

    This is considered an internal implementation detail and not meant to be used by applications. + */ +@InternalApi("For internal use only") +public class ResultSetImpl implements ResultSet, StructReader { + + private final ServerStream serverStream; + private final Iterator rowIterator; + private final ApiFuture metadataApiFuture; + private boolean consumed; + private SqlRow currentRow; + + public static ResultSet create(SqlServerStream sqlServerStream) { + return new ResultSetImpl(sqlServerStream); + } + + private ResultSetImpl(SqlServerStream sqlServerStream) { + this.serverStream = sqlServerStream.rows(); + this.rowIterator = serverStream.iterator(); + this.metadataApiFuture = sqlServerStream.metadataFuture(); + this.consumed = false; + } + + private SqlRow getCurrentRow() { + Preconditions.checkState(!consumed, "Attempted to access data from closed ResultSet"); + Preconditions.checkState(currentRow != null, "Attempted to access data before calling next()"); + return currentRow; + } + + @Override + public boolean next() { + if (consumed) { + return false; + } + boolean hasNext = rowIterator.hasNext(); + if (hasNext) { + currentRow = rowIterator.next(); + } else { + consumed = true; + } + return hasNext; + } + + @Override + public ResultSetMetadata getMetadata() { + return ApiExceptions.callAndTranslateApiException(metadataApiFuture); + } + + @Override + public void close() { + // If the stream has been consumed we don't want to cancel because it could + // cancel the request before it receives response trailers. + if (!consumed) { + serverStream.cancel(); + } + consumed = true; + } + + @Override + public boolean isNull(int columnIndex) { + return getCurrentRow().isNull(columnIndex); + } + + @Override + public boolean isNull(String columnName) { + return getCurrentRow().isNull(columnName); + } + + @Override + public ByteString getBytes(int columnIndex) { + return getCurrentRow().getBytes(columnIndex); + } + + @Override + public ByteString getBytes(String columnName) { + return getCurrentRow().getBytes(columnName); + } + + @Override + public String getString(int columnIndex) { + return getCurrentRow().getString(columnIndex); + } + + @Override + public String getString(String columnName) { + return getCurrentRow().getString(columnName); + } + + @Override + public long getLong(int columnIndex) { + return getCurrentRow().getLong(columnIndex); + } + + @Override + public long getLong(String columnName) { + return getCurrentRow().getLong(columnName); + } + + @Override + public double getDouble(int columnIndex) { + return getCurrentRow().getDouble(columnIndex); + } + + @Override + public double getDouble(String columnName) { + return getCurrentRow().getDouble(columnName); + } + + @Override + public float getFloat(int columnIndex) { + return getCurrentRow().getFloat(columnIndex); + } + + @Override + public float getFloat(String columnName) { + return getCurrentRow().getFloat(columnName); + } + + @Override + public boolean getBoolean(int columnIndex) { + return getCurrentRow().getBoolean(columnIndex); + } + + @Override + public boolean getBoolean(String columnName) { + return getCurrentRow().getBoolean(columnName); + } + + @Override + public Instant getTimestamp(int columnIndex) { + return getCurrentRow().getTimestamp(columnIndex); + } + + @Override + public Instant getTimestamp(String columnName) { + return getCurrentRow().getTimestamp(columnName); + } + + @Override + public Date getDate(int columnIndex) { + return getCurrentRow().getDate(columnIndex); + } + + @Override + public Date getDate(String columnName) { + return getCurrentRow().getDate(columnName); + } + + @Override + public Struct getStruct(int columnIndex) { + return getCurrentRow().getStruct(columnIndex); + } + + @Override + public Struct getStruct(String columnName) { + return getCurrentRow().getStruct(columnName); + } + + @Override + public List getList(int columnIndex, SqlType.Array arrayType) { + return getCurrentRow().getList(columnIndex, arrayType); + } + + @Override + public List getList(String columnName, SqlType.Array arrayType) { + return getCurrentRow().getList(columnName, arrayType); + } + + @Override + public Map getMap(int columnIndex, SqlType.Map mapType) { + return getCurrentRow().getMap(columnIndex, mapType); + } + + @Override + public Map getMap(String columnName, SqlType.Map mapType) { + return getCurrentRow().getMap(columnName, mapType); + } +} 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..a0d079e240 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 != null && !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,40 @@ 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; + + // if end key is on the left of large row key, don't split + if (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 (ByteStringComparator.INSTANCE.compare(endKey, largeRowKey) > 0) { + 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/SqlRow.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/SqlRow.java new file mode 100644 index 0000000000..6ddde59155 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/SqlRow.java @@ -0,0 +1,24 @@ +/* + * 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.cloud.bigtable.data.v2.models.sql.StructReader; +import java.io.Serializable; + +/** Internal implementation detail that provides access to row data for SQL requests. */ +@InternalApi +public interface SqlRow extends StructReader, Serializable {} 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 new file mode 100644 index 0000000000..90631f3bbd --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/SqlRowMergerUtil.java @@ -0,0 +1,70 @@ +/* + * 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.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; + +/** + * Wrapper around {@link SqlRowMerger} that provides an easy way to transform a set of + * ExecuteQueryResponses into rows. Must create a new instance per ExecuteQueryRequest, and pass in + * the response stream of ExecuteQueryResponses in the order they were received. + */ +@InternalApi("For internal use only") +@BetaApi +public class SqlRowMergerUtil implements AutoCloseable { + + private final SqlRowMerger merger; + + public SqlRowMergerUtil(ResultSetMetadata metadata) { + merger = new SqlRowMerger(() -> ProtoResultSetMetadata.fromProto(metadata)); + } + + @Override + public void close() { + if (merger.hasPartialFrame()) { + throw new IllegalStateException("Tried to close SqlRowMerger with unconsumed partial data"); + } + } + + /** + * Transforms a list of {@link ExecuteQueryResponse} objects into a list of {@link + * com.google.cloud.bigtable.data.v2.internal.ProtoSqlRow} objects . The first call must contain + * the ResultSetMetadata as the first ExecuteQueryResponse. This will return any complete {@link + * com.google.cloud.bigtable.data.v2.internal.ProtoSqlRow}s from the given responses and buffer + * partial rows waiting for the next ExecuteQueryResponse. + * + * @param responses List of {@link ExecuteQueryResponse} for a query + * @return a list of the complete {@link com.google.cloud.bigtable.data.v2.internal.ProtoSqlRow}s + * that have been merged from the given responses. + */ + public List parseExecuteQueryResponses(ImmutableList responses) { + ImmutableList.Builder rows = new ImmutableList.Builder<>(); + + for (ExecuteQueryResponse response : responses) { + merger.push(response); + while (merger.hasFullFrame()) { + rows.add(merger.pop()); + } + } + return rows.build(); + } +} 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/models/AuthorizedViewId.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/AuthorizedViewId.java index 5f64190b5c..27b3819111 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 @@ -52,4 +52,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..1233589104 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)); 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 3a2d938e31..838a7ec62f 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 @@ -145,7 +159,7 @@ abstract static class Builder { abstract Builder setSourceClusterId(@Nonnull String sourceClusterId); - abstract Builder setCommitTimestamp(Instant commitTimestamp); + abstract Builder setCommitTime(java.time.Instant commitTimestamp); abstract Builder setTieBreaker(int tieBreaker); @@ -153,7 +167,7 @@ abstract static class Builder { abstract Builder setToken(@Nonnull String token); - abstract Builder setEstimatedLowWatermark(Instant estimatedLowWatermark); + abstract Builder setEstimatedLowWatermarkTime(java.time.Instant estimatedLowWatermark); Builder setCell( @Nonnull String familyName, @@ -182,6 +196,11 @@ Builder addToCell(@Nonnull String familyName, Value qualifier, Value timestamp, return this; } + Builder mergeToCell(@Nonnull String familyName, Value qualifier, Value timestamp, Value input) { + this.entriesBuilder().add(MergeToCell.create(familyName, qualifier, timestamp, input)); + return this; + } + abstract ChangeStreamMutation build(); } @@ -210,6 +229,13 @@ public RowMutation toRowMutation(@Nonnull String tableId) { addToCell.getQualifier(), addToCell.getTimestamp(), addToCell.getInput()); + } else if (entry instanceof MergeToCell) { + MergeToCell mergeToCell = (MergeToCell) entry; + rowMutation.mergeToCell( + mergeToCell.getFamily(), + mergeToCell.getQualifier(), + mergeToCell.getTimestamp(), + mergeToCell.getInput()); } else { throw new IllegalArgumentException("Unexpected Entry type."); } @@ -242,6 +268,13 @@ public RowMutationEntry toRowMutationEntry() { addToCell.getQualifier(), addToCell.getTimestamp(), addToCell.getInput()); + } else if (entry instanceof MergeToCell) { + MergeToCell mergeToCell = (MergeToCell) entry; + rowMutationEntry.mergeToCell( + mergeToCell.getFamily(), + mergeToCell.getQualifier(), + mergeToCell.getTimestamp(), + mergeToCell.getInput()); } else { throw new IllegalArgumentException("Unexpected Entry type."); } 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 0fbe786753..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 @@ -141,6 +141,12 @@ void addToCell( @Nonnull Value timestamp, @Nonnull Value value); + void mergeToCell( + @Nonnull String familyName, + @Nonnull Value qualifier, + @Nonnull Value timestamp, + @Nonnull Value value); + /** * Called to start a SetCell. * 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 a6335f4076..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); } @@ -142,6 +142,15 @@ public void addToCell( this.changeStreamMutationBuilder.addToCell(familyName, qualifier, timestamp, input); } + @Override + public void mergeToCell( + @Nonnull String familyName, + @Nonnull Value qualifier, + @Nonnull Value timestamp, + @Nonnull Value input) { + this.changeStreamMutationBuilder.mergeToCell(familyName, qualifier, timestamp, input); + } + /** {@inheritDoc} */ @Override public void startCell(String family, ByteString qualifier, long timestampMicros) { @@ -167,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/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..7e735c37b3 --- /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); + } + + 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/MergeToCell.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/MergeToCell.java new file mode 100644 index 0000000000..cca3aee182 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/MergeToCell.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.models; + +import com.google.api.core.InternalApi; +import com.google.auto.value.AutoValue; +import java.io.Serializable; +import javax.annotation.Nonnull; + +/** Representation of an MergeToCell mod in a data change. */ +@InternalApi("Intended for use by the BigtableIO in apache/beam only.") +@AutoValue +public abstract class MergeToCell implements Entry, Serializable { + public static MergeToCell create( + @Nonnull String family, + @Nonnull Value qualifier, + @Nonnull Value timestamp, + @Nonnull Value input) { + return new AutoValue_MergeToCell(family, qualifier, timestamp, input); + } + + @Nonnull + public abstract String getFamily(); + + @Nonnull + public abstract Value getQualifier(); + + @Nonnull + public abstract Value getTimestamp(); + + @Nonnull + public abstract Value getInput(); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Mutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Mutation.java index d2b23dd297..dc55756241 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Mutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Mutation.java @@ -21,6 +21,7 @@ import com.google.bigtable.v2.Mutation.DeleteFromColumn; import com.google.bigtable.v2.Mutation.DeleteFromFamily; import com.google.bigtable.v2.Mutation.DeleteFromRow; +import com.google.bigtable.v2.Mutation.MergeToCell; import com.google.bigtable.v2.Mutation.SetCell; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.common.base.Preconditions; @@ -308,6 +309,24 @@ public Mutation addToCell( return this; } + @Override + public Mutation mergeToCell( + @Nonnull String familyName, + @Nonnull Value qualifier, + @Nonnull Value timestamp, + @Nonnull Value value) { + com.google.bigtable.v2.Mutation.Builder builder = com.google.bigtable.v2.Mutation.newBuilder(); + MergeToCell.Builder mergeToCellBuilder = builder.getMergeToCellBuilder(); + mergeToCellBuilder.setFamilyName(familyName); + + qualifier.buildTo(mergeToCellBuilder.getColumnQualifierBuilder()); + timestamp.buildTo(mergeToCellBuilder.getTimestampBuilder()); + value.buildTo(mergeToCellBuilder.getInputBuilder()); + + addMutation(builder.build()); + return this; + } + private void addMutation(com.google.bigtable.v2.Mutation mutation) { Preconditions.checkState(numMutations + 1 <= MAX_MUTATIONS, "Too many mutations per row"); Preconditions.checkState( diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/MutationApi.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/MutationApi.java index 612d1bb020..3a54f68748 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/MutationApi.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/MutationApi.java @@ -138,6 +138,20 @@ default T addToCell( return addToCell(familyName, ByteString.copyFromUtf8(qualifier), timestamp, value); } + /** + * Merges a ByteString accumulator value to a cell in an aggregate column family. + * + *

    This is a convenience override that converts Strings to ByteStrings. + * + *

    Note: The timestamp values are in microseconds but must match the granularity of the + * table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond + * granularity). For example: `1571902339435000`. + */ + default T mergeToCell( + @Nonnull String familyName, @Nonnull String qualifier, long timestamp, ByteString value) { + return mergeToCell(familyName, ByteString.copyFromUtf8(qualifier), timestamp, value); + } + /** * Adds an int64 value to an aggregate cell. The column family must be an aggregate family and * have an "int64" input type or this mutation will be rejected. @@ -155,6 +169,22 @@ default T addToCell( Value.IntValue.create(input)); } + /** + * Merges a ByteString accumulator value to a cell in an aggregate column family. + * + *

    Note: The timestamp values are in microseconds but must match the granularity of the + * table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond + * granularity). For example: `1571902339435000`. + */ + default T mergeToCell( + @Nonnull String familyName, @Nonnull ByteString qualifier, long timestamp, ByteString input) { + return mergeToCell( + familyName, + Value.RawValue.create(qualifier), + Value.RawTimestamp.create(timestamp), + Value.RawValue.create(input)); + } + /** * Adds a {@link Value} to an aggregate cell. The column family must be an aggregate family and * have an input type matching the type of {@link Value} or this mutation will be rejected. @@ -168,4 +198,18 @@ T addToCell( @Nonnull Value qualifier, @Nonnull Value timestamp, @Nonnull Value input); + + /** + * Merges a {@link Value} accumulator to an aggregate cell. The column family must be an aggregate + * family or this mutation will be rejected. + * + *

    Note: The timestamp values are in microseconds but must match the granularity of the + * table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond + * granularity). For example: `1571902339435000`. + */ + T mergeToCell( + @Nonnull String familyName, + @Nonnull Value qualifier, + @Nonnull Value timestamp, + @Nonnull Value input); } 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..3708c25def 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 @@ -50,7 +50,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 +64,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) { @@ -317,7 +320,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,8 +340,10 @@ 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; 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 4dfe751225..38d822afcb 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 @@ -47,7 +47,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 +66,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 +85,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 +113,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); @@ -237,6 +245,16 @@ public RowMutation addToCell( return this; } + @Override + public RowMutation mergeToCell( + @Nonnull String familyName, + @Nonnull Value qualifier, + @Nonnull Value timestamp, + @Nonnull Value input) { + mutation.mergeToCell(familyName, qualifier, timestamp, input); + return this; + } + @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 ede90eb6ac..80ffe53737 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 @@ -190,6 +190,16 @@ public RowMutationEntry addToCell( return this; } + @Override + public RowMutationEntry mergeToCell( + @Nonnull String familyName, + @Nonnull Value qualifier, + @Nonnull Value timestamp, + @Nonnull Value input) { + mutation.mergeToCell(familyName, qualifier, timestamp, input); + return this; + } + @InternalApi public MutateRowsRequest.Entry toProto() { Preconditions.checkArgument( 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..1b19e75d69 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 @@ -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/sql/BoundStatement.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/BoundStatement.java new file mode 100644 index 0000000000..82c1084afd --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/BoundStatement.java @@ -0,0 +1,400 @@ +/* + * 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.sql; + +import com.google.api.core.InternalApi; +import com.google.bigtable.v2.ArrayValue; +import com.google.bigtable.v2.ExecuteQueryRequest; +import com.google.bigtable.v2.Type; +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; + +/** + * A bound SQL statement that can be executed by calling {@link + * com.google.cloud.bigtable.data.v2.BigtableDataClient#executeQuery(BoundStatement)}. + * + *

    It is an error to bind a statement with unset parameters. + * + *

    BoundStatements are constructed using a {@link Builder} and calling setTypeParam(String + * paramName, Type value) for the appropriate type. For example: + * + *

    {@code
    + * BoundStatementt boundStatement = preparedStatement.bind()
    + *     .setBytesParam("qualifier", ByteString.copyFromUtf8("test"))
    + *     .setBytesParam("key", ByteString.copyFromUtf8("testKey"))
    + *     .build();
    + * }
    + */ +public class BoundStatement { + + private final PreparedStatementImpl preparedStatement; + private final Map params; + + private BoundStatement(PreparedStatementImpl preparedStatement, Map params) { + this.preparedStatement = preparedStatement; + this.params = params; + } + + /** + * 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 PreparedStatementImpl preparedStatement; + private final Map> paramTypes; + private final Map params; + + /** + * 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 {@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)); + } + + /** + * Sets a query parameter with the name {@code paramName} and the String typed value {@code + * value} + */ + public Builder setStringParam(String paramName, @Nullable String value) { + validateMatchesParamTypes(paramName, SqlType.string()); + params.put(paramName, stringParamOf(value)); + return this; + } + + /** + * Sets a query parameter with the name {@code paramName} and the Bytes typed value {@code + * value} + */ + public Builder setBytesParam(String paramName, @Nullable ByteString value) { + validateMatchesParamTypes(paramName, SqlType.bytes()); + params.put(paramName, bytesParamOf(value)); + return this; + } + + /** + * Sets a query parameter with the name {@code paramName} and the INT64 typed value {@code + * value} + */ + public Builder setLongParam(String paramName, @Nullable Long value) { + validateMatchesParamTypes(paramName, SqlType.int64()); + params.put(paramName, int64ParamOf(value)); + return this; + } + + /** + * Sets a query parameter with the name {@code paramName} and the FLOAT32 typed value {@code + * value} + */ + public Builder setFloatParam(String paramName, @Nullable Float value) { + validateMatchesParamTypes(paramName, SqlType.float32()); + params.put(paramName, float32ParamOf(value)); + return this; + } + + /** + * Sets a query parameter with the name {@code paramName} and the FLOAT64 typed value {@code + * value} + */ + public Builder setDoubleParam(String paramName, @Nullable Double value) { + validateMatchesParamTypes(paramName, SqlType.float64()); + params.put(paramName, float64ParamOf(value)); + return this; + } + + /** + * 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; + } + + /** + * Sets a query parameter with the name {@code paramName} and the TIMESTAMP typed value {@code + * value} + */ + public Builder setTimestampParam(String paramName, @Nullable Instant value) { + validateMatchesParamTypes(paramName, SqlType.timestamp()); + params.put(paramName, timestampParamOf(value)); + return this; + } + + /** + * 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; + } + + /** + * Sets a query parameter with the name {@code paramName} and the ARRAY typed value {@code + * value}. The array element type is specified by {@code arrayType} and the List elements must + * be of the corresponding Java type. Null array elements are valid. + */ + 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) { + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.string()); + Value.Builder builder = nullValueWithType(type); + if (value != null) { + builder.setStringValue(value); + } + return builder.build(); + } + + private static Value bytesParamOf(@Nullable ByteString value) { + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.bytes()); + Value.Builder builder = nullValueWithType(type); + if (value != null) { + builder.setBytesValue(value); + } + return builder.build(); + } + + private static Value int64ParamOf(@Nullable Long value) { + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.int64()); + Value.Builder builder = nullValueWithType(type); + if (value != null) { + builder.setIntValue(value); + } + return builder.build(); + } + + private static Value float32ParamOf(@Nullable Float value) { + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.float32()); + Value.Builder builder = nullValueWithType(type); + if (value != null) { + builder.setFloatValue(value); + } + return builder.build(); + } + + private static Value float64ParamOf(@Nullable Double value) { + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.float64()); + Value.Builder builder = nullValueWithType(type); + if (value != null) { + builder.setFloatValue(value); + } + return builder.build(); + } + + private static Value booleanParamOf(@Nullable Boolean value) { + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.bool()); + Value.Builder builder = nullValueWithType(type); + if (value != null) { + builder.setBoolValue(value); + } + return builder.build(); + } + + private static Value timestampParamOf(@Nullable Instant value) { + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.timestamp()); + Value.Builder builder = nullValueWithType(type); + if (value != null) { + builder.setTimestampValue(toTimestamp(value)); + } + return builder.build(); + } + + private static Value dateParamOf(@Nullable Date value) { + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.date()); + Value.Builder builder = nullValueWithType(type); + if (value != null) { + builder.setDateValue(toProtoDate(value)); + } + return builder.build(); + } + + private static Value arrayParamOf(@Nullable List value, SqlType.Array arrayType) { + Type type = QueryParamUtil.convertToQueryParamProto(arrayType); + Value.Builder builder = nullValueWithType(type); + if (value != null) { + builder.setArrayValue(arrayValueOf(value, arrayType)); + } + return builder.build(); + } + + private static ArrayValue arrayValueOf(List value, SqlType.Array arrayType) { + ArrayValue.Builder valueBuilder = ArrayValue.newBuilder(); + for (Object element : value) { + if (element == null) { + valueBuilder.addValues(Value.getDefaultInstance()); + continue; + } + switch (arrayType.getElementType().getCode()) { + case BYTES: + ByteString bytesElem = (ByteString) element; + valueBuilder.addValues(Value.newBuilder().setBytesValue(bytesElem).build()); + break; + case STRING: + String stringElem = (String) element; + valueBuilder.addValues(Value.newBuilder().setStringValue(stringElem).build()); + break; + case INT64: + Long longElem = (Long) element; + valueBuilder.addValues(Value.newBuilder().setIntValue(longElem).build()); + break; + case FLOAT32: + Float floatElem = (Float) element; + valueBuilder.addValues(Value.newBuilder().setFloatValue(floatElem).build()); + break; + case FLOAT64: + Double doubleElem = (Double) element; + valueBuilder.addValues(Value.newBuilder().setFloatValue(doubleElem).build()); + break; + case BOOL: + Boolean boolElem = (Boolean) element; + valueBuilder.addValues(Value.newBuilder().setBoolValue(boolElem).build()); + break; + case TIMESTAMP: + Instant timestampElem = (Instant) element; + valueBuilder.addValues( + Value.newBuilder().setTimestampValue(toTimestamp(timestampElem)).build()); + break; + case DATE: + Date dateElem = (Date) element; + valueBuilder.addValues(Value.newBuilder().setDateValue(toProtoDate(dateElem)).build()); + break; + default: + throw new IllegalArgumentException( + "Unsupported query parameter Array element type: " + arrayType.getElementType()); + } + } + return valueBuilder.build(); + } + + private static Timestamp toTimestamp(Instant instant) { + return Timestamp.newBuilder() + .setSeconds(instant.getEpochSecond()) + .setNanos(instant.getNano()) + .build(); + } + + private static com.google.type.Date toProtoDate(Date date) { + return com.google.type.Date.newBuilder() + .setYear(date.getYear()) + .setMonth(date.getMonth()) + .setDay(date.getDayOfMonth()) + .build(); + } + + private static Value.Builder nullValueWithType(Type type) { + return Value.newBuilder().setType(type); + } + } + + /** + * Creates the request protobuf. This method is considered an internal implementation detail and + * not meant to be used by applications. + */ + @InternalApi("For internal use only") + 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 new file mode 100644 index 0000000000..20d063922c --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ColumnMetadata.java @@ -0,0 +1,25 @@ +/* + * 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.sql; + +/** Represents the metadata for a column in a {@link ResultSet} */ +public interface ColumnMetadata { + /** The name of the column. Returns Empty string if the column has no name */ + String name(); + + /** The {@link SqlType} of the column */ + SqlType type(); +} 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 new file mode 100644 index 0000000000..a149c03728 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ResultSet.java @@ -0,0 +1,62 @@ +/* + * 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.sql; + +/** + * A set of SQL data, generated as the result of an ExecuteQuery request. + * + *

    This allows access to the data of one row at a time using the methods from the {@code + * StructReader} interface. The rows are read in the order of the query results. To advance to the + * next row call {@link #next}. This returns {@code false} once all the rows have been iterated + * over. The result set is initially positioned before the first row, so {@link #next} must be + * called before reading any data. + * + *

    {@link #getMetadata()} may be called before calling next. It will block until the metadata has + * been received. + * + *

    {@code ResultSet} implementations may buffer data ahead and/or maintain a persistent streaming + * connection to the remote service until all data has been returned or the resultSet closed. As + * such, it is important that all uses of {@code ResultSet} either fully consume it (that is, call + * {@code next()} until {@code false} is returned or it throws an exception) or explicitly call + * {@link #close()}: failure to do so may result in wasted work or leaked resources. + * + *

    {@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. + */ +public interface ResultSet extends StructReader, AutoCloseable { + + /** + * Advances the result set to the next row, returning {@code false} if no such row exists. Calls + * to data access methods will throw an exception after next has returned {@code False}. + */ + boolean next(); + + /** + * Returns the {@link ResultSetMetadata} for the ResultSet. Blocks until the underlying request + * receives the metadata. + */ + ResultSetMetadata getMetadata(); + + /** + * Closes the result set and cancels the underlying request if it is still open. This must always + * be called when disposing of a {@code ResultSet} before {@link #next()} has returned {@code + * false} or raised an exception. Calling {@code close()} is also allowed if the result set has + * been fully consumed, so a recommended practice is to unconditionally close the result set once + * it is done with, typically using a try-with-resources construct. + */ + @Override + void close(); +} 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 new file mode 100644 index 0000000000..303c00928e --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ResultSetMetadata.java @@ -0,0 +1,49 @@ +/* + * 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.sql; + +import java.util.List; + +/** Provides information about the schema of a {@link ResultSet}. */ +public interface ResultSetMetadata { + + /** + * @return full list of {@link ColumnMetadata} for each column in the {@link ResultSet}. + */ + List getColumns(); + + /** + * @param columnIndex index of the column + * @return the {@link SqlType} of the column at the given index + */ + SqlType getColumnType(int columnIndex); + + /** + * @param columnName name of the column + * @return the {@link SqlType} of the column with the given name + * @throws IllegalArgumentException if there is no column with the name *or* if there are multiple + * columns with the given name + */ + SqlType getColumnType(String columnName); + + /** + * @param columnName name of the column + * @return index of the column with the given name + * @throws IllegalArgumentException if there is no column with the name *or* if there are multiple + * columns with the given name + */ + int getColumnIndex(String columnName); +} 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 new file mode 100644 index 0000000000..5398235ce3 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/SqlType.java @@ -0,0 +1,298 @@ +/* + * 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.sql; + +import com.google.api.core.InternalApi; +import com.google.cloud.Date; +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.ByteString; +import java.io.Serializable; +import java.time.Instant; +import java.util.List; + +/** + * Represents a data type in a SQL query. + * + *

    Complex types ({@link SqlType.Map}, {@link SqlType.Array}, & {@link SqlType.Struct} provide + * additional information about the schema of the type. + * + * @param the corresponding java type + */ +public interface SqlType extends Serializable { + + /* Enumeration of the types */ + enum Code { + BYTES, + STRING, + INT64, + FLOAT64, + FLOAT32, + BOOL, + TIMESTAMP, + DATE, + STRUCT, + ARRAY, + MAP + } + + /** + * @return {@link Code} enum for this type + */ + Code getCode(); + + /** + * Represents a map type in SQL. Provides access to the key and value types for the map. + * + * @param Java type of the Map key data + * @param Java type of the Map value data + */ + interface Map extends SqlType> { + /** + * @return {@link SqlType} of the map's key + */ + SqlType getKeyType(); + + /** + * @return {@link SqlType} of the map's value + */ + SqlType getValueType(); + } + + /** + * Represents an array type in SQL. Provides access to the element type of the array. + * + * @param Java type of the Array element data + */ + interface Array extends SqlType> { + /** + * @return {@link SqlType} of the array's elements + */ + SqlType getElementType(); + } + + /** + * Represents a struct type in SQL. A struct is an ordered collection of named and type fields. + */ + interface Struct extends SqlType { + // This extends ColumnMetadata so that we can reuse some helpers for both types + /** Represents a field in a struct */ + interface Field extends ColumnMetadata { + /** + * @return the name of the field. Returns an empty string for fields without names. + */ + String name(); + + /** + * @return the {@link SqlType} of the field + */ + SqlType type(); + } + + /** + * @return the ordered list of {@link Field}s for the struct + */ + List getFields(); + + /** + * @param fieldIndex index of the field + * @return the {@link SqlType} of the field at the given index + */ + SqlType getType(int fieldIndex); + + /** + * @param fieldName name of the field + * @return the {@link SqlType} of the field with the given name + * @throws IllegalArgumentException if there is no field with the name *or* if there are + * multiple columns with the given name + */ + SqlType getType(String fieldName); + + /** + * @param fieldName name of the field + * @return the field index of the field with the given name + * @throws IllegalArgumentException if there is no field with the name *or* if there are + * multiple columns with the given name + */ + int getColumnIndex(String fieldName); + } + + /** returns a {@link SqlType} for the {@code BYTES} type. */ + static SqlType bytes() { + return Type.Bytes.create(); + } + + /** returns a {@link SqlType} for the {@code STRING} type. */ + static SqlType string() { + return Type.String.create(); + } + + /** returns a {@link SqlType} for the {@code INT64} type. */ + static SqlType int64() { + return Type.Int64.create(); + } + + /** returns a {@link SqlType} for the {@code FLOAT64} type. */ + static SqlType float64() { + return Type.Float64.create(); + } + + /** returns a {@link SqlType} for the {@code FLOAT32} type. */ + static SqlType float32() { + return Type.Float32.create(); + } + + /** returns a {@link SqlType} for the {@code BOOL} type. */ + static SqlType bool() { + return Type.Bool.create(); + } + + /** returns a {@link SqlType} for the {@code TIMESTAMP} type. */ + static SqlType timestamp() { + return Type.Timestamp.create(); + } + + /** returns a {@link SqlType} for the {@code DATE} type. */ + static SqlType date() { + return Type.Date.create(); + } + + /** + * returns a fake {@code STRUCT type} for use on in {@link StructReader} methods that require a + * {@link SqlType} to validate against. This does not specify a schema because the struct schem + * will be validated on calls to the structs data accessors. + * + *

    Attempts to access the schema of a struct created this way will throw exceptions. + * + *

    Example usage: + *

    {@code
    +   *   List structList = resultSet.getList("column", SqlType.arrayOf(SqlType.struct()));
    +   * }
    +   */
    +  static SqlType.Struct struct() {
    +    return SchemalessStruct.create();
    +  }
    +
    +  /** returns a {@link SqlType} for an {@code ARRAY} with elements of type {@code elemType} */
    +  static  SqlType.Array arrayOf(SqlType elemType) {
    +    return Type.Array.create(elemType);
    +  }
    +
    +  /**
    +   * returns a {@link SqlType} for a @code MAP} with keys of type {@code keyType} and values of type
    +   * {@code valType}
    +   */
    +  static  SqlType.Map mapOf(SqlType keyType, SqlType valType) {
    +    return Type.Map.create(keyType, valType);
    +  }
    +
    +  /**
    +   * returns the {@link SqlType} for the type returned for column families in {@code with_history}
    +   * queries. This is equivalent to {@code SqlType.mapOf(SqlType.bytes(),
    +   * SqlType.arrayOf(SqlType.struct()))}
    +   */
    +  static SqlType.Map>
    +      historicalMap() {
    +    return mapOf(bytes(), arrayOf(struct()));
    +  }
    +
    +  /**
    +   * Creates a {@link SqlType} from the protobuf representation of Types.
    +   *
    +   * 

    This is considered an internal implementation detail and not meant to be used by + * applications. + */ + @InternalApi + static SqlType fromProto(com.google.bigtable.v2.Type proto) { + switch (proto.getKindCase()) { + case BYTES_TYPE: + return bytes(); + case STRING_TYPE: + return string(); + case INT64_TYPE: + return int64(); + case FLOAT64_TYPE: + return float64(); + case FLOAT32_TYPE: + return float32(); + case BOOL_TYPE: + return bool(); + case TIMESTAMP_TYPE: + return timestamp(); + case DATE_TYPE: + return date(); + case STRUCT_TYPE: + return StructWithSchema.fromProto(proto.getStructType()); + case ARRAY_TYPE: + return arrayOf(fromProto(proto.getArrayType().getElementType())); + case MAP_TYPE: + com.google.bigtable.v2.Type.Map mapType = proto.getMapType(); + return mapOf(fromProto(mapType.getKeyType()), fromProto(mapType.getValueType())); + case KIND_NOT_SET: + throw new IllegalStateException("Unrecognized Type. You may need to update your client."); + default: + throw new IllegalStateException("Unexpected Type: " + proto.getKindCase().name()); + } + } + + /** + * This can be used to check whether {@link + * com.google.cloud.bigtable.data.v2.models.sql.StructReader} get calls are being called for the + * correct type when compared to the schema. This is different that equals because we do not + * require users to specify the full struct schema for struct get calls. This is safe because the + * struct schema will be validated on calls to the struct. + * + *

    This is considered an internal implementation detail and not meant to be used by + * applications. + */ + @InternalApi + static boolean typesMatch(SqlType left, SqlType right) { + switch (left.getCode()) { + case BYTES: + case STRING: + case INT64: + case FLOAT64: + case FLOAT32: + case BOOL: + case TIMESTAMP: + case DATE: + return left.equals(right); + case STRUCT: + // Don't validate fields since the field types will be validated on + // accessor calls to struct + return left.getCode().equals(right.getCode()); + case ARRAY: + if (!left.getCode().equals(right.getCode())) { + return false; + } + SqlType.Array leftArray = (SqlType.Array) left; + SqlType.Array rightArray = (SqlType.Array) right; + return typesMatch(leftArray.getElementType(), rightArray.getElementType()); + case MAP: + if (!left.getCode().equals(right.getCode())) { + return false; + } + SqlType.Map leftMap = (SqlType.Map) left; + SqlType.Map rightMap = (SqlType.Map) right; + boolean keysMatch = typesMatch(leftMap.getKeyType(), rightMap.getKeyType()); + boolean valuesMatch = typesMatch(leftMap.getValueType(), rightMap.getValueType()); + return keysMatch && valuesMatch; + default: + throw new IllegalStateException("Unexpected type: " + left); + } + } +} 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 new file mode 100644 index 0000000000..a043e714f0 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/Struct.java @@ -0,0 +1,24 @@ +/* + * 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.sql; + +import java.io.Serializable; + +/** + * The representation of a SQL Struct type. Data can be accessed using the methods from the {@code + * StructReader} interface. + */ +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 new file mode 100644 index 0000000000..76ecfb1ef9 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/StructReader.java @@ -0,0 +1,199 @@ +/* + * 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.sql; + +import com.google.cloud.Date; +import com.google.protobuf.ByteString; +import java.time.Instant; +import java.util.List; +import java.util.Map; + +/** + * An interface for reading the columns of a {@code Struct} or {@code + * com.google.cloud.bigtable.data.v2.models.sql.ResultSet}. + * + *

    This provides accessors for each valid type in the form of {@code getTypeName()}. Attempting + * to call these methods for a column of another type will result in an {@code + * IllegalStateException}. Each method has an overload accepting both {@code int} column index and + * {@code String} column Name. Attempting to call an index-based method with a non-existent index + * will result in an {@code IndexOutOfBoundsException}. Attempting to call a columnName based getter + * with a column name that does not appear exactly once in the set of fields will result in an + * {@code IllegalArgumentException}. Attempting to access a column with a null value will result in + * a {@code NullPointerException}; {@link #isNull(int)} & {@link #isNull(String)} can be used to + * check for null values. + */ +public interface StructReader { + /** + * @param columnIndex index of the column + * @return {@code true} if the column contains a {@code NULL} value + */ + boolean isNull(int columnIndex); + + /** + * @param columnName name of the column + * @return {@code true} if the column contains a {@code NULL} value + * @throws IllegalArgumentException if there is not exactly one column with the given name + */ + boolean isNull(String columnName); + + /** + * @param columnIndex index of the column + * @return {@link ByteString} type value of a non-{@code NULL} column + */ + ByteString getBytes(int columnIndex); + + /** + * @param columnName name of the column + * @return {@link ByteString} type value of a non-{@code NULL} column + */ + ByteString getBytes(String columnName); + + /** + * @param columnIndex index of the column + * @return {@link String} type value of a non-{@code NULL} column + */ + String getString(int columnIndex); + + /** + * @param columnName name of the column + * @return {@link String} type value of a non-{@code NULL} column + */ + String getString(String columnName); + + /** + * @param columnIndex index of the column + * @return {@link long} type value of a non-{@code NULL} column + */ + long getLong(int columnIndex); + + /** + * @param columnName name of the column + * @return {@link long} type value of a non-{@code NULL} column + */ + long getLong(String columnName); + + /** + * Getter for FLOAT_64 type Sql data + * + * @param columnIndex index of the column + * @return {@link double} type value of a non-{@code NULL} column + */ + double getDouble(int columnIndex); + + /** + * Getter for FLOAT_64 type Sql data + * + * @param columnName name of the column + * @return {@link double} type value of a non-{@code NULL} column + */ + double getDouble(String columnName); + + /** + * Getter for FLOAT_32 type Sql data + * + * @param columnIndex index of the column + * @return {@link float} type value of a non-{@code NULL} column + */ + float getFloat(int columnIndex); + + /** + * Getter for FLOAT_32 type Sql data + * + * @param columnName name of the column + * @return {@link float} type value of a non-{@code NULL} column + */ + float getFloat(String columnName); + + /** + * @param columnIndex index of the column + * @return {@link boolean} type value of a non-{@code NULL} column + */ + boolean getBoolean(int columnIndex); + + /** + * @param columnName name of the column + * @return {@link boolean} type value of a non-{@code NULL} column + */ + boolean getBoolean(String columnName); + + /** + * @param columnIndex index of the column + * @return {@link Instant} type value of a non-{@code NULL} column + */ + Instant getTimestamp(int columnIndex); + + /** + * @param columnName name of the column + * @return {@link Instant} type value of a non-{@code NULL} column + */ + Instant getTimestamp(String columnName); + + /** + * @param columnIndex index of the column + * @return {@link Date} type value of a non-{@code NULL} column + */ + Date getDate(int columnIndex); + + /** + * @param columnName name of the column + * @return {@link Date} type value of a non-{@code NULL} column + */ + Date getDate(String columnName); + + /** + * @param columnIndex index of the column + * @return {@link com.google.cloud.bigtable.data.v2.models.sql.Struct} type value of a non-{@code + * NULL} column + */ + Struct getStruct(int columnIndex); + + /** + * @param columnName name of the column + * @return {@link com.google.cloud.bigtable.data.v2.models.sql.Struct} type value of a non-{@code + * NULL} column + */ + Struct getStruct(String columnName); + + /** + * @param columnIndex index of the column + * @return {@link List} type value of a non-{@code NULL} column + * @param Java type of the list elements + */ + List getList(int columnIndex, SqlType.Array arrayType); + + /** + * @param columnName name of the column + * @return {@link List} type value of a non-{@code NULL} column + * @param Java type of the list elements + */ + List getList(String columnName, SqlType.Array arrayType); + + /** + * @param columnIndex index of the column + * @return {@link Map} type value of a non-{@code NULL} column + * @param Java type of the map keys + * @param Java type of the map values + */ + Map getMap(int columnIndex, SqlType.Map mapType); + + /** + * @param columnName name of the column + * @return {@link Map} type value of a non-{@code NULL} column + * @param Java type of the map keys + * @param Java type of the map values + */ + Map getMap(String columnName, SqlType.Map mapType); +} 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..4ace6c7567 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,53 +15,75 @@ */ 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.core.InternalApi; +import com.google.api.core.SettableApiFuture; import com.google.api.gax.grpc.ChannelPrimer; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.rpc.FixedTransportChannelProvider; import com.google.auth.Credentials; +import com.google.bigtable.v2.BigtableGrpc; +import com.google.bigtable.v2.InstanceName; import com.google.bigtable.v2.PingAndWarmRequest; -import com.google.cloud.bigtable.data.v2.internal.NameUtil; -import com.google.common.base.Preconditions; +import com.google.bigtable.v2.PingAndWarmResponse; +import io.grpc.CallCredentials; +import io.grpc.CallOptions; +import io.grpc.ClientCall; +import io.grpc.Deadline; import io.grpc.ManagedChannel; +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.format(projectId, instanceId)) + .setAppProfileId(appProfileId) + .build(); + + this.headers = headers; } @Override @@ -69,44 +91,88 @@ public void primeChannel(ManagedChannel managedChannel) { try { primeChannelUnsafe(managedChannel); } 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); + sendPrimeRequestsBlocking(managedChannel); } - 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(ManagedChannel managedChannel) { + try { + sendPrimeRequestsAsync(managedChannel).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); + } + } + + public SettableApiFuture sendPrimeRequestsAsync( + ManagedChannel managedChannel) { + ClientCall clientCall = + managedChannel.newCall( + BigtableGrpc.getPingAndWarmMethod(), + CallOptions.DEFAULT + .withCallCredentials(callCredentials) + .withDeadline(Deadline.after(1, TimeUnit.MINUTES))); - 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)); - } + 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; + } + + 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..233294fe4e --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableClientContext.java @@ -0,0 +1,302 @@ +/* + * 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.FixedCredentialsProvider; +import com.google.api.gax.grpc.ChannelPrimer; +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.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.internal.JwtCredentialsWithAudience; +import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants; +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.NoopMetricsProvider; +import com.google.cloud.bigtable.gaxx.grpc.BigtableTransportChannelProvider; +import io.grpc.ManagedChannelBuilder; +import io.grpc.opentelemetry.GrpcOpenTelemetry; +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.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()); + + @Nullable private final OpenTelemetry openTelemetry; + @Nullable private final OpenTelemetrySdk internalOpenTelemetry; + private final MetricsProvider metricsProvider; + private final ClientContext clientContext; + + public static BigtableClientContext create(EnhancedBigtableStubSettings settings) + throws IOException { + EnhancedBigtableStubSettings.Builder builder = settings.toBuilder(); + + // Set up credentials + 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)); + + String universeDomain = settings.getUniverseDomain(); + + // Set up OpenTelemetry + 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 = + getOpenTelemetryFromMetricsProvider( + settings.getMetricsProvider(), + credentials, + settings.getMetricsEndpoint(), + universeDomain); + } catch (Throwable t) { + logger.log(Level.WARNING, "Failed to get OTEL, will skip exporting client side metrics", t); + } + + // Set up channel + InstantiatingGrpcChannelProvider.Builder transportProvider = + builder.getTransportChannelProvider() instanceof InstantiatingGrpcChannelProvider + ? ((InstantiatingGrpcChannelProvider) builder.getTransportChannelProvider()).toBuilder() + : null; + + @Nullable OpenTelemetrySdk internalOtel = null; + @Nullable ErrorCountPerConnectionMetricTracker errorCountPerConnectionMetricTracker = null; + + // Internal metrics are scoped to the connections, so we need a mutable transportProvider, + // otherwise there is + // no reason to build the internal OtelProvider + if (transportProvider != null) { + internalOtel = + settings.getInternalMetricsProvider().createOtelProvider(settings, credentials); + if (internalOtel != null) { + // Set up per connection error count tracker if all dependencies are met: + // a configurable transport provider + otel + errorCountPerConnectionMetricTracker = + setupPerConnectionErrorTracer(builder, transportProvider, internalOtel); + + // Configure grpc metrics + configureGrpcOtel(transportProvider, internalOtel); + } + } + + if (transportProvider != null) { + // Set up cookie holder if routing cookie is enabled + if (builder.getEnableRoutingCookie()) { + setupCookieHolder(transportProvider); + } + + ChannelPrimer channelPrimer = NoOpChannelPrimer.create(); + + // Inject channel priming if enabled + if (builder.isRefreshingChannel()) { + channelPrimer = + BigtableChannelPrimer.create( + builder.getProjectId(), + builder.getInstanceId(), + builder.getAppProfileId(), + credentials, + builder.getHeaderProvider().getHeaders()); + } + + BigtableTransportChannelProvider btTransportProvider = + BigtableTransportChannelProvider.create( + (InstantiatingGrpcChannelProvider) transportProvider.build(), channelPrimer); + + builder.setTransportChannelProvider(btTransportProvider); + } + + ClientContext clientContext = ClientContext.create(builder.build()); + + if (errorCountPerConnectionMetricTracker != null) { + errorCountPerConnectionMetricTracker.startConnectionErrorCountTracker( + clientContext.getExecutor()); + } + + return new BigtableClientContext( + clientContext, openTelemetry, internalOtel, settings.getMetricsProvider()); + } + + private static void configureGrpcOtel( + InstantiatingGrpcChannelProvider.Builder transportProvider, OpenTelemetrySdk otel) { + + GrpcOpenTelemetry grpcOtel = + GrpcOpenTelemetry.newBuilder() + .sdk(otel) + .addOptionalLabel("grpc.lb.locality") + // Disable default grpc metrics + .disableAllMetrics() + // Enable specific grpc metrics + .enableMetrics(BuiltinMetricsConstants.GRPC_METRICS.keySet()) + .build(); + + @SuppressWarnings("rawtypes") + ApiFunction oldConfigurator = + transportProvider.getChannelConfigurator(); + + transportProvider.setChannelConfigurator( + b -> { + if (oldConfigurator != null) { + b = oldConfigurator.apply(b); + } + grpcOtel.configureChannelBuilder(b); + return b; + }); + } + + private BigtableClientContext( + ClientContext clientContext, + @Nullable OpenTelemetry openTelemetry, + @Nullable OpenTelemetrySdk internalOtel, + MetricsProvider metricsProvider) { + this.clientContext = clientContext; + this.openTelemetry = openTelemetry; + this.internalOpenTelemetry = internalOtel; + this.metricsProvider = metricsProvider; + } + + public OpenTelemetry getOpenTelemetry() { + return this.openTelemetry; + } + + public ClientContext getClientContext() { + return this.clientContext; + } + + public void close() throws Exception { + for (BackgroundResource resource : clientContext.getBackgroundResources()) { + resource.close(); + } + if (internalOpenTelemetry != null) { + internalOpenTelemetry.close(); + } + if (metricsProvider instanceof DefaultMetricsProvider && openTelemetry != null) { + ((OpenTelemetrySdk) openTelemetry).close(); + } + } + + private static OpenTelemetry getOpenTelemetryFromMetricsProvider( + MetricsProvider metricsProvider, + @Nullable Credentials defaultCredentials, + @Nullable String metricsEndpoint, + String universeDomain) + 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(metricsEndpoint, universeDomain, credentials); + } else if (metricsProvider instanceof NoopMetricsProvider) { + return null; + } + throw new IOException("Invalid MetricsProvider type " + metricsProvider); + } + + 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 ErrorCountPerConnectionMetricTracker setupPerConnectionErrorTracer( + EnhancedBigtableStubSettings.Builder builder, + InstantiatingGrpcChannelProvider.Builder transportProvider, + OpenTelemetry openTelemetry) { + ErrorCountPerConnectionMetricTracker errorCountPerConnectionMetricTracker = + new ErrorCountPerConnectionMetricTracker( + openTelemetry, EnhancedBigtableStub.createBuiltinAttributes(builder.build())); + ApiFunction oldChannelConfigurator = + transportProvider.getChannelConfigurator(); + transportProvider.setChannelConfigurator( + managedChannelBuilder -> { + managedChannelBuilder.intercept(errorCountPerConnectionMetricTracker.getInterceptor()); + + if (oldChannelConfigurator != null) { + managedChannelBuilder = oldChannelConfigurator.apply(managedChannelBuilder); + } + return managedChannelBuilder; + }); + return errorCountPerConnectionMetricTracker; + } + + 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; + }); + } +} 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..d10a10a24f --- /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; + +@InternalApi +/** Expand StreamResumptionStrategy to also process the error. */ +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 01bc5d9e85..bd97b79d37 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 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. @@ -22,6 +22,8 @@ import com.google.api.gax.rpc.UnaryCallable; 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; @@ -30,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; @@ -90,6 +94,14 @@ 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()"); + } + @Override public abstract void close(); } 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 2cfd109ebe..8ac3f41185 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 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. @@ -18,6 +18,7 @@ import com.google.api.core.ApiFunction; import com.google.api.core.InternalApi; +import com.google.api.core.ObsoleteApi; import com.google.api.gax.core.GaxProperties; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; @@ -34,6 +35,8 @@ import com.google.api.gax.rpc.UnaryCallSettings; 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; @@ -42,6 +45,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; @@ -55,9 +60,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. */ @@ -92,6 +97,9 @@ public class BigtableStubSettings extends StubSettings { generateInitialChangeStreamPartitionsSettings; private final ServerStreamingCallSettings readChangeStreamSettings; + private final UnaryCallSettings prepareQuerySettings; + private final ServerStreamingCallSettings + executeQuerySettings; /** Returns the object with the settings used for calls to readRows. */ public ServerStreamingCallSettings readRowsSettings() { @@ -147,6 +155,17 @@ 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() { + return executeQuerySettings; + } + public BigtableStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -170,6 +189,7 @@ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuild } /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") public static String getDefaultEndpoint() { return "bigtable.googleapis.com:443"; } @@ -236,6 +256,8 @@ protected BigtableStubSettings(Builder settingsBuilder) throws IOException { generateInitialChangeStreamPartitionsSettings = settingsBuilder.generateInitialChangeStreamPartitionsSettings().build(); readChangeStreamSettings = settingsBuilder.readChangeStreamSettings().build(); + prepareQuerySettings = settingsBuilder.prepareQuerySettings().build(); + executeQuerySettings = settingsBuilder.executeQuerySettings().build(); } /** Builder for BigtableStubSettings. */ @@ -261,6 +283,10 @@ public static class Builder extends StubSettings.Builder readChangeStreamSettings; + private final UnaryCallSettings.Builder + prepareQuerySettings; + private final ServerStreamingCallSettings.Builder + executeQuerySettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -272,7 +298,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))); @@ -281,10 +307,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(); } @@ -295,65 +326,76 @@ public static class Builder extends StubSettings.Builder>of( mutateRowSettings, checkAndMutateRowSettings, pingAndWarmSettings, - readModifyWriteRowSettings); + readModifyWriteRowSettings, + prepareQuerySettings); initDefaults(this); } @@ -396,13 +441,16 @@ protected Builder(BigtableStubSettings settings) { generateInitialChangeStreamPartitionsSettings = settings.generateInitialChangeStreamPartitionsSettings.toBuilder(); readChangeStreamSettings = settings.readChangeStreamSettings.toBuilder(); + prepareQuerySettings = settings.prepareQuerySettings.toBuilder(); + executeQuerySettings = settings.executeQuerySettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( mutateRowSettings, checkAndMutateRowSettings, pingAndWarmSettings, - readModifyWriteRowSettings); + readModifyWriteRowSettings, + prepareQuerySettings); } private static Builder createDefault() { @@ -430,8 +478,8 @@ private static Builder initDefaults(Builder builder) { builder .mutateRowSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); builder .mutateRowsSettings() @@ -455,13 +503,23 @@ private static Builder initDefaults(Builder builder) { builder .generateInitialChangeStreamPartitionsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); builder .readChangeStreamSettings() - .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 + .prepareQuerySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .executeQuerySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")); return builder; } @@ -538,6 +596,18 @@ public UnaryCallSettings.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() { + return executeQuerySettings; + } + @Override public BigtableStubSettings build() throws IOException { return new BigtableStubSettings(this); 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/EnhancedBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java index 57d9748cca..5f6b69dea8 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 @@ -20,25 +20,26 @@ 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.ApiFutures; 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; @@ -51,32 +52,26 @@ 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.models.BulkMutation; import com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation; import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; @@ -94,7 +89,9 @@ 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.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; @@ -103,12 +100,7 @@ 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; @@ -119,21 +111,30 @@ 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.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.common.util.concurrent.MoreExecutors; import com.google.protobuf.ByteString; -import io.grpc.ManagedChannelBuilder; +import io.grpc.MethodDescriptor; import io.opencensus.stats.Stats; import io.opencensus.stats.StatsRecorder; import io.opencensus.tags.TagKey; @@ -143,14 +144,11 @@ import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.api.common.Attributes; 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.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; @@ -169,8 +167,6 @@ @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; @@ -182,9 +178,12 @@ public class EnhancedBigtableStub implements AutoCloseable { 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; @@ -192,7 +191,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; @@ -200,24 +198,15 @@ public class EnhancedBigtableStub implements AutoCloseable { private final ServerStreamingCallable 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); - } + BigtableClientContext bigtableClientContext = createBigtableClientContext(settings); + OpenTelemetry openTelemetry = bigtableClientContext.getOpenTelemetry(); ClientContext contextWithTracer = - clientContext - .toBuilder() + bigtableClientContext.getClientContext().toBuilder() .setTracerFactory(createBigtableTracerFactory(settings, openTelemetry)) .build(); return new EnhancedBigtableStub(settings, contextWithTracer); @@ -229,85 +218,9 @@ public static EnhancedBigtableStub createWithClientContext( 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 BigtableClientContext createBigtableClientContext( + EnhancedBigtableStubSettings settings) throws IOException { + return BigtableClientContext.create(settings); } public static ApiTracerFactory createBigtableTracerFactory( @@ -364,28 +277,7 @@ public static ApiTracerFactory createBigtableTracerFactory( 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) { + static Attributes createBuiltinAttributes(EnhancedBigtableStubSettings settings) { return Attributes.of( BIGTABLE_PROJECT_ID_KEY, settings.getProjectId(), @@ -397,41 +289,6 @@ private static Attributes createBuiltinAttributes(EnhancedBigtableStubSettings s "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); } @@ -451,6 +308,7 @@ public EnhancedBigtableStub( this.bulkMutationDynamicFlowControlStats = new DynamicFlowControlStats(); readRowsCallable = createReadRowsCallable(new DefaultRowAdapter()); + skipLargeRowsCallable = createSkipLargeRowsCallable(new DefaultRowAdapter()); readRowCallable = createReadRowCallable(new DefaultRowAdapter()); bulkReadRowsCallable = createBulkReadRowsCallable(new DefaultRowAdapter()); sampleRowKeysCallable = createSampleRowKeysCallable(); @@ -465,7 +323,8 @@ public EnhancedBigtableStub( createGenerateInitialChangeStreamPartitionsCallable(); readChangeStreamCallable = createReadChangeStreamCallable(new DefaultChangeStreamRecordAdapter()); - pingAndWarmCallable = createPingAndWarmCallable(); + executeQueryCallable = createExecuteQueryCallable(); + prepareQueryCallable = createPrepareQueryCallable(); } // @@ -518,7 +377,10 @@ public ServerStreamingCallable createReadRowsCallable( new TracedServerStreamingCallable<>( readRowsUserCallable, clientContext.getTracerFactory(), span); - return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); + return traced.withDefaultCallContext( + clientContext + .getDefaultCallContext() + .withRetrySettings(settings.readRowsSettings().getRetrySettings())); } /** @@ -536,25 +398,58 @@ public ServerStreamingCallable createReadRowsCallable( *
    */ public UnaryCallable createReadRowCallable(RowAdapter rowAdapter) { - ServerStreamingCallable readRowsCallable = - createReadRowsBaseCallable( - ServerStreamingCallSettings.newBuilder() - .setRetryableCodes(settings.readRowSettings().getRetryableCodes()) - .setRetrySettings(settings.readRowSettings().getRetrySettings()) - .setIdleTimeout(settings.readRowSettings().getRetrySettings().getTotalTimeout()) - .build(), - rowAdapter); - - ReadRowsUserCallable readRowCallable = - new ReadRowsUserCallable<>(readRowsCallable, requestContext); - - ReadRowsFirstCallable firstRow = new ReadRowsFirstCallable<>(readRowCallable); - - UnaryCallable traced = - new TracedUnaryCallable<>( - firstRow, clientContext.getTracerFactory(), getSpanName("ReadRow")); + if (!settings.getEnableSkipTrailers()) { + ServerStreamingCallable readRowsCallable = + createReadRowsBaseCallable( + ServerStreamingCallSettings.newBuilder() + .setRetryableCodes(settings.readRowSettings().getRetryableCodes()) + .setRetrySettings(settings.readRowSettings().getRetrySettings()) + .setIdleTimeout(settings.readRowSettings().getRetrySettings().getTotalTimeout()) + .build(), + rowAdapter); + + ReadRowsUserCallable readRowCallable = + new ReadRowsUserCallable<>(readRowsCallable, requestContext); + ReadRowsFirstCallable firstRow = new ReadRowsFirstCallable<>(readRowCallable); + UnaryCallable traced = + new TracedUnaryCallable<>( + firstRow, clientContext.getTracerFactory(), getSpanName("ReadRow")); + return traced.withDefaultCallContext( + clientContext + .getDefaultCallContext() + .withRetrySettings(settings.readRowSettings().getRetrySettings())); + } else { + ServerStreamingCallable readRowsCallable = + createReadRowsBaseCallable( + ServerStreamingCallSettings.newBuilder() + .setRetryableCodes(settings.readRowSettings().getRetryableCodes()) + .setRetrySettings(settings.readRowSettings().getRetrySettings()) + .setIdleTimeoutDuration(Duration.ZERO) + .setWaitTimeoutDuration(Duration.ZERO) + .build(), + rowAdapter, + new SimpleStreamResumptionStrategy<>()); + ServerStreamingCallable readRowCallable = + new TransformingServerStreamingCallable<>( + readRowsCallable, + (query) -> query.limit(1).toProto(requestContext), + Functions.identity()); + + return new BigtableUnaryOperationCallable<>( + readRowCallable, + clientContext + .getDefaultCallContext() + .withRetrySettings(settings.readRowSettings().getRetrySettings()), + clientContext.getTracerFactory(), + getSpanName("ReadRow"), + /* allowNoResponses= */ true); + } + } - return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); + private ServerStreamingCallable createReadRowsBaseCallable( + ServerStreamingCallSettings readRowsSettings, RowAdapter rowAdapter) { + return createReadRowsBaseCallable( + readRowsSettings, rowAdapter, new ReadRowsResumptionStrategy(rowAdapter)); } /** @@ -573,29 +468,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()); @@ -615,7 +498,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()) @@ -639,6 +522,96 @@ 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) settings.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, clientContext); + + 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, clientContext.getTracerFactory(), span); + + return traced.withDefaultCallContext( + clientContext + .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: @@ -673,15 +646,47 @@ private UnaryCallable> createBulkReadRowsCallable( UnaryCallable> traced = new TracedUnaryCallable<>(tracedBatcher, clientContext.getTracerFactory(), span); - return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); + return traced.withDefaultCallContext( + clientContext + .getDefaultCallContext() + .withRetrySettings(settings.readRowsSettings().getRetrySettings())); } /** - * Helper function that should only be used by createSampleRowKeysCallable() and - * createSampleRowKeysWithRequestCallable(). + * Simple wrapper around {@link #createSampleRowKeysCallableWithRequest()} to provide backwards + * compatibility + * + * @deprecated */ - private UnaryCallable> - createSampleRowKeysBaseCallable() { + @Deprecated + private UnaryCallable> createSampleRowKeysCallable() { + UnaryCallable> baseCallable = + createSampleRowKeysCallableWithRequest(); + return new UnaryCallable>() { + @Override + public ApiFuture> futureCall(String s, ApiCallContext apiCallContext) { + return baseCallable.futureCall(SampleRowKeysRequest.create(TableId.of(s)), apiCallContext); + } + }; + } + + /** + * Creates a callable chain to handle SampleRowKeys RPcs. The chain will: + * + *
      + *
    • Convert a {@link SampleRowKeysRequest} 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. + *
    + */ + private UnaryCallable> + createSampleRowKeysCallableWithRequest() { + String methodName = "SampleRowKeys"; + ServerStreamingCallable base = GrpcRawCallableFactory.createServerStreamingCallable( @@ -690,25 +695,9 @@ private UnaryCallable> createBulkReadRowsCallable( 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()); - } - }) + r -> + composeRequestParams( + r.getAppProfileId(), r.getTableName(), r.getAuthorizedViewName())) .build(), settings.sampleRowKeysSettings().getRetryableCodes()); @@ -724,51 +713,13 @@ public Map extract( UnaryCallable> retryable = withRetries(withBigtableTracer, settings.sampleRowKeysSettings()); - return retryable; - } - - /** - * Creates a callable chain to handle SampleRowKeys RPcs. The chain will: - * - *
      - *
    • 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. - *
    - */ - private UnaryCallable> createSampleRowKeysCallable() { - String methodName = "SampleRowKeys"; - - UnaryCallable> - baseCallable = createSampleRowKeysBaseCallable(); - return createUserFacingUnaryCallable( - methodName, new SampleRowKeysCallable(baseCallable, requestContext)); - } - - /** - * Creates a callable chain to handle SampleRowKeys RPcs. The chain will: - * - *
      - *
    • Convert a {@link SampleRowKeysRequest} 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. - *
    - */ - private UnaryCallable> - createSampleRowKeysCallableWithRequest() { - String methodName = "SampleRowKeys"; - - UnaryCallable> - baseCallable = createSampleRowKeysBaseCallable(); return createUserFacingUnaryCallable( - methodName, new SampleRowKeysCallableWithRequest(baseCallable, requestContext)); + methodName, + new SampleRowKeysCallableWithRequest(retryable, requestContext) + .withDefaultCallContext( + clientContext + .getDefaultCallContext() + .withRetrySettings(settings.sampleRowKeysSettings().getRetrySettings()))); } /** @@ -780,42 +731,14 @@ 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)); + return createUnaryCallable( + BigtableGrpc.getMutateRowMethod(), + req -> + composeRequestParams( + req.getAppProfileId(), req.getTableName(), req.getAuthorizedViewName()), + settings.mutateRowSettings(), + req -> req.toProto(requestContext), + resp -> null); } /** @@ -842,22 +765,9 @@ private UnaryCallable createMutateRowsBas 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()); @@ -932,7 +842,10 @@ public Map extract(MutateRowsRequest mutateRowsRequest) { new TracedUnaryCallable<>( tracedBatcherUnaryCallable, clientContext.getTracerFactory(), spanName); - return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); + return traced.withDefaultCallContext( + clientContext + .getDefaultCallContext() + .withRetrySettings(settings.bulkMutateRowsSettings().getRetrySettings())); } /** @@ -1035,44 +948,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()), + settings.checkAndMutateRowSettings(), + req -> req.toProto(requestContext), + CheckAndMutateRowResponse::getPredicateMatched); } /** @@ -1086,39 +969,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()), + settings.readModifyWriteRowSettings(), + req -> req.toProto(requestContext), + resp -> rowAdapter.createRowFromProto(resp.getRow())); } /** @@ -1147,18 +1007,7 @@ 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()); @@ -1201,7 +1050,11 @@ public Map extract( ServerStreamingCallable traced = new TracedServerStreamingCallable<>(retrying, clientContext.getTracerFactory(), span); - return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); + return traced.withDefaultCallContext( + clientContext + .getDefaultCallContext() + .withRetrySettings( + settings.generateInitialChangeStreamPartitionsSettings().getRetrySettings())); } /** @@ -1227,15 +1080,7 @@ public Map extract( 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()); @@ -1281,7 +1126,115 @@ public Map extract( new TracedServerStreamingCallable<>( readChangeStreamUserCallable, clientContext.getTracerFactory(), span); - return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); + return traced.withDefaultCallContext( + clientContext + .getDefaultCallContext() + .withRetrySettings(settings.readChangeStreamSettings().getRetrySettings())); + } + + /** + * Creates a callable chain to handle streaming ExecuteQuery RPCs. The chain will: + * + *
      + *
    • 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. + *
    • 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} + *
    + */ + @InternalApi("For internal use only") + public ExecuteQueryCallable createExecuteQueryCallable() { + ServerStreamingCallable base = + GrpcRawCallableFactory.createServerStreamingCallable( + GrpcCallSettings.newBuilder() + .setMethodDescriptor(BigtableGrpc.getExecuteQueryMethod()) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ExecuteQueryRequest executeQueryRequest) { + return ImmutableMap.of( + "name", executeQueryRequest.getInstanceName(), + "app_profile_id", executeQueryRequest.getAppProfileId()); + } + }) + .build(), + settings.executeQuerySettings().getRetryableCodes()); + + ServerStreamingCallable withStatsHeaders = + new StatsHeadersServerStreamingCallable<>(base); + + ServerStreamingCallable withPlanRefresh = + new PlanRefreshingCallable(withStatsHeaders, requestContext); + + // 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); + + ServerStreamingCallSettings retrySettings = + ServerStreamingCallSettings.newBuilder() + .setResumptionStrategy(new ExecuteQueryResumptionStrategy()) + .setRetryableCodes(settings.executeQuerySettings().getRetryableCodes()) + .setRetrySettings(settings.executeQuerySettings().getRetrySettings()) + .setIdleTimeout(settings.executeQuerySettings().getIdleTimeout()) + .setWaitTimeout(settings.executeQuerySettings().getWaitTimeout()) + .build(); + + // 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(convertException, retrySettings); + + ServerStreamingCallable merging = + new SqlRowMergingCallable(retries); + + ServerStreamingCallSettings watchdogSettings = + ServerStreamingCallSettings.newBuilder() + .setIdleTimeout(settings.executeQuerySettings().getIdleTimeout()) + .setWaitTimeout(settings.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 passingThroughErrorsToMetadata = + new MetadataErrorHandlingCallable(watched); + + ServerStreamingCallable withBigtableTracer = + new BigtableTracerStreamingCallable<>(passingThroughErrorsToMetadata); + + SpanName span = getSpanName("ExecuteQuery"); + ServerStreamingCallable traced = + new TracedServerStreamingCallable<>( + withBigtableTracer, clientContext.getTracerFactory(), span); + + return new ExecuteQueryCallable( + traced.withDefaultCallContext( + clientContext + .getDefaultCallContext() + .withRetrySettings(settings.executeQuerySettings().getRetrySettings()))); + } + + private UnaryCallable createPrepareQueryCallable() { + return createUnaryCallable( + BigtableGrpc.getPrepareQueryMethod(), + req -> composeInstanceLevelRequestParams(req.getInstanceName(), req.getAppProfileId()), + settings.prepareQuerySettings(), + req -> req.toProto(requestContext), + PrepareResponse::fromProto); } /** @@ -1297,23 +1250,119 @@ private UnaryCallable createUserFacin return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); } - private UnaryCallable createPingAndWarmCallable() { - UnaryCallable pingAndWarm = + 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) { + if (settings.getEnableSkipTrailers()) { + return createUnaryCallableNew( + methodDescriptor, headerParamsFn, callSettings, requestTransformer, responseTranformer); + } else { + return createUnaryCallableOld( + methodDescriptor, headerParamsFn, callSettings, requestTransformer, responseTranformer); + } + } + + private UnaryCallable createUnaryCallableOld( + MethodDescriptor methodDescriptor, + RequestParamsExtractor headerParamsFn, + UnaryCallSettings callSettings, + Function requestTransformer, + Function responseTranformer) { + + UnaryCallable base = 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()); - } - }) + GrpcCallSettings.newBuilder() + .setMethodDescriptor(methodDescriptor) + .setParamsExtractor(headerParamsFn) .build(), - Collections.emptySet()); - return pingAndWarm.withDefaultCallContext(clientContext.getDefaultCallContext()); + callSettings.getRetryableCodes()); + + UnaryCallable withStatsHeaders = new StatsHeadersUnaryCallable<>(base); + + UnaryCallable withBigtableTracer = + new BigtableTracerUnaryCallable<>(withStatsHeaders); + + UnaryCallable retrying = withRetries(withBigtableTracer, callSettings); + + UnaryCallable transformed = + new UnaryCallable() { + @Override + public ApiFuture futureCall(ReqT reqT, ApiCallContext apiCallContext) { + ApiFuture f = + retrying.futureCall(requestTransformer.apply(reqT), apiCallContext); + return ApiFutures.transform( + f, responseTranformer::apply, MoreExecutors.directExecutor()); + } + }; + + UnaryCallable traced = + new TracedUnaryCallable<>( + transformed, + clientContext.getTracerFactory(), + getSpanName(methodDescriptor.getBareMethodName())); + + return traced.withDefaultCallContext( + clientContext.getDefaultCallContext().withRetrySettings(callSettings.getRetrySettings())); + } + + private UnaryCallable createUnaryCallableNew( + MethodDescriptor methodDescriptor, + RequestParamsExtractor headerParamsFn, + UnaryCallSettings callSettings, + Function requestTransformer, + Function responseTranformer) { + + ServerStreamingCallable base = + GrpcRawCallableFactory.createServerStreamingCallable( + GrpcCallSettings.newBuilder() + .setMethodDescriptor(methodDescriptor) + .setParamsExtractor(headerParamsFn) + .build(), + 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, + clientContext.getDefaultCallContext().withRetrySettings(callSettings.getRetrySettings()), + clientContext.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( @@ -1350,6 +1399,22 @@ private ServerStreamingCallable withR return retrying; } + private ServerStreamingCallable largeRowWithRetries( + ServerStreamingCallable innerCallable, + ServerStreamingCallSettings serverStreamingCallSettings) { + + // Retrying algorithm in retryingForLargeRows also takes RetryInfo into consideration, so we + // skip the check for settings.getEnableRetryInfo here + ServerStreamingCallable retrying; + retrying = + com.google.cloud.bigtable.gaxx.retrying.Callables.retryingForLargeRows( + innerCallable, serverStreamingCallSettings, clientContext); + if (settings.getEnableRoutingCookie()) { + return new CookiesServerStreamingCallable<>(retrying); + } + return retrying; + } + // // @@ -1358,11 +1423,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; } @@ -1416,8 +1488,14 @@ public UnaryCallable readModifyWriteRowCallable() { return readChangeStreamCallable; } - UnaryCallable pingAndWarmCallable() { - return pingAndWarmCallable; + /** Returns an {@link com.google.cloud.bigtable.data.v2.stub.sql.ExecuteQueryCallable} */ + public ExecuteQueryCallable executeQueryCallable() { + return executeQueryCallable; + } + + @InternalApi + public UnaryCallable prepareQueryCallable() { + return prepareQueryCallable; } // 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 5a9e03cf10..31d6f76055 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 @@ -32,9 +32,13 @@ import com.google.api.gax.rpc.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.auth.Credentials; 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; import com.google.cloud.bigtable.data.v2.models.KeyOffset; @@ -44,8 +48,10 @@ 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.metrics.DefaultMetricsProvider; import com.google.cloud.bigtable.data.v2.stub.metrics.MetricsProvider; +import com.google.cloud.bigtable.data.v2.stub.metrics.Util; 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; @@ -53,15 +59,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; +import io.opentelemetry.sdk.OpenTelemetrySdk; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.Base64; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.Set; import java.util.logging.Logger; import javax.annotation.Nonnull; +import javax.annotation.Nullable; import org.threeten.bp.Duration; /** @@ -101,7 +110,14 @@ public class EnhancedBigtableStubSettings extends StubSettings IDEMPOTENT_RETRY_CODES = ImmutableSet.of(Code.DEADLINE_EXCEEDED, Code.UNAVAILABLE); @@ -187,6 +203,38 @@ public class EnhancedBigtableStubSettings extends StubSettings EXECUTE_QUERY_RETRY_CODES = + ImmutableSet.builder().addAll(IDEMPOTENT_RETRY_CODES).add(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) + .setJittered(true) + .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)) + .setInitialRpcTimeout(Duration.ofSeconds(5)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofSeconds(20)) + .setTotalTimeout(Duration.ofMinutes(10)) + .build(); + /** * Scopes that are equivalent to JWT's audience. * @@ -202,20 +250,19 @@ 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 boolean enableSkipTrailers; private final ServerStreamingCallSettings readRowsSettings; private final UnaryCallSettings readRowSettings; @@ -230,10 +277,15 @@ public class EnhancedBigtableStubSettings extends StubSettings readChangeStreamSettings; private final UnaryCallSettings pingAndWarmSettings; + private final ServerStreamingCallSettings executeQuerySettings; + private final UnaryCallSettings prepareQuerySettings; private final FeatureFlags featureFlags; private final MetricsProvider metricsProvider; + @Nullable private final String metricsEndpoint; + @Nonnull private final InternalMetricsProvider internalMetricsProvider; + private final String jwtAudience; private EnhancedBigtableStubSettings(Builder builder) { super(builder); @@ -258,10 +310,13 @@ private EnhancedBigtableStubSettings(Builder builder) { appProfileId = builder.appProfileId; isRefreshingChannel = builder.isRefreshingChannel; primedTableIds = builder.primedTableIds; - jwtAudienceMapping = builder.jwtAudienceMapping; enableRoutingCookie = builder.enableRoutingCookie; enableRetryInfo = builder.enableRetryInfo; + enableSkipTrailers = builder.enableSkipTrailers; metricsProvider = builder.metricsProvider; + metricsEndpoint = builder.metricsEndpoint; + internalMetricsProvider = builder.internalMetricsProvider; + jwtAudience = builder.jwtAudience; // Per method settings. readRowsSettings = builder.readRowsSettings.build(); @@ -276,6 +331,8 @@ private EnhancedBigtableStubSettings(Builder builder) { builder.generateInitialChangeStreamPartitionsSettings.build(); readChangeStreamSettings = builder.readChangeStreamSettings.build(); pingAndWarmSettings = builder.pingAndWarmSettings.build(); + executeQuerySettings = builder.executeQuerySettings.build(); + prepareQuerySettings = builder.prepareQuerySettings.build(); featureFlags = builder.featureFlags.build(); } @@ -318,9 +375,14 @@ public List getPrimedTableIds() { return primedTableIds; } + /** + * @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,22 +407,48 @@ public boolean getEnableRetryInfo() { return enableRetryInfo; } + boolean getEnableSkipTrailers() { + return enableSkipTrailers; + } + + /** + * 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 internalMetricsProvider == DEFAULT_INTERNAL_OTEL_PROVIDER; + } + + InternalMetricsProvider getInternalMetricsProvider() { + return internalMetricsProvider; + } + /** 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) { + if (DIRECT_PATH_ENABLED) { // 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); + grpcTransportProviderBuilder + .setAttemptDirectPathXds() + .setAttemptDirectPath(true) + // Allow using non-default service account in DirectPath. + .setAllowNonDefaultServiceAccount(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) @@ -614,6 +702,36 @@ public UnaryCallSettings readModifyWriteRowSettings() { return readChangeStreamSettings; } + public ServerStreamingCallSettings executeQuerySettings() { + return 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 prepareQuerySettings; + } + /** * Returns the object with the settings used for calls to PingAndWarm. * @@ -636,9 +754,10 @@ public static class Builder extends StubSettings.Builder primedTableIds; - private Map jwtAudienceMapping; + private String jwtAudience; private boolean enableRoutingCookie; private boolean enableRetryInfo; + private boolean enableSkipTrailers; private final ServerStreamingCallSettings.Builder readRowsSettings; private final UnaryCallSettings.Builder readRowSettings; @@ -654,10 +773,15 @@ public static class Builder extends StubSettings.Builder readChangeStreamSettings; private final UnaryCallSettings.Builder pingAndWarmSettings; + private final ServerStreamingCallSettings.Builder executeQuerySettings; + private final UnaryCallSettings.Builder + prepareQuerySettings; private FeatureFlags.Builder featureFlags; private MetricsProvider metricsProvider; + @Nullable private String metricsEndpoint; + private InternalMetricsProvider internalMetricsProvider; /** * Initializes a new Builder with sane defaults for all settings. @@ -671,11 +795,13 @@ private Builder() { this.appProfileId = SERVER_DEFAULT_APP_PROFILE_ID; this.isRefreshingChannel = true; primedTableIds = ImmutableList.of(); - jwtAudienceMapping = DEFAULT_JWT_AUDIENCE_MAPPING; setCredentialsProvider(defaultCredentialsProviderBuilder().build()); this.enableRoutingCookie = true; this.enableRetryInfo = true; + this.enableSkipTrailers = SKIP_TRAILERS; metricsProvider = DefaultMetricsProvider.INSTANCE; + this.internalMetricsProvider = DEFAULT_INTERNAL_OTEL_PROVIDER; + this.jwtAudience = DEFAULT_DATA_JWT_AUDIENCE; // Defaults provider BigtableStubSettings.Builder baseDefaults = BigtableStubSettings.newBuilder(); @@ -703,8 +829,7 @@ private Builder() { sampleRowKeysSettings .setRetryableCodes(IDEMPOTENT_RETRY_CODES) .setRetrySettings( - IDEMPOTENT_RETRY_SETTINGS - .toBuilder() + IDEMPOTENT_RETRY_SETTINGS.toBuilder() .setInitialRpcTimeout(Duration.ofMinutes(5)) .setMaxRpcTimeout(Duration.ofMinutes(5)) .build()); @@ -782,8 +907,24 @@ private Builder() { .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); + featureFlags = - FeatureFlags.newBuilder().setReverseScans(true).setLastScannedRowResponses(true); + FeatureFlags.newBuilder() + .setReverseScans(true) + .setLastScannedRowResponses(true) + .setDirectAccessRequested(DIRECT_PATH_ENABLED) + .setTrafficDirectorEnabled(DIRECT_PATH_ENABLED); } private Builder(EnhancedBigtableStubSettings settings) { @@ -793,10 +934,12 @@ private Builder(EnhancedBigtableStubSettings settings) { appProfileId = settings.appProfileId; isRefreshingChannel = settings.isRefreshingChannel; primedTableIds = settings.primedTableIds; - jwtAudienceMapping = settings.jwtAudienceMapping; enableRoutingCookie = settings.enableRoutingCookie; enableRetryInfo = settings.enableRetryInfo; metricsProvider = settings.metricsProvider; + metricsEndpoint = settings.getMetricsEndpoint(); + internalMetricsProvider = settings.internalMetricsProvider; + jwtAudience = settings.jwtAudience; // Per method settings. readRowsSettings = settings.readRowsSettings.toBuilder(); @@ -811,8 +954,11 @@ private Builder(EnhancedBigtableStubSettings settings) { settings.generateInitialChangeStreamPartitionsSettings.toBuilder(); readChangeStreamSettings = settings.readChangeStreamSettings.toBuilder(); pingAndWarmSettings = settings.pingAndWarmSettings.toBuilder(); + executeQuerySettings = settings.executeQuerySettings().toBuilder(); + prepareQuerySettings = settings.prepareQuerySettings().toBuilder(); featureFlags = settings.featureFlags.toBuilder(); } + // /** @@ -824,6 +970,7 @@ private static void copyRetrySettings( dest.setRetryableCodes(source.getRetryableCodes()); dest.setRetrySettings(source.getRetrySettings()); } + // // @@ -934,9 +1081,20 @@ public List getPrimedTableIds() { return primedTableIds; } + /** + * @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; } @@ -964,9 +1122,55 @@ 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() { + return setInternalMetricsProvider(DISABLED_INTERNAL_OTEL_PROVIDER); + } + + // For testing + @InternalApi + public Builder setInternalMetricsProvider(InternalMetricsProvider internalMetricsProvider) { + this.internalMetricsProvider = internalMetricsProvider; + return this; + } + + /** Checks if internal metrics are disabled */ + public boolean areInternalMetricsEnabled() { + return internalMetricsProvider == DISABLED_INTERNAL_OTEL_PROVIDER; + } + + /** + * @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; } /** @@ -1007,6 +1211,11 @@ public boolean getEnableRetryInfo() { return enableRetryInfo; } + Builder setEnableSkipTrailers(boolean enabled) { + this.enableSkipTrailers = enabled; + return this; + } + /** Returns the builder for the settings used for calls to readRows. */ public ServerStreamingCallSettings.Builder readRowsSettings() { return readRowsSettings; @@ -1066,6 +1275,23 @@ public UnaryCallSettings.Builder pingAndWarmSettings() return pingAndWarmSettings; } + /** + * Returns the builder for the settings used for calls to ExecuteQuery + * + *

    Note that this will currently ignore any retry settings other than deadlines. ExecuteQuery + * requests will not be retried currently. + */ + @BetaApi + public ServerStreamingCallSettings.Builder executeQuerySettings() { + return executeQuerySettings; + } + + /** Returns the builder with the settings used for calls to PrepareQuery */ + @BetaApi + public UnaryCallSettings.Builder prepareQuerySettings() { + return prepareQuerySettings; + } + @SuppressWarnings("unchecked") public EnhancedBigtableStubSettings build() { Preconditions.checkState(projectId != null, "Project id must be set"); @@ -1120,9 +1346,9 @@ public String toString() { .add("appProfileId", appProfileId) .add("isRefreshingChannel", isRefreshingChannel) .add("primedTableIds", primedTableIds) - .add("jwtAudienceMapping", jwtAudienceMapping) .add("enableRoutingCookie", enableRoutingCookie) .add("enableRetryInfo", enableRetryInfo) + .add("enableSkipTrailers", enableSkipTrailers) .add("readRowsSettings", readRowsSettings) .add("readRowSettings", readRowSettings) .add("sampleRowKeysSettings", sampleRowKeysSettings) @@ -1136,8 +1362,26 @@ public String toString() { generateInitialChangeStreamPartitionsSettings) .add("readChangeStreamSettings", readChangeStreamSettings) .add("pingAndWarmSettings", pingAndWarmSettings) + .add("executeQuerySettings", executeQuerySettings) + .add("prepareQuerySettings", prepareQuerySettings) .add("metricsProvider", metricsProvider) + .add("metricsEndpoint", metricsEndpoint) + .add("areInternalMetricsEnabled", internalMetricsProvider == DEFAULT_INTERNAL_OTEL_PROVIDER) + .add("jwtAudience", jwtAudience) .add("parent", super.toString()) .toString(); } + + @InternalApi + @FunctionalInterface + public interface InternalMetricsProvider { + @Nullable + OpenTelemetrySdk createOtelProvider( + EnhancedBigtableStubSettings userSettings, Credentials creds) throws IOException; + } + + private static final InternalMetricsProvider DEFAULT_INTERNAL_OTEL_PROVIDER = + Util::newInternalOpentelemetry; + private static final InternalMetricsProvider DISABLED_INTERNAL_OTEL_PROVIDER = + (ignored1, ignored2) -> null; } 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..fef48f232c 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 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. 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 60f611e636..fc2ba837a1 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 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. @@ -28,6 +28,8 @@ import com.google.api.pathtemplate.PathTemplate; 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; @@ -36,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; @@ -156,6 +160,26 @@ public class GrpcBigtableStub extends BigtableStub { ProtoUtils.marshaller(ReadChangeStreamResponse.getDefaultInstance())) .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())) + .build(); + + private static final MethodDescriptor + executeQueryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName("google.bigtable.v2.Bigtable/ExecuteQuery") + .setRequestMarshaller(ProtoUtils.marshaller(ExecuteQueryRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ExecuteQueryResponse.getDefaultInstance())) + .build(); + private final ServerStreamingCallable readRowsCallable; private final ServerStreamingCallable sampleRowKeysCallable; @@ -172,6 +196,9 @@ public class GrpcBigtableStub extends BigtableStub { generateInitialChangeStreamPartitionsCallable; private final ServerStreamingCallable readChangeStreamCallable; + private final UnaryCallable prepareQueryCallable; + private final ServerStreamingCallable + executeQueryCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -182,36 +209,31 @@ 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 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 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 = @@ -221,8 +243,15 @@ 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 = + PathTemplate.create("{app_profile_id=**}"); public static final GrpcBigtableStub create(BigtableStubSettings settings) throws IOException { return new GrpcBigtableStub(settings, ClientContext.create(settings)); @@ -269,9 +298,7 @@ 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); return builder.build(); }) .build(); @@ -287,7 +314,7 @@ 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); return builder.build(); }) @@ -302,9 +329,7 @@ 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(); }) .build(); @@ -318,9 +343,7 @@ 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(); }) .build(); @@ -341,7 +364,7 @@ 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(); }) @@ -375,7 +398,7 @@ 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(); }) @@ -407,6 +430,30 @@ protected GrpcBigtableStub( return builder.build(); }) .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(); + }) + .build(); + GrpcCallSettings executeQueryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(executeQueryMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getInstanceName(), "name", EXECUTE_QUERY_0_PATH_TEMPLATE); + builder.add( + request.getAppProfileId(), "app_profile_id", EXECUTE_QUERY_1_PATH_TEMPLATE); + return builder.build(); + }) + .build(); this.readRowsCallable = callableFactory.createServerStreamingCallable( @@ -441,6 +488,12 @@ 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); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -502,6 +555,16 @@ public UnaryCallable pingAndWarmCallabl return readChangeStreamCallable; } + @Override + public UnaryCallable prepareQueryCallable() { + return prepareQueryCallable; + } + + @Override + public ServerStreamingCallable executeQueryCallable() { + return executeQueryCallable; + } + @Override public final void close() { try { 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..aed412fd0d --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/NoOpChannelPrimer.java @@ -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. + */ +package com.google.cloud.bigtable.data.v2.stub; + +import com.google.api.core.InternalApi; +import com.google.api.gax.grpc.ChannelPrimer; +import io.grpc.ManagedChannel; + +@InternalApi +public class NoOpChannelPrimer implements ChannelPrimer { + static NoOpChannelPrimer create() { + return new NoOpChannelPrimer(); + } + + private NoOpChannelPrimer() {} + + @Override + public void primeChannel(ManagedChannel managedChannel) { + // No op + } +} 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..c3b0f94ec7 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 @@ -30,13 +30,13 @@ 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; class RateLimitingServerStreamingCallable extends ServerStreamingCallable { 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/changestream/ChangeStreamStateMachine.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java index 912b55eceb..4e1cb4463f 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 @@ -22,7 +22,6 @@ 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. * @@ -334,18 +335,19 @@ State handleDataChange(ReadChangeStreamResponse.DataChange dataChange) { "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) { 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; } } @@ -485,6 +492,16 @@ State handleDataChange(ReadChangeStreamResponse.DataChange dataChange) { Value.fromProto(mod.getAddToCell().getColumnQualifier()), Value.fromProto(mod.getAddToCell().getTimestamp()), Value.fromProto(mod.getAddToCell().getInput())); + continue; + } + // Case 5: MergeToCell + if (mod.hasMergeToCell()) { + builder.mergeToCell( + mod.getMergeToCell().getFamilyName(), + Value.fromProto(mod.getMergeToCell().getColumnQualifier()), + Value.fromProto(mod.getMergeToCell().getTimestamp()), + Value.fromProto(mod.getMergeToCell().getInput())); + continue; } throw new IllegalStateException( "Received unknown mod type. You may need to upgrade your Bigtable client."); @@ -568,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/metrics/BigtableCloudMonitoringExporter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableCloudMonitoringExporter.java index f6a2527302..1244ee5fdc 100644 --- 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 @@ -16,6 +16,7 @@ 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_LATENCIES2_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; @@ -23,6 +24,7 @@ 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.REMAINING_DEADLINE_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; @@ -39,8 +41,10 @@ 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.base.Preconditions; +import com.google.common.base.Supplier; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.util.concurrent.MoreExecutors; @@ -54,17 +58,19 @@ 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.Optional; import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicLong; import java.util.logging.Level; import java.util.logging.Logger; import java.util.stream.Collectors; import javax.annotation.Nullable; -import org.threeten.bp.Duration; /** * Bigtable Cloud Monitoring OpenTelemetry Exporter. @@ -79,11 +85,12 @@ public final class BigtableCloudMonitoringExporter implements MetricExporter { 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()); + // 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"); private static final String APPLICATION_RESOURCE_PROJECT_ID = "project_id"; @@ -91,246 +98,126 @@ public final class BigtableCloudMonitoringExporter implements MetricExporter { // 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 exporterName; - private final String bigtableProjectId; - private final String taskId; + private final MetricServiceClient client; - // The resource the client application is running on - private final MonitoredResource applicationResource; + private final TimeSeriesConverter timeSeriesConverter; 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 { + private final AtomicBoolean exportFailureLogged = new AtomicBoolean(false); + + static BigtableCloudMonitoringExporter create( + String exporterName, + @Nullable Credentials credentials, + @Nullable String endpoint, + String universeDomain, + TimeSeriesConverter converter) + throws IOException { + Preconditions.checkNotNull(universeDomain); 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); + settingsBuilder.setUniverseDomain(universeDomain); - // 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); + 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( - projectId, - MetricServiceClient.create(settingsBuilder.build()), - applicationResource, - BigtableExporterUtils.getDefaultTaskValue()); + exporterName, MetricServiceClient.create(settingsBuilder.build()), converter); } @VisibleForTesting BigtableCloudMonitoringExporter( - String projectId, - MetricServiceClient client, - @Nullable MonitoredResource applicationResource, - String taskId) { + String exporterName, MetricServiceClient client, TimeSeriesConverter converter) { + this.exporterName = exporterName; this.client = client; - this.taskId = taskId; - this.applicationResource = applicationResource; - this.bigtableProjectId = projectId; + this.timeSeriesConverter = converter; } @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)); + public CompletableResultCode export(Collection metricData) { + Preconditions.checkState(!isShutdown.get(), "Exporter is shutting down"); + lastExportCode = doExport(metricData); 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(); - } + private CompletableResultCode doExport(Collection metricData) { + Map> bigtableTimeSeries; - // 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) { + bigtableTimeSeries = timeSeriesConverter.convert(metricData); + } catch (Throwable t) { logger.log( Level.WARNING, - "Failed to convert bigtable table metric data to cloud monitoring timeseries.", - e); + String.format( + "Failed to convert %s metric data to cloud monitoring timeseries.", exporterName), + t); 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()) { + // Skips exporting if there's none + if (bigtableTimeSeries.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()); + bigtableTimeSeries.forEach( + (projectName, ts) -> { + ApiFuture> future = exportTimeSeries(projectName, ts); + ApiFutures.addCallback( + future, + new ApiFutureCallback>() { + @Override + public void onFailure(Throwable throwable) { + if (exportFailureLogged.compareAndSet(false, true)) { + String msg = + String.format( + "createServiceTimeSeries request failed for %s.", exporterName); + 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(); } - 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(); - } + + @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. + exportFailureLogged.set(false); + exportCode.succeed(); + } + }, + MoreExecutors.directExecutor()); + }); return exportCode; } @@ -394,4 +281,78 @@ public CompletableResultCode shutdown() { public AggregationTemporality getAggregationTemporality(InstrumentType instrumentType) { return AggregationTemporality.CUMULATIVE; } + + interface TimeSeriesConverter { + Map> convert(Collection metricData); + } + + static class PublicTimeSeriesConverter implements TimeSeriesConverter { + private static final ImmutableList BIGTABLE_TABLE_METRICS = + ImmutableSet.of( + OPERATION_LATENCIES_NAME, + ATTEMPT_LATENCIES_NAME, + ATTEMPT_LATENCIES2_NAME, + SERVER_LATENCIES_NAME, + FIRST_RESPONSE_LATENCIES_NAME, + CLIENT_BLOCKING_LATENCIES_NAME, + APPLICATION_BLOCKING_LATENCIES_NAME, + RETRY_COUNT_NAME, + CONNECTIVITY_ERROR_COUNT_NAME, + REMAINING_DEADLINE_NAME) + .stream() + .map(m -> METER_NAME + m) + .collect(ImmutableList.toImmutableList()); + + private static final AtomicLong nextTaskIdSuffix = new AtomicLong(); + private final String taskId; + + PublicTimeSeriesConverter() { + this( + BigtableExporterUtils.DEFAULT_TASK_VALUE.get() + + "-" + + nextTaskIdSuffix.getAndIncrement()); + } + + PublicTimeSeriesConverter(String taskId) { + this.taskId = taskId; + } + + @Override + public Map> convert(Collection metricData) { + List relevantData = + metricData.stream() + .filter(md -> BIGTABLE_TABLE_METRICS.contains(md.getName())) + .collect(Collectors.toList()); + if (relevantData.isEmpty()) { + return ImmutableMap.of(); + } + return BigtableExporterUtils.convertToBigtableTimeSeries(relevantData, taskId); + } + } + + static class InternalTimeSeriesConverter implements TimeSeriesConverter { + private static final ImmutableList APPLICATION_METRICS = + ImmutableSet.of(PER_CONNECTION_ERROR_COUNT_NAME).stream() + .map(m -> METER_NAME + m) + .collect(ImmutableList.toImmutableList()); + + private final Supplier monitoredResource; + + InternalTimeSeriesConverter(Supplier monitoredResource) { + this.monitoredResource = monitoredResource; + } + + @Override + public Map> convert(Collection metricData) { + MonitoredResource monitoredResource = this.monitoredResource.get(); + if (monitoredResource == null) { + return ImmutableMap.of(); + } + + return ImmutableMap.of( + ProjectName.of(monitoredResource.getLabelsOrThrow(APPLICATION_RESOURCE_PROJECT_ID)), + BigtableExporterUtils.convertToApplicationResourceTimeSeries( + metricData, monitoredResource)); + } + } } 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 index 5bf6688e17..0ee22b3625 100644 --- 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 @@ -28,7 +28,9 @@ 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.GRPC_METRICS; 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.INTERNAL_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.TABLE_ID_KEY; import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.ZONE_ID_KEY; @@ -36,13 +38,19 @@ import com.google.api.Distribution; import com.google.api.Metric; import com.google.api.MonitoredResource; +import com.google.cloud.bigtable.Version; +import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; 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.base.Supplier; +import com.google.common.base.Suppliers; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; 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; @@ -62,17 +70,24 @@ import java.net.InetAddress; import java.net.UnknownHostException; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; +import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; +import java.util.Optional; import java.util.Set; 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; /** Utils to convert OpenTelemetry types to Google Cloud Monitoring types. */ class BigtableExporterUtils { + private static final String CLIENT_NAME = "java-bigtable/" + Version.VERSION; private static final Logger logger = Logger.getLogger(BigtableExporterUtils.class.getName()); @@ -83,13 +98,28 @@ class BigtableExporterUtils { ImmutableSet.of( BIGTABLE_PROJECT_ID_KEY, INSTANCE_ID_KEY, TABLE_ID_KEY, CLUSTER_ID_KEY, ZONE_ID_KEY); + 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 nextUuidSuffix = new AtomicLong(); + 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() { + private static String defaultTaskValue = null; + + static final Supplier DEFAULT_TASK_VALUE = + Suppliers.memoize(BigtableExporterUtils::computeDefaultTaskValue); + + private static String computeDefaultTaskValue() { + if (defaultTaskValue != null) { + return defaultTaskValue; + } // Something like '@' final String jvmName = ManagementFactory.getRuntimeMXBean().getName(); // If jvm doesn't have the expected format, fallback to the local hostname @@ -106,104 +136,124 @@ static String getDefaultTaskValue() { return "java-" + UUID.randomUUID() + jvmName; } - static String getProjectId(PointData pointData) { - return pointData.getAttributes().get(BIGTABLE_PROJECT_ID_KEY); + static ProjectName getProjectName(PointData pointData) { + return ProjectName.of(pointData.getAttributes().get(BIGTABLE_PROJECT_ID_KEY)); } - static List convertToBigtableTimeSeries(List collection, String taskId) { - List allTimeSeries = new ArrayList<>(); + // Returns a list of timeseries by project name + static Map> convertToBigtableTimeSeries( + Collection collection, String taskId) { + Map> allTimeSeries = new HashMap<>(); 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); + + for (PointData pd : metricData.getData().getPoints()) { + ProjectName projectName = getProjectName(pd); + List current = + allTimeSeries.computeIfAbsent(projectName, ignored -> new ArrayList<>()); + current.add(convertPointToBigtableTimeSeries(metricData, pd, taskId)); + allTimeSeries.put(projectName, current); + } } return allTimeSeries; } static List convertToApplicationResourceTimeSeries( - Collection collection, String taskId, MonitoredResource applicationResource) { + Collection collection, 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); + createInternalMetricsTimeSeries(metricData, pointData, applicationResource)) + .filter(Optional::isPresent) + .forEach(ts -> ts.ifPresent(allTimeSeries::add)); } return allTimeSeries; } @Nullable - static MonitoredResource detectResource() { - GCPPlatformDetector detector = GCPPlatformDetector.DEFAULT_INSTANCE; - DetectedPlatform detectedPlatform = detector.detectPlatform(); - MonitoredResource monitoredResource = null; + static MonitoredResource createInternalMonitoredResource(EnhancedBigtableStubSettings settings) { 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) { + MonitoredResource monitoredResource = detectResource(settings); + logger.log(Level.FINE, "Internal metrics monitored resource: %s", monitoredResource); + return monitoredResource; + } catch (Exception e) { logger.log( Level.WARNING, - "Failed to create monitored resource for " + detectedPlatform.getSupportedPlatform(), + "Failed to detect resource, will skip exporting application level metrics ", e); + return null; } - 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(); - } + @Nullable + private static MonitoredResource detectResource(EnhancedBigtableStubSettings settings) { + GCPPlatformDetector detector = GCPPlatformDetector.DEFAULT_INSTANCE; + DetectedPlatform detectedPlatform = detector.detectPlatform(); - 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(); - } + @Nullable + String cloud_platform = SUPPORTED_PLATFORM_MAP.get(detectedPlatform.getSupportedPlatform()); + if (cloud_platform == null) { + return null; + } - 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); + 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 = Arrays.stream(region.split("-")).limit(2).collect(Collectors.joining("-")); + + String hostname = attrs.get(AttributeKeys.GCE_INSTANCE_HOSTNAME); + // if (hostname == null) { + // hostname = attrs.get(AttributeKeys.SERVERLESS_COMPUTE_NAME); + // } + // if (hostname == null) { + // hostname = attrs.get(AttributeKeys.GAE_MODULE_NAME); + // } + if (hostname == null) { + hostname = System.getenv("HOSTNAME"); } - return value; + if (hostname == null) { + try { + hostname = InetAddress.getLocalHost().getHostName(); + } catch (UnknownHostException ignored) { + } + } + if (hostname == null) { + hostname = ""; + } + + return MonitoredResource.newBuilder() + .setType("bigtable_client") + .putLabels("project_id", settings.getProjectId()) + .putLabels("instance", settings.getInstanceId()) + .putLabels("app_profile", settings.getAppProfileId()) + .putLabels("client_project", detectedPlatform.getProjectId()) + .putLabels("region", region) + .putLabels("cloud_platform", cloud_platform) + .putLabels("host_id", attrs.get(AttributeKeys.GKE_HOST_ID)) + .putLabels("host_name", hostname) + .putLabels("client_name", CLIENT_NAME) + .putLabels("uuid", DEFAULT_TASK_VALUE.get() + "-" + nextUuidSuffix.getAndIncrement()) + .build(); } private static TimeSeries convertPointToBigtableTimeSeries( @@ -242,25 +292,30 @@ private static TimeSeries convertPointToBigtableTimeSeries( return builder.build(); } - private static TimeSeries convertPointToApplicationResourceTimeSeries( - MetricData metricData, - PointData pointData, - String taskId, - MonitoredResource applicationResource) { + private static Optional createInternalMetricsTimeSeries( + MetricData metricData, PointData pointData, 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))); + final Metric.Builder metricBuilder; + // TODO: clean this up + // Internal metrics are based on views that include the metric prefix + // gRPC metrics dont have views and are dot encoded + // To unify these: + // - the useless views should be removed + // - internal metrics should use relative metric names w/o the prefix + if (INTERNAL_METRICS.contains(metricData.getName())) { + metricBuilder = newApplicationMetricBuilder(metricData.getName(), pointData.getAttributes()); + } else if (GRPC_METRICS.containsKey(metricData.getName())) { + metricBuilder = newGrpcMetricBuilder(metricData.getName(), pointData.getAttributes()); + } else { + logger.fine("Skipping unexpected internal metric: " + metricData.getName()); + return Optional.empty(); } - metricBuilder.putLabels(CLIENT_UID_KEY.getKey(), taskId); builder.setMetric(metricBuilder.build()); TimeInterval timeInterval = @@ -270,7 +325,42 @@ private static TimeSeries convertPointToApplicationResourceTimeSeries( .build(); builder.addPoints(createPoint(metricData.getType(), pointData, timeInterval)); - return builder.build(); + return Optional.of(builder.build()); + } + + private static Metric.Builder newApplicationMetricBuilder( + String metricName, Attributes attributes) { + // TODO: unify handling of metric prefixes + Metric.Builder metricBuilder = Metric.newBuilder().setType(metricName); + for (Map.Entry, Object> e : attributes.asMap().entrySet()) { + metricBuilder.putLabels(e.getKey().getKey(), String.valueOf(e.getValue())); + } + return metricBuilder; + } + + private static Metric.Builder newGrpcMetricBuilder(String grpcMetricName, Attributes attributes) { + Set allowedAttrs = GRPC_METRICS.get(grpcMetricName); + + Metric.Builder metricBuilder = + Metric.newBuilder() + .setType("bigtable.googleapis.com/internal/client/" + grpcMetricName.replace('.', '/')); + for (Map.Entry, Object> e : attributes.asMap().entrySet()) { + String attrKey = e.getKey().getKey(); + Object attrValue = e.getValue(); + + // gRPC metrics are experimental and can change attribute names, to avoid incompatibility with + // the predefined + // metric schemas in stackdriver, filter out unknown keys + if (!allowedAttrs.contains(attrKey)) { + continue; + } + // translate grpc key format to be compatible with cloud monitoring: + // grpc.xds_client.server_failure -> grpc_xds_client_server_failure + String normalizedKey = attrKey.replace('.', '_'); + metricBuilder.putLabels(normalizedKey, String.valueOf(attrValue)); + } + + return metricBuilder; } private static MetricKind convertMetricKind(MetricData metricData) { 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/stub/metrics/BigtableGrpcStreamTracer.java index 3b2242385a..a364adbc46 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/stub/metrics/BigtableGrpcStreamTracer.java @@ -15,11 +15,10 @@ */ package com.google.cloud.bigtable.data.v2.stub.metrics; -import com.google.common.base.Stopwatch; -import io.grpc.Attributes; +import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsTracer.TransportAttrs; import io.grpc.ClientStreamTracer; import io.grpc.Metadata; -import java.util.concurrent.TimeUnit; +import io.grpc.Status; /** * Records the time a request is enqueued in a grpc channel queue. This a bridge between gRPC stream @@ -27,22 +26,42 @@ * asking gRPC to start an RPC and gRPC actually serializing that RPC. */ class BigtableGrpcStreamTracer extends ClientStreamTracer { + private static final String GRPC_LB_LOCALITY_KEY = "grpc.lb.locality"; + private static final String GRPC_LB_BACKEND_SERVICE_KEY = "grpc.lb.backend_service"; - private final Stopwatch stopwatch = Stopwatch.createUnstarted(); + private final StreamInfo info; private final BigtableTracer tracer; + private volatile String backendService = null; + private volatile String locality = null; - public BigtableGrpcStreamTracer(BigtableTracer tracer) { + public BigtableGrpcStreamTracer(StreamInfo info, BigtableTracer tracer) { + this.info = info; this.tracer = tracer; } @Override - public void streamCreated(Attributes transportAttrs, Metadata headers) { - stopwatch.start(); + public void outboundMessageSent(int seqNo, long optionalWireSize, long optionalUncompressedSize) { + tracer.grpcMessageSent(); } @Override - public void outboundMessageSent(int seqNo, long optionalWireSize, long optionalUncompressedSize) { - tracer.grpcChannelQueuedLatencies(stopwatch.elapsed(TimeUnit.NANOSECONDS)); + public void addOptionalLabel(String key, String value) { + switch (key) { + case GRPC_LB_LOCALITY_KEY: + this.locality = value; + break; + case GRPC_LB_BACKEND_SERVICE_KEY: + this.backendService = value; + break; + } + + super.addOptionalLabel(key, value); + } + + @Override + public void streamClosed(Status status) { + tracer.setTransportAttrs(TransportAttrs.create(locality, backendService)); + super.streamClosed(status); } static class Factory extends ClientStreamTracer.Factory { @@ -56,7 +75,7 @@ static class Factory extends ClientStreamTracer.Factory { @Override public ClientStreamTracer newClientStreamTracer( ClientStreamTracer.StreamInfo info, Metadata headers) { - return new BigtableGrpcStreamTracer(tracer); + return new BigtableGrpcStreamTracer(info, tracer); } } } 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..083b5dabc9 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 @@ -19,6 +19,7 @@ import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.tracing.ApiTracer; import com.google.api.gax.tracing.BaseApiTracer; +import java.time.Duration; import javax.annotation.Nullable; /** @@ -52,6 +53,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 @@ -83,7 +91,28 @@ public void setLocations(String zone, String cluster) { // noop } + /** Set the underlying transport used to process the attempt */ + public void setTransportAttrs(BuiltinMetricsTracer.TransportAttrs attrs) {} + + @Deprecated + /** + * @deprecated {@link #grpcMessageSent()} is called instead. + */ public void grpcChannelQueuedLatencies(long queuedTimeMs) { // noop } + + /** Called when the message is sent on a grpc channel. */ + public void grpcMessageSent() { + // noop + } + + /** + * 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 + } } 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/stub/metrics/BigtableTracerStreamingCallable.java index 167cd0dc2e..13b832b8b1 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/stub/metrics/BigtableTracerStreamingCallable.java @@ -59,9 +59,12 @@ public void call( final GrpcResponseMetadata responseMetadata = new GrpcResponseMetadata(); // tracer should always be an instance of bigtable tracer if (context.getTracer() instanceof BigtableTracer) { + BigtableTracer tracer = (BigtableTracer) context.getTracer(); BigtableTracerResponseObserver innerObserver = - new BigtableTracerResponseObserver<>( - responseObserver, (BigtableTracer) context.getTracer(), responseMetadata); + new BigtableTracerResponseObserver<>(responseObserver, tracer, responseMetadata); + if (context.getRetrySettings() != null) { + tracer.setTotalTimeoutDuration(context.getRetrySettings().getTotalTimeoutDuration()); + } innerCallable.call( request, innerObserver, 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 index 7dfca8b753..37ba74bfdb 100644 --- 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 @@ -54,10 +54,14 @@ public BigtableTracerUnaryCallable(@Nonnull UnaryCallable i public ApiFuture futureCall(RequestT request, ApiCallContext context) { // tracer should always be an instance of BigtableTracer if (context.getTracer() instanceof BigtableTracer) { + BigtableTracer tracer = (BigtableTracer) context.getTracer(); final GrpcResponseMetadata responseMetadata = new GrpcResponseMetadata(); BigtableTracerUnaryCallback callback = new BigtableTracerUnaryCallback( (BigtableTracer) context.getTracer(), responseMetadata); + if (context.getRetrySettings() != null) { + tracer.setTotalTimeoutDuration(context.getRetrySettings().getTotalTimeoutDuration()); + } ApiFuture future = innerCallable.futureCall( request, 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 index d85300828b..78ed689cc3 100644 --- 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 @@ -50,17 +50,61 @@ public class BuiltinMetricsConstants { static final AttributeKey STATUS_KEY = AttributeKey.stringKey("status"); static final AttributeKey CLIENT_UID_KEY = AttributeKey.stringKey("client_uid"); + static final AttributeKey TRANSPORT_TYPE = AttributeKey.stringKey("transport_type"); + static final AttributeKey TRANSPORT_REGION = AttributeKey.stringKey("transport_region"); + static final AttributeKey TRANSPORT_ZONE = AttributeKey.stringKey("transport_zone"); + static final AttributeKey TRANSPORT_SUBZONE = AttributeKey.stringKey("transport_subzone"); + + public static final String METER_NAME = "bigtable.googleapis.com/internal/client/"; + // Metric names public static final String OPERATION_LATENCIES_NAME = "operation_latencies"; public static final String ATTEMPT_LATENCIES_NAME = "attempt_latencies"; + // Temporary workaround for not being able to add new labels to ATTEMPT_LATENCIES_NAME + public static final String ATTEMPT_LATENCIES2_NAME = "attempt_latencies2"; 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 REMAINING_DEADLINE_NAME = "remaining_deadline"; static final String CLIENT_BLOCKING_LATENCIES_NAME = "throttling_latencies"; static final String PER_CONNECTION_ERROR_COUNT_NAME = "per_connection_error_count"; + // Start allow list of metrics that will be exported as internal + public static final Map> GRPC_METRICS = + ImmutableMap.>builder() + .put( + "grpc.client.attempt.duration", + ImmutableSet.of("grpc.lb.locality", "grpc.method", "grpc.target", "grpc.status")) + .put( + "grpc.lb.rls.default_target_picks", + ImmutableSet.of("grpc.lb.rls.data_plane_target", "grpc.lb.pick_result")) + .put( + "grpc.lb.rls.target_picks", + ImmutableSet.of( + "grpc.target", + "grpc.lb.rls.server_target", + "grpc.lb.rls.data_plane_target", + "grpc.lb.pick_result")) + .put( + "grpc.lb.rls.failed_picks", + ImmutableSet.of("grpc.target", "grpc.lb.rls.server_target")) + // TODO: "grpc.xds_client.connected" + .put("grpc.xds_client.server_failure", ImmutableSet.of("grpc.target", "grpc.xds.server")) + // TODO: "grpc.xds_client.resource_updates_valid", + .put( + "grpc.xds_client.resource_updates_invalid", + ImmutableSet.of("grpc.target", "grpc.xds.server", "grpc.xds.resource_type")) + // TODO: "grpc.xds_client.resources" + .build(); + + public static final Set INTERNAL_METRICS = + ImmutableSet.of(PER_CONNECTION_ERROR_COUNT_NAME).stream() + .map(m -> METER_NAME + m) + .collect(ImmutableSet.toImmutableSet()); + // End allow list of metrics that will be exported + // 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 = @@ -96,8 +140,6 @@ public class BuiltinMetricsConstants { 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, @@ -139,6 +181,20 @@ static void defineView( viewMap.put(selector, view); } + public static Map getInternalViews() { + ImmutableMap.Builder views = ImmutableMap.builder(); + 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(); + } + public static Map getAllViews() { ImmutableMap.Builder views = ImmutableMap.builder(); @@ -162,6 +218,22 @@ public static Map getAllViews() { .addAll(COMMON_ATTRIBUTES) .add(STREAMING_KEY, STATUS_KEY) .build()); + defineView( + views, + ATTEMPT_LATENCIES2_NAME, + AGGREGATION_WITH_MILLIS_HISTOGRAM, + InstrumentType.HISTOGRAM, + "ms", + ImmutableSet.builder() + .addAll(COMMON_ATTRIBUTES) + .add( + STREAMING_KEY, + STATUS_KEY, + TRANSPORT_TYPE, + TRANSPORT_REGION, + TRANSPORT_ZONE, + TRANSPORT_SUBZONE) + .build()); defineView( views, SERVER_LATENCIES_NAME, @@ -204,15 +276,15 @@ public static Map getAllViews() { 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, + REMAINING_DEADLINE_NAME, + AGGREGATION_WITH_MILLIS_HISTOGRAM, InstrumentType.HISTOGRAM, - "1", + "ms", ImmutableSet.builder() - .add(BIGTABLE_PROJECT_ID_KEY, INSTANCE_ID_KEY, APP_PROFILE_KEY, CLIENT_NAME_KEY) + .addAll(COMMON_ATTRIBUTES) + .add(STREAMING_KEY, STATUS_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 index abd214d760..1f95224185 100644 --- 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 @@ -16,41 +16,73 @@ package com.google.cloud.bigtable.data.v2.stub.metrics; import static com.google.api.gax.tracing.ApiTracerFactory.OperationType; +import static com.google.api.gax.util.TimeConversionUtils.toJavaTimeDuration; 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.TRANSPORT_REGION; +import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.TRANSPORT_SUBZONE; +import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.TRANSPORT_TYPE; +import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.TRANSPORT_ZONE; import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.ZONE_ID_KEY; +import com.google.api.core.ObsoleteApi; import com.google.api.gax.retrying.ServerStreamingAttemptException; import com.google.api.gax.tracing.SpanName; +import com.google.auto.value.AutoValue; import com.google.cloud.bigtable.Version; import com.google.common.base.Stopwatch; +import com.google.common.base.Strings; import com.google.common.math.IntMath; +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; +import io.grpc.Deadline; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.metrics.DoubleHistogram; import io.opentelemetry.api.metrics.LongCounter; +import java.time.Duration; +import java.util.Map; 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 java.util.logging.Level; +import java.util.logging.Logger; 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 { + @AutoValue + abstract static class TransportAttrs { + @Nullable + abstract String getLocality(); + + @Nullable + abstract String getBackendService(); + + static TransportAttrs create(@Nullable String locality, @Nullable String backendService) { + return new AutoValue_BuiltinMetricsTracer_TransportAttrs(locality, backendService); + } + } + + private static final Logger logger = Logger.getLogger(BuiltinMetricsTracer.class.getName()); + private static final Gson GSON = new Gson(); + private static final TypeToken> LOCALITY_TYPE = + new TypeToken>() {}; private static final String NAME = "java-bigtable/" + Version.VERSION; private final OperationType operationType; private final SpanName spanName; // 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(); @@ -67,7 +99,6 @@ class BuiltinMetricsTracer extends BigtableTracer { // 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; @@ -75,15 +106,21 @@ class BuiltinMetricsTracer extends BigtableTracer { private final AtomicInteger requestLeft = new AtomicInteger(0); // Monitored resource labels - private String tableId = "unspecified"; + private String tableId = ""; private String zone = "global"; - private String cluster = "unspecified"; + private String cluster = ""; private final AtomicLong totalClientBlockingTime = new AtomicLong(0); private final Attributes baseAttributes; private Long serverLatencies = null; + private final AtomicLong grpcMessageSentDelay = new AtomicLong(0); + + private Deadline operationDeadline = null; + private volatile long remainingDeadlineAtAttemptStart = 0; + + private TransportAttrs transportAttrs = 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 @@ -91,10 +128,12 @@ class BuiltinMetricsTracer extends BigtableTracer { // point fall on the bucket boundary that causes off by one errors. private final DoubleHistogram operationLatenciesHistogram; private final DoubleHistogram attemptLatenciesHistogram; + private final DoubleHistogram attemptLatencies2Histogram; private final DoubleHistogram serverLatenciesHistogram; private final DoubleHistogram firstResponseLatenciesHistogram; private final DoubleHistogram clientBlockingLatenciesHistogram; private final DoubleHistogram applicationBlockingLatenciesHistogram; + private final DoubleHistogram remainingDeadlineHistogram; private final LongCounter connectivityErrorCounter; private final LongCounter retryCounter; @@ -104,10 +143,12 @@ class BuiltinMetricsTracer extends BigtableTracer { Attributes attributes, DoubleHistogram operationLatenciesHistogram, DoubleHistogram attemptLatenciesHistogram, + DoubleHistogram attemptLatencies2Histogram, DoubleHistogram serverLatenciesHistogram, DoubleHistogram firstResponseLatenciesHistogram, DoubleHistogram clientBlockingLatenciesHistogram, DoubleHistogram applicationBlockingLatenciesHistogram, + DoubleHistogram deadlineHistogram, LongCounter connectivityErrorCounter, LongCounter retryCounter) { this.operationType = operationType; @@ -116,10 +157,12 @@ class BuiltinMetricsTracer extends BigtableTracer { this.operationLatenciesHistogram = operationLatenciesHistogram; this.attemptLatenciesHistogram = attemptLatenciesHistogram; + this.attemptLatencies2Histogram = attemptLatencies2Histogram; this.serverLatenciesHistogram = serverLatenciesHistogram; this.firstResponseLatenciesHistogram = firstResponseLatenciesHistogram; this.clientBlockingLatenciesHistogram = clientBlockingLatenciesHistogram; this.applicationBlockingLatenciesHistogram = applicationBlockingLatenciesHistogram; + this.remainingDeadlineHistogram = deadlineHistogram; this.connectivityErrorCounter = connectivityErrorCounter; this.retryCounter = retryCounter; } @@ -132,6 +175,13 @@ public void close() {} }; } + @Override + public void operationFinishEarly() { + operationFinishedEarly.set(true); + attemptTimer.stop(); + operationTimer.stop(); + } + @Override public void operationSucceeded() { recordOperationCompletion(null); @@ -157,14 +207,16 @@ public void attemptStarted(Object request, int attemptNumber) { this.attempt = attemptNumber; attemptCount++; attemptTimer = Stopwatch.createStarted(); + if (operationDeadline != null) { + remainingDeadlineAtAttemptStart = operationDeadline.timeRemaining(TimeUnit.MILLISECONDS); + } if (request != null) { this.tableId = Util.extractTableId(request); } if (!flowControlIsDisabled) { synchronized (timerLock) { - if (!serverLatencyTimerIsRunning) { + if (!serverLatencyTimer.isRunning()) { serverLatencyTimer.start(); - serverLatencyTimerIsRunning = true; } } } @@ -180,8 +232,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 error, Duration delay) { + public void attemptFailed(Throwable error, org.threeten.bp.Duration delay) { + attemptFailedDuration(error, toJavaTimeDuration(delay)); + } + + @Override + public void attemptFailedDuration(Throwable error, Duration delay) { recordAttemptCompletion(error); } @@ -193,13 +255,17 @@ public void attemptPermanentFailure(Throwable 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 (!serverLatencyTimerIsRunning) { + if (!serverLatencyTimer.isRunning()) { serverLatencyTimer.start(); - serverLatencyTimerIsRunning = true; } } } @@ -207,6 +273,13 @@ public void onRequest(int requestCount) { @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 @@ -215,10 +288,9 @@ public void responseReceived() { // latency is measured between afterResponse and responseReceived. // In all the cases, we want to stop the serverLatencyTimer here. synchronized (timerLock) { - if (serverLatencyTimerIsRunning) { + if (serverLatencyTimer.isRunning()) { totalServerLatencyNano.addAndGet(serverLatencyTimer.elapsed(TimeUnit.NANOSECONDS)); serverLatencyTimer.reset(); - serverLatencyTimerIsRunning = false; } } } @@ -226,14 +298,16 @@ public void responseReceived() { @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 (!serverLatencyTimerIsRunning) { + if (!serverLatencyTimer.isRunning()) { serverLatencyTimer.start(); - serverLatencyTimerIsRunning = true; } } } @@ -257,14 +331,31 @@ public void setLocations(String zone, String cluster) { this.cluster = cluster; } + @Override + public void setTransportAttrs(TransportAttrs attrs) { + this.transportAttrs = attrs; + } + @Override public void batchRequestThrottled(long throttledTimeNanos) { - totalClientBlockingTime.addAndGet(Duration.ofNanos(throttledTimeNanos).toMillis()); + totalClientBlockingTime.addAndGet(java.time.Duration.ofNanos(throttledTimeNanos).toMillis()); } @Override - public void grpcChannelQueuedLatencies(long queuedTimeNanos) { - totalClientBlockingTime.addAndGet(queuedTimeNanos); + 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.toMillis(); + } } @Override @@ -273,10 +364,14 @@ public void disableFlowControl() { } private void recordOperationCompletion(@Nullable Throwable status) { + if (operationFinishedEarly.get()) { + status = null; // force an ok + } + if (!opFinished.compareAndSet(false, true)) { return; } - operationTimer.stop(); + long operationLatencyNano = operationTimer.elapsed(TimeUnit.NANOSECONDS); boolean isStreaming = operationType == OperationType.ServerStreaming; String statusStr = Util.extractStatus(status); @@ -284,8 +379,7 @@ private void recordOperationCompletion(@Nullable Throwable status) { // Publish metric data with all the attributes. The attributes get filtered in // BuiltinMetricsConstants when we construct the views. Attributes attributes = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(TABLE_ID_KEY, tableId) .put(CLUSTER_ID_KEY, cluster) .put(ZONE_ID_KEY, zone) @@ -295,8 +389,6 @@ private void recordOperationCompletion(@Nullable Throwable status) { .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) { @@ -317,14 +409,16 @@ private void recordOperationCompletion(@Nullable Throwable status) { } private void recordAttemptCompletion(@Nullable Throwable status) { + if (operationFinishedEarly.get()) { + status = 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 (serverLatencyTimerIsRunning) { + if (serverLatencyTimer.isRunning()) { requestLeft.decrementAndGet(); totalServerLatencyNano.addAndGet(serverLatencyTimer.elapsed(TimeUnit.NANOSECONDS)); serverLatencyTimer.reset(); - serverLatencyTimerIsRunning = false; } } @@ -340,8 +434,7 @@ private void recordAttemptCompletion(@Nullable Throwable status) { String statusStr = Util.extractStatus(status); Attributes attributes = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(TABLE_ID_KEY, tableId) .put(CLUSTER_ID_KEY, cluster) .put(ZONE_ID_KEY, zone) @@ -351,11 +444,46 @@ private void recordAttemptCompletion(@Nullable Throwable status) { .put(STATUS_KEY, statusStr) .build(); + totalClientBlockingTime.addAndGet(grpcMessageSentDelay.get()); clientBlockingLatenciesHistogram.record(convertToMs(totalClientBlockingTime.get()), attributes); attemptLatenciesHistogram.record( convertToMs(attemptTimer.elapsed(TimeUnit.NANOSECONDS)), attributes); + String transportType = "cloudpath"; + String transportRegion = ""; + String transportZone = ""; + String transportSubzone = ""; + + try { + if (transportAttrs != null && !Strings.isNullOrEmpty(transportAttrs.getLocality())) { + // only directpath has locality + transportType = "directpath"; + Map localityMap = + GSON.fromJson(transportAttrs.getLocality(), LOCALITY_TYPE); + transportRegion = localityMap.getOrDefault("region", ""); + transportZone = localityMap.getOrDefault("zone", ""); + transportSubzone = localityMap.getOrDefault("sub_zone", ""); + } + } catch (RuntimeException e) { + logger.log( + Level.WARNING, "Failed to parse transport locality: " + transportAttrs.getLocality(), e); + } + attemptLatencies2Histogram.record( + convertToMs(attemptTimer.elapsed(TimeUnit.NANOSECONDS)), + attributes.toBuilder() + .put(TRANSPORT_TYPE, transportType) + .put(TRANSPORT_REGION, transportRegion) + .put(TRANSPORT_ZONE, transportZone) + .put(TRANSPORT_SUBZONE, transportSubzone) + .build()); + + // 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) { + remainingDeadlineHistogram.record(Math.max(0, remainingDeadlineAtAttemptStart), attributes); + } + if (serverLatencies != null) { serverLatenciesHistogram.record(serverLatencies, attributes); connectivityErrorCounter.add(0, attributes); 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 index f0ac656978..174a023b6f 100644 --- 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 @@ -16,12 +16,14 @@ 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_LATENCIES2_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.REMAINING_DEADLINE_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; @@ -51,10 +53,12 @@ public class BuiltinMetricsTracerFactory extends BaseApiTracerFactory { private final DoubleHistogram operationLatenciesHistogram; private final DoubleHistogram attemptLatenciesHistogram; + private final DoubleHistogram attemptLatencies2Histogram; private final DoubleHistogram serverLatenciesHistogram; private final DoubleHistogram firstResponseLatenciesHistogram; private final DoubleHistogram clientBlockingLatenciesHistogram; private final DoubleHistogram applicationBlockingLatenciesHistogram; + private final DoubleHistogram remainingDeadlineHistogram; private final LongCounter connectivityErrorCounter; private final LongCounter retryCounter; @@ -71,7 +75,8 @@ public static BuiltinMetricsTracerFactory create( meter .histogramBuilder(OPERATION_LATENCIES_NAME) .setDescription( - "Total time until final operation success or failure, including retries and backoff.") + "Total time until final operation success or failure, including retries and" + + " backoff.") .setUnit(MILLISECOND) .build(); attemptLatenciesHistogram = @@ -80,25 +85,36 @@ public static BuiltinMetricsTracerFactory create( .setDescription("Client observed latency per RPC attempt.") .setUnit(MILLISECOND) .build(); + attemptLatencies2Histogram = + meter + .histogramBuilder(ATTEMPT_LATENCIES2_NAME) + .setDescription("Client observed latency per RPC attempt with transport labels.") + .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.") + "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.") + "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.") + "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 = @@ -108,11 +124,21 @@ public static BuiltinMetricsTracerFactory create( "The latency of the client application consuming available response data.") .setUnit(MILLISECOND) .build(); + remainingDeadlineHistogram = + meter + .histogramBuilder(REMAINING_DEADLINE_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(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") + "Number of requests that failed to reach the Google datacenter. (Requests without" + + " google response headers") .setUnit(COUNT) .build(); retryCounter = @@ -131,10 +157,12 @@ public ApiTracer newTracer(ApiTracer parent, SpanName spanName, OperationType op attributes, operationLatenciesHistogram, attemptLatenciesHistogram, + attemptLatencies2Histogram, serverLatenciesHistogram, firstResponseLatenciesHistogram, clientBlockingLatenciesHistogram, applicationBlockingLatenciesHistogram, + remainingDeadlineHistogram, 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..f6df7fe6cd 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 @@ -29,31 +29,98 @@ /** * 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. + * and custom sinks. + * + * @deprecated Use methods in {@link CustomOpenTelemetryMetricsProvider} instead. */ +@Deprecated public class BuiltinMetricsView { private BuiltinMetricsView() {} /** * Register built-in metrics on the {@link SdkMeterProviderBuilder} with application default - * credentials. + * credentials and default endpoint. + * + * @deprecated projectId is no longer used. Call {@link + * #registerBuiltinMetrics(SdkMeterProviderBuilder)} instead. */ + @Deprecated public static void registerBuiltinMetrics(String projectId, SdkMeterProviderBuilder builder) throws IOException { BuiltinMetricsView.registerBuiltinMetrics( - projectId, GoogleCredentials.getApplicationDefault(), builder); + GoogleCredentials.getApplicationDefault(), builder, null); + } + + /** + * Register built-in metrics on the {@link SdkMeterProviderBuilder} with application default + * credentials and default endpoint. + */ + public static void registerBuiltinMetrics(SdkMeterProviderBuilder builder) throws IOException { + BuiltinMetricsView.registerBuiltinMetrics( + GoogleCredentials.getApplicationDefault(), builder, null); } - /** Register built-in metrics on the {@link SdkMeterProviderBuilder} with credentials. */ + /** + * Register built-in metrics on the {@link SdkMeterProviderBuilder} with custom credentials and + * default endpoint. + * + * @deprecated projectId is no longer used. Call {@link #registerBuiltinMetrics(Credentials, + * SdkMeterProviderBuilder, String)} instead. + */ + @Deprecated public static void registerBuiltinMetrics( String projectId, @Nullable Credentials credentials, SdkMeterProviderBuilder builder) throws IOException { - MetricExporter metricExporter = BigtableCloudMonitoringExporter.create(projectId, credentials); + BuiltinMetricsView.registerBuiltinMetrics(credentials, builder, null); + } + + /** + * Register built-in metrics on the {@link SdkMeterProviderBuilder} with custom credentials and + * endpoint. + * + * @deprecated projectId is no longer used. Call {@link #registerBuiltinMetrics(Credentials, + * SdkMeterProviderBuilder, String)} instead. + */ + @Deprecated + public static void registerBuiltinMetrics( + String projectId, + @Nullable Credentials credentials, + SdkMeterProviderBuilder builder, + @Nullable String endpoint) + throws IOException { + registerBuiltinMetrics(credentials, builder, endpoint); + } + + /** + * Register built-in metrics on the {@link SdkMeterProviderBuilder} with custom credentials and + * endpoint. + */ + public static void registerBuiltinMetrics( + @Nullable Credentials credentials, SdkMeterProviderBuilder builder, @Nullable String endpoint) + throws IOException { + registerBuiltinMetricsWithUniverseDomain( + credentials, builder, endpoint, Credentials.GOOGLE_DEFAULT_UNIVERSE); + } + + static void registerBuiltinMetricsWithUniverseDomain( + @Nullable Credentials credentials, + SdkMeterProviderBuilder builder, + @Nullable String endpoint, + String universeDomain) + throws IOException { + MetricExporter publicExporter = + BigtableCloudMonitoringExporter.create( + "bigtable metrics", + credentials, + endpoint, + universeDomain, + new BigtableCloudMonitoringExporter.PublicTimeSeriesConverter()); + for (Map.Entry entry : BuiltinMetricsConstants.getAllViews().entrySet()) { builder.registerView(entry.getKey(), entry.getValue()); } - builder.registerMetricReader(PeriodicMetricReader.create(metricExporter)); + builder.registerMetricReader(PeriodicMetricReader.create(publicExporter)); } } 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/stub/metrics/CompositeTracer.java index 774c6d9f22..5922530e8b 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/stub/metrics/CompositeTracer.java @@ -15,12 +15,14 @@ */ package com.google.cloud.bigtable.data.v2.stub.metrics; +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.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 +64,13 @@ public void close() { }; } + @Override + public void operationFinishEarly() { + for (BigtableTracer tracer : bigtableTracers) { + tracer.operationFinishEarly(); + } + } + @Override public void operationSucceeded() { for (ApiTracer child : children) { @@ -117,9 +126,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); } } @@ -198,6 +218,13 @@ public void setLocations(String zone, String cluster) { } } + @Override + public void setTransportAttrs(BuiltinMetricsTracer.TransportAttrs attrs) { + for (BigtableTracer tracer : bigtableTracers) { + tracer.setTransportAttrs(attrs); + } + } + @Override public void onRequest(int requestCount) { for (BigtableTracer tracer : bigtableTracers) { @@ -225,4 +252,18 @@ public void grpcChannelQueuedLatencies(long queuedTimeMs) { tracer.grpcChannelQueuedLatencies(queuedTimeMs); } } + + @Override + public void grpcMessageSent() { + for (BigtableTracer tracer : bigtableTracers) { + tracer.grpcMessageSent(); + } + } + + @Override + public void setTotalTimeoutDuration(java.time.Duration totalTimeoutDuration) { + for (BigtableTracer tracer : bigtableTracers) { + tracer.setTotalTimeoutDuration(totalTimeoutDuration); + } + } } 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..efcec28ffa 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,11 @@ */ 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; /** * Set a custom OpenTelemetry instance. @@ -26,8 +29,8 @@ *

    {@code
      * SdkMeterProviderBuilder sdkMeterProvider = SdkMeterProvider.builder();
      *
    - * // register Builtin metrics on your meter provider with default credentials
    - * BuiltinMetricsView.registerBuiltinMetrics("project-id", sdkMeterProvider);
    + * // Set up SdkMeterProvider for client side metrics
    + * CustomOpenTelemetryMetricsProvider.setupSdkMeterProvider(sdkMeterProvider);
      *
      * // register other metrics reader and views
      * sdkMeterProvider.registerMetricReader(..);
    @@ -63,6 +66,32 @@ public OpenTelemetry getOpenTelemetry() {
         return otel;
       }
     
    +  /**
    +   * Convenient method to set up SdkMeterProviderBuilder with the default credential and endpoint.
    +   */
    +  public static void setupSdkMeterProvider(SdkMeterProviderBuilder builder) throws IOException {
    +    setupSdkMeterProvider(builder, null, null);
    +  }
    +
    +  /** Convenient method to set up SdkMeterProviderBuilder with a custom credential. */
    +  public static void setupSdkMeterProvider(SdkMeterProviderBuilder builder, Credentials credentials)
    +      throws IOException {
    +    setupSdkMeterProvider(builder, credentials, null);
    +  }
    +
    +  /** Convenient method to set up SdkMeterProviderBuilder with a custom endpoint. */
    +  public static void setupSdkMeterProvider(SdkMeterProviderBuilder builder, String endpoint)
    +      throws IOException {
    +    setupSdkMeterProvider(builder, null, endpoint);
    +  }
    +
    +  /** Convenient method to set up SdkMeterProviderBuilder with a custom credentials and endpoint. */
    +  public static void setupSdkMeterProvider(
    +      SdkMeterProviderBuilder builder, Credentials credentials, String endpoint)
    +      throws IOException {
    +    BuiltinMetricsView.registerBuiltinMetrics(credentials, builder, endpoint);
    +  }
    +
       @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..7b18125b95 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
    @@ -17,7 +17,6 @@
     
     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;
    @@ -36,28 +35,20 @@ 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)
    +  public OpenTelemetry getOpenTelemetry(
    +      @Nullable String metricsEndpoint, String universeDomain, @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;
    +    SdkMeterProviderBuilder meterProvider = SdkMeterProvider.builder();
    +    BuiltinMetricsView.registerBuiltinMetricsWithUniverseDomain(
    +        credentials, meterProvider, metricsEndpoint, universeDomain);
    +    return OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build();
       }
     
       @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/MetricsTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracer.java
    index 0ffabe2606..c322b75df8 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/stub/metrics/MetricsTracer.java
    @@ -15,6 +15,9 @@
      */
     package com.google.cloud.bigtable.data.v2.stub.metrics;
     
    +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;
    @@ -32,7 +35,6 @@
     import java.util.concurrent.TimeUnit;
     import java.util.concurrent.atomic.AtomicBoolean;
     import javax.annotation.Nullable;
    -import org.threeten.bp.Duration;
     
     class MetricsTracer extends BigtableTracer {
     
    @@ -84,6 +86,12 @@ public void close() {}
         };
       }
     
    +  @Override
    +  public void operationFinishEarly() {
    +    attemptTimer.stop();
    +    operationTimer.stop();
    +  }
    +
       @Override
       public void operationSucceeded() {
         recordOperationCompletion(null);
    @@ -103,7 +111,6 @@ private void recordOperationCompletion(@Nullable Throwable throwable) {
         if (!opFinished.compareAndSet(false, true)) {
           return;
         }
    -    operationTimer.stop();
     
         long elapsed = operationTimer.elapsed(TimeUnit.MILLISECONDS);
     
    @@ -147,8 +154,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 error, org.threeten.bp.Duration delay) {
    +    attemptFailedDuration(error, toJavaTimeDuration(delay));
    +  }
    +
       @Override
    -  public void attemptFailed(Throwable throwable, Duration duration) {
    +  public void attemptFailedDuration(Throwable throwable, java.time.Duration duration) {
         recordAttemptCompletion(throwable);
       }
     
    @@ -233,8 +250,7 @@ public void batchRequestThrottled(long 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/RpcMeasureConstants.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/RpcMeasureConstants.java
    index edd73fc81d..560bb084bf 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/stub/metrics/RpcMeasureConstants.java
    @@ -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/stub/metrics/RpcViewConstants.java
    index 0d85c75e9c..4e21eaf785 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/stub/metrics/RpcViewConstants.java
    @@ -133,7 +133,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 +147,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(
    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..e8902108aa 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,14 +15,13 @@
      */
     package com.google.cloud.bigtable.data.v2.stub.metrics;
     
    -import com.google.api.core.BetaApi;
     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 =
    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/stub/metrics/TracedBatcherUnaryCallable.java
    index ce73d75dc1..44ba688d55 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/stub/metrics/TracedBatcherUnaryCallable.java
    @@ -21,7 +21,6 @@
     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;
     
     /**
      * This callable will extract total throttled time from {@link ApiCallContext} and add it to {@link
    @@ -44,7 +43,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/stub/metrics/Util.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/Util.java
    index 4c3fd7a42d..906c7aa55c 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
    @@ -22,15 +22,21 @@
     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.auth.Credentials;
     import com.google.bigtable.v2.AuthorizedViewName;
     import com.google.bigtable.v2.CheckAndMutateRowRequest;
    +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.ReadChangeStreamRequest;
     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.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings;
    +import com.google.common.base.Suppliers;
     import com.google.common.collect.ImmutableMap;
     import com.google.protobuf.InvalidProtocolBufferException;
     import io.grpc.CallOptions;
    @@ -39,6 +45,13 @@
     import io.grpc.StatusException;
     import io.grpc.StatusRuntimeException;
     import io.opencensus.tags.TagValue;
    +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.export.PeriodicMetricReader;
    +import java.io.IOException;
     import java.time.Instant;
     import java.time.temporal.ChronoUnit;
     import java.util.Arrays;
    @@ -109,9 +122,11 @@ static TagValue extractStatusFromFuture(Future future) {
       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();
    @@ -121,20 +136,28 @@ static String extractTableId(Object request) {
         } 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 && authorizedViewName == null) return "undefined";
    -    if (tableName.isEmpty() && authorizedViewName.isEmpty()) return "undefined";
    -    if (!tableName.isEmpty()) {
    +    if (tableName != null && !tableName.isEmpty()) {
           return TableName.parse(tableName).getTable();
    -    } else {
    +    }
    +    if (authorizedViewName != null && !authorizedViewName.isEmpty()) {
           return AuthorizedViewName.parse(authorizedViewName).getTable();
         }
    +    if (materializedViewName != null && !materializedViewName.isEmpty()) {
    +      return MaterializedViewName.parse(materializedViewName).getMaterializedView();
    +    }
    +    return "";
       }
     
       /**
    @@ -231,4 +254,26 @@ static GrpcCallContext injectBigtableStreamTracer(
           throw new RuntimeException("Unexpected context class: " + context.getClass().getName());
         }
       }
    +
    +  public static OpenTelemetrySdk newInternalOpentelemetry(
    +      EnhancedBigtableStubSettings settings, Credentials credentials) throws IOException {
    +    SdkMeterProviderBuilder meterProviderBuilder = SdkMeterProvider.builder();
    +
    +    for (Map.Entry e :
    +        BuiltinMetricsConstants.getInternalViews().entrySet()) {
    +      meterProviderBuilder.registerView(e.getKey(), e.getValue());
    +    }
    +
    +    meterProviderBuilder.registerMetricReader(
    +        PeriodicMetricReader.create(
    +            BigtableCloudMonitoringExporter.create(
    +                "application metrics",
    +                credentials,
    +                settings.getMetricsEndpoint(),
    +                settings.getUniverseDomain(),
    +                new BigtableCloudMonitoringExporter.InternalTimeSeriesConverter(
    +                    Suppliers.memoize(
    +                        () -> BigtableExporterUtils.createInternalMonitoredResource(settings))))));
    +    return OpenTelemetrySdk.builder().setMeterProvider(meterProviderBuilder.build()).build();
    +  }
     }
    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..85c3171f2f
    --- /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.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;
    +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; + } + + 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; + } + + 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/ReadRowsResumptionStrategy.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsResumptionStrategy.java index 2db46c0c29..68af76c34e 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 @@ -22,20 +22,21 @@ 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 +70,12 @@ public RowT processResponse(RowT response) { return response; } + @Override + public Throwable processError(Throwable throwable) { + // Noop + return throwable; + } + /** * {@inheritDoc} * 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..64c1bcbe6f 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 @@ -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 new file mode 100644 index 0000000000..09d3fc473e --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallContext.java @@ -0,0 +1,163 @@ +/* + * 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.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; + +/** + * 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") +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(); + } + + public static ExecuteQueryCallContext create( + BoundStatement boundStatement, SettableApiFuture metadataFuture) { + return new ExecuteQueryCallContext(boundStatement, metadataFuture); + } + + /** + * 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); + } + } + + /** + * 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 new file mode 100644 index 0000000000..687bcdce30 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallable.java @@ -0,0 +1,68 @@ +/* + * 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.ServerStream; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.bigtable.v2.ExecuteQueryRequest; +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; + +/** + * Callable that creates {@link SqlServerStream}s from {@link ExecuteQueryRequest}s. + * + *

    This handles setting up the future that is used to allow users to access metadata. + * + *

    This class is considered an internal implementation detail and not meant to be used by + * applications. + */ +@InternalApi +public class ExecuteQueryCallable extends ServerStreamingCallable { + + private final ServerStreamingCallable inner; + + public ExecuteQueryCallable(ServerStreamingCallable inner) { + this.inner = inner; + } + + /** + * 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(boundStatement, metadataFuture)); + return SqlServerStreamImpl.create(metadataFuture, rowStream); + } + + @Override + public void call( + ExecuteQueryCallContext callContext, + ResponseObserver responseObserver, + ApiCallContext apiCallContext) { + inner.call(callContext, responseObserver, apiCallContext); + } +} 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/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 new file mode 100644 index 0000000000..a4cdae3bec --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachine.java @@ -0,0 +1,269 @@ +/* + * 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.bigtable.v2.PartialResultSet; +import com.google.bigtable.v2.ProtoRows; +import com.google.bigtable.v2.Value; +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.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.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 + * {@link ProtoSqlRow}s for the given schema. Each SqlRow represents a logical row for a sql + * response. + * + *

    The intended usage of this class is: + * + *

      + *
    • Add results with {@link #addPartialResultSet(PartialResultSet)} until {@link + * #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()} + *
    + * + *

    Package-private for internal use. This class is not thread safe. + */ +@InternalApi +final class ProtoRowsMergingStateMachine { + enum State { + /** 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 static final HashFunction CRC32C = Hashing.crc32c(); + + private final Supplier metadataSupplier; + private @Nullable ResultSetMetadata metadata; + private State state; + private ByteString batchBuffer; + private List> parsedBatches; + private boolean hasReceivedFirstResumeToken; + + 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()); + if (results.hasBatchChecksum()) { + HashCode hash = CRC32C.hashBytes(batchBuffer.toByteArray()); + Preconditions.checkState( + hash.hashCode() == results.getBatchChecksum(), "Unexpected checksum mismatch"); + try { + ProtoRows completeBatch = ProtoRows.parseFrom(batchBuffer); + batchBuffer = ByteString.EMPTY; + parsedBatches.add(completeBatch.getValuesList()); + } catch (InvalidProtocolBufferException e) { + throw new InternalError("Unexpected exception parsing response protobuf", e); + } + } + 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 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() { + boolean hasBufferedData = !batchBuffer.isEmpty() || !parsedBatches.isEmpty(); + return hasCompleteBatches() || hasBufferedData; + } + + /** + * Populates the given queue with the currently buffered rows of rows + * + * @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"); + 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()) { + Preconditions.checkState( + valuesIterator.hasNext(), "Incomplete row received with first missing column: %s", c); + Value v = valuesIterator.next(); + validateValueAndType(c.type(), v); + rowDataBuilder.add(v); + } + queue.add(ProtoSqlRow.create(metadata, rowDataBuilder.build())); + } + this.parsedBatches = new ArrayList<>(); + state = State.AWAITING_NEW_DATA; + } + + @InternalApi("VisibleForTestingOnly") + static void validateValueAndType(SqlType type, Value value) { + // Null is represented as a value with none of the kind fields set + if (value.getKindCase() == Value.KindCase.KIND_NOT_SET) { + return; + } + switch (type.getCode()) { + // Primitive types + case STRING: + checkExpectedKind(value, Value.KindCase.STRING_VALUE, type); + break; + case BYTES: + checkExpectedKind(value, Value.KindCase.BYTES_VALUE, type); + break; + case INT64: + checkExpectedKind(value, Value.KindCase.INT_VALUE, type); + break; + case FLOAT64: + case FLOAT32: + checkExpectedKind(value, Value.KindCase.FLOAT_VALUE, type); + break; + case BOOL: + checkExpectedKind(value, Value.KindCase.BOOL_VALUE, type); + break; + case TIMESTAMP: + checkExpectedKind(value, Value.KindCase.TIMESTAMP_VALUE, type); + break; + case DATE: + checkExpectedKind(value, Value.KindCase.DATE_VALUE, type); + break; + // Complex types + case ARRAY: + checkExpectedKind(value, Value.KindCase.ARRAY_VALUE, type); + SqlType.Array arrayType = (SqlType.Array) type; + SqlType elemType = arrayType.getElementType(); + for (Value element : value.getArrayValue().getValuesList()) { + validateValueAndType(elemType, element); + } + break; + case STRUCT: + 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)); + } + break; + case MAP: + checkExpectedKind(value, Value.KindCase.ARRAY_VALUE, type); + SqlType.Map mapType = (SqlType.Map) type; + for (Value mapElement : value.getArrayValue().getValuesList()) { + Preconditions.checkState( + mapElement.getArrayValue().getValuesCount() == 2, + "Map elements must have exactly 2 elementss"); + validateValueAndType( + mapType.getKeyType(), mapElement.getArrayValue().getValuesList().get(0)); + validateValueAndType( + mapType.getValueType(), mapElement.getArrayValue().getValuesList().get(1)); + } + break; + default: + // This should be caught already at ResultSetMetadata creation + throw new IllegalStateException("Unrecognized type: " + type); + } + } + + private static void checkExpectedKind(Value value, Value.KindCase expectedKind, SqlType type) { + Preconditions.checkState( + value.getKindCase() == expectedKind, + "Value kind must be %s for columns of type: %s", + expectedKind.name(), + type); + } +} 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 new file mode 100644 index 0000000000..a4f2c618e9 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMerger.java @@ -0,0 +1,97 @@ +/* + * 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.bigtable.v2.ExecuteQueryResponse; +import com.google.bigtable.v2.PartialResultSet; +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 + * safe. + */ +@InternalApi +public final class SqlRowMerger implements Reframer { + + private final Queue queue; + private final ProtoRowsMergingStateMachine stateMachine; + + /** + * @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<>(); + stateMachine = new ProtoRowsMergingStateMachine(metadataSupplier); + } + + /** + * Used to add responses to the SqlRowMerger as they are received. + * + * @param response the next response in the stream of query responses + */ + @Override + public void push(ExecuteQueryResponse response) { + 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.hasCompleteBatches()) { + stateMachine.populateQueue(queue); + } + } + + /** + * Check if the merger has consumable data + * + * @return true if there is a complete row, false otherwise. + */ + @Override + public boolean hasFullFrame() { + return !queue.isEmpty(); + } + + /** + * Check if the merger contains partially complete (or complete) data. + * + * @return true if there is a partial (or complete) batch, false otherwise. + */ + @Override + public boolean hasPartialFrame() { + return hasFullFrame() || stateMachine.isBatchInProgress(); + } + + /** pops a completed row from the FIFO queue built from the given responses. */ + @Override + public SqlRow pop() { + return Preconditions.checkNotNull( + queue.poll(), "SqlRowMerger.pop() called when there are no complete rows."); + } +} 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 new file mode 100644 index 0000000000..c788fe9230 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergingCallable.java @@ -0,0 +1,50 @@ +/* + * 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.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; +import com.google.cloud.bigtable.data.v2.internal.SqlRow; +import com.google.cloud.bigtable.gaxx.reframing.ReframingResponseObserver; + +@InternalApi +public class SqlRowMergingCallable + extends ServerStreamingCallable { + private final ServerStreamingCallable inner; + + public SqlRowMergingCallable( + ServerStreamingCallable inner) { + this.inner = inner; + } + + @Override + public void call( + ExecuteQueryCallContext callContext, + ResponseObserver responseObserver, + ApiCallContext apiCallContext) { + 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/data/v2/stub/sql/SqlServerStream.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlServerStream.java new file mode 100644 index 0000000000..1523e09235 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlServerStream.java @@ -0,0 +1,37 @@ +/* + * 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.ApiFuture; +import com.google.api.core.InternalApi; +import com.google.api.gax.rpc.ServerStream; +import com.google.cloud.bigtable.data.v2.internal.SqlRow; +import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; + +/** + * Wrapper for results of an ExecuteQuery call that includes both the stream of rows and a future to + * access {@link ResultSetMetadata}. + * + *

    This should only be created by {@link ExecuteQueryCallable}, never directly by users/ + * + *

    This is considered an internal implementation detail and should not be used by applications. + */ +@InternalApi("For internal use only") +public interface SqlServerStream { + ApiFuture metadataFuture(); + + ServerStream rows(); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlServerStreamImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlServerStreamImpl.java new file mode 100644 index 0000000000..caeb2e4788 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlServerStreamImpl.java @@ -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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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.ApiFuture; +import com.google.api.core.InternalApi; +import com.google.api.gax.rpc.ServerStream; +import com.google.auto.value.AutoValue; +import com.google.cloud.bigtable.data.v2.internal.SqlRow; +import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; + +/** + * Implementation of {@link SqlServerStream} using AutoValue + * + *

    This is considered an internal implementation detail and should not be used by applications. + */ +@InternalApi("For internal use only") +@AutoValue +public abstract class SqlServerStreamImpl implements SqlServerStream { + + @InternalApi("Visible for testing") + public static SqlServerStreamImpl create( + ApiFuture metadataApiFuture, ServerStream rowServerStream) { + return new AutoValue_SqlServerStreamImpl(metadataApiFuture, rowServerStream); + } + + @Override + public abstract ApiFuture metadataFuture(); + + @Override + public abstract ServerStream rows(); +} 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..da7bd4f956 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPool.java @@ -0,0 +1,608 @@ +/* + * 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.ChannelFactory; +import com.google.api.gax.grpc.ChannelPrimer; +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.util.ArrayList; +import java.util.List; +import java.util.concurrent.CancellationException; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +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.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 { + @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 ChannelFactory channelFactory; + + private final ChannelPrimer channelPrimer; + private final ScheduledExecutorService executor; + + private final Object entryWriteLock = new Object(); + @VisibleForTesting final AtomicReference> entries = new AtomicReference<>(); + private final AtomicInteger indexTicker = new AtomicInteger(); + private final String authority; + + public static BigtableChannelPool create( + BigtableChannelPoolSettings settings, + ChannelFactory channelFactory, + ChannelPrimer channelPrimer) + throws IOException { + return new BigtableChannelPool( + settings, channelFactory, channelPrimer, Executors.newSingleThreadScheduledExecutor()); + } + + /** + * 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, + ChannelFactory channelFactory, + ChannelPrimer channelPrimer, + ScheduledExecutorService executor) + throws IOException { + this.settings = settings; + this.channelFactory = channelFactory; + this.channelPrimer = channelPrimer; + + ImmutableList.Builder initialListBuilder = ImmutableList.builder(); + + for (int i = 0; i < settings.getInitialChannelCount(); i++) { + ManagedChannel newChannel = channelFactory.createSingleChannel(); + channelPrimer.primeChannel(newChannel); + initialListBuilder.add(new Entry(newChannel)); + } + + entries.set(initialListBuilder.build()); + authority = entries.get().get(0).channel.authority(); + this.executor = executor; + + if (!settings.isStaticSize()) { + executor.scheduleAtFixedRate( + this::resizeSafely, + BigtableChannelPoolSettings.RESIZE_INTERVAL.getSeconds(), + BigtableChannelPoolSettings.RESIZE_INTERVAL.getSeconds(), + TimeUnit.SECONDS); + } + if (settings.isPreemptiveRefreshEnabled()) { + 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 chosen in a round-robin fashion 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 getChannel(indexTicker.getAndIncrement()).newCall(methodDescriptor, callOptions); + } + + Channel getChannel(int affinity) { + return new AffinityChannel(affinity); + } + + /** {@inheritDoc} */ + @Override + public ManagedChannel shutdown() { + LOG.fine("Initiating graceful shutdown due to explicit request"); + + List localEntries = entries.get(); + for (Entry entry : localEntries) { + entry.channel.shutdown(); + } + if (executor != null) { + // shutdownNow will cancel scheduled tasks + executor.shutdownNow(); + } + return this; + } + + /** {@inheritDoc} */ + @Override + public boolean isShutdown() { + List localEntries = entries.get(); + for (Entry entry : localEntries) { + if (!entry.channel.isShutdown()) { + return false; + } + } + return executor == null || executor.isShutdown(); + } + + /** {@inheritDoc} */ + @Override + public boolean isTerminated() { + List localEntries = entries.get(); + for (Entry entry : localEntries) { + if (!entry.channel.isTerminated()) { + return false; + } + } + + return executor == null || executor.isTerminated(); + } + + /** {@inheritDoc} */ + @Override + public ManagedChannel shutdownNow() { + LOG.fine("Initiating immediate shutdown due to explicit request"); + + List localEntries = entries.get(); + for (Entry entry : localEntries) { + entry.channel.shutdownNow(); + } + if (executor != null) { + executor.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); + } + if (executor != null) { + long awaitTimeNanos = endTimeNanos - System.nanoTime(); + executor.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 = channelFactory.createSingleChannel(); + this.channelPrimer.primeChannel(newChannel); + newEntries.add(new Entry(newChannel)); + } catch (IOException 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 = channelFactory.createSingleChannel(); + this.channelPrimer.primeChannel(newChannel); + newEntries.set(i, new Entry(newChannel)); + } catch (IOException 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. + */ + Entry getRetainedEntry(int affinity) { + // 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()) { + 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); + } + + /** Bundles a gRPC {@link ManagedChannel} with some usage accounting. */ + static class Entry { + 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 outstandingRpcs = new AtomicInteger(0); + + private final AtomicInteger maxOutstanding = new AtomicInteger(); + + // Flag that the channel should be closed once all of the outstanding RPC complete. + private final AtomicBoolean shutdownRequested = new AtomicBoolean(); + // Flag that the channel has been closed. + private final AtomicBoolean shutdownInitiated = new AtomicBoolean(); + + private Entry(ManagedChannel channel) { + this.channel = channel; + } + + int getAndResetMaxOutstanding() { + return maxOutstanding.getAndSet(outstandingRpcs.get()); + } + + /** + * 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. + */ + private boolean retain() { + // register desire to start RPC + int currentOutstanding = outstandingRpcs.incrementAndGet(); + + // Rough book keeping + int prevMax = maxOutstanding.get(); + if (currentOutstanding > prevMax) { + maxOutstanding.incrementAndGet(); + } + + // abort if the channel is closing + if (shutdownRequested.get()) { + release(); + 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. + */ + private void release() { + int newCount = outstandingRpcs.decrementAndGet(); + if (newCount < 0) { + LOG.log(Level.WARNING, "Bug! Reference count is negative (" + newCount + ")!"); + } + + // Must check outstandingRpcs after shutdownRequested (in reverse order of retain()) to ensure + // mutual exclusion. + if (shutdownRequested.get() && outstandingRpcs.get() == 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 (outstandingRpcs.get() == 0) { + shutdown(); + } + } + + /** Ensure that shutdown is only called once. */ + private void shutdown() { + if (shutdownInitiated.compareAndSet(false, true)) { + channel.shutdown(); + } + } + } + + /** Thin wrapper to ensure that new calls are properly reference counted. */ + private class AffinityChannel extends Channel { + private final int affinity; + + public AffinityChannel(int affinity) { + this.affinity = affinity; + } + + @Override + public String authority() { + return authority; + } + + @Override + public ClientCall newCall( + MethodDescriptor methodDescriptor, CallOptions callOptions) { + + Entry entry = getRetainedEntry(affinity); + + return new ReleasingClientCall<>(entry.channel.newCall(methodDescriptor, callOptions), entry); + } + } + + /** 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 AtomicBoolean wasClosed = new AtomicBoolean(); + private final AtomicBoolean wasReleased = new AtomicBoolean(); + + public ReleasingClientCall(ClientCall delegate, Entry entry) { + super(delegate); + this.entry = entry; + } + + @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 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 { + super.onClose(status, trailers); + } finally { + if (wasReleased.compareAndSet(false, true)) { + entry.release(); + } 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(); + } 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/BigtableChannelPoolSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolSettings.java new file mode 100644 index 0000000000..e94a7665e8 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolSettings.java @@ -0,0 +1,183 @@ +/* + * 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.gax.grpc.ChannelPoolSettings; +import com.google.auto.value.AutoValue; +import com.google.common.base.Preconditions; +import java.time.Duration; + +/** + * 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 { + /** 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; + + /** + * 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(); + + /** + * 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; + } + + 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()) + .build(); + } + + public static BigtableChannelPoolSettings staticallySized(int size) { + return builder() + .setInitialChannelCount(size) + .setMinRpcsPerChannel(0) + .setMaxRpcsPerChannel(Integer.MAX_VALUE) + .setMinChannelCount(size) + .setMaxChannelCount(size) + .build(); + } + + public static Builder builder() { + return new AutoValue_BigtableChannelPoolSettings.Builder() + .setInitialChannelCount(1) + .setMinChannelCount(1) + .setMaxChannelCount(200) + .setMinRpcsPerChannel(0) + .setMaxRpcsPerChannel(Integer.MAX_VALUE) + .setPreemptiveRefreshEnabled(false); + } + + @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); + + 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..3c4cf24bca --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableTransportChannelProvider.java @@ -0,0 +1,166 @@ +/* + * 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.ChannelFactory; +import com.google.api.gax.grpc.ChannelPoolSettings; +import com.google.api.gax.grpc.ChannelPrimer; +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.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; + +/** + * An instance of TransportChannelProvider that provides a TransportChannel through a supplied + * InstantiatingGrpcChannelProvider. + */ +@InternalApi +public final class BigtableTransportChannelProvider implements TransportChannelProvider { + + private final InstantiatingGrpcChannelProvider delegate; + private final ChannelPrimer channelPrimer; + + private BigtableTransportChannelProvider( + InstantiatingGrpcChannelProvider instantiatingGrpcChannelProvider, + ChannelPrimer channelPrimer) { + delegate = Preconditions.checkNotNull(instantiatingGrpcChannelProvider); + this.channelPrimer = channelPrimer; + } + + @Override + public boolean shouldAutoClose() { + return delegate.shouldAutoClose(); + } + + @Override + public boolean needsExecutor() { + return delegate.needsExecutor(); + } + + @Override + public BigtableTransportChannelProvider withExecutor(ScheduledExecutorService executor) { + return withExecutor((Executor) executor); + } + + @Override + public BigtableTransportChannelProvider withExecutor(Executor executor) { + InstantiatingGrpcChannelProvider newChannelProvider = + (InstantiatingGrpcChannelProvider) delegate.withExecutor(executor); + return new BigtableTransportChannelProvider(newChannelProvider, channelPrimer); + } + + @Override + public boolean needsHeaders() { + return delegate.needsHeaders(); + } + + @Override + public BigtableTransportChannelProvider withHeaders(Map headers) { + InstantiatingGrpcChannelProvider newChannelProvider = + (InstantiatingGrpcChannelProvider) delegate.withHeaders(headers); + return new BigtableTransportChannelProvider(newChannelProvider, channelPrimer); + } + + @Override + public boolean needsEndpoint() { + return delegate.needsEndpoint(); + } + + @Override + public TransportChannelProvider withEndpoint(String endpoint) { + InstantiatingGrpcChannelProvider newChannelProvider = + (InstantiatingGrpcChannelProvider) delegate.withEndpoint(endpoint); + return new BigtableTransportChannelProvider(newChannelProvider, channelPrimer); + } + + @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); + } + + /** Expected to only be called once when BigtableClientContext is created */ + @Override + public TransportChannel getTransportChannel() throws IOException { + // 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 = + delegate.toBuilder().setChannelPoolSettings(ChannelPoolSettings.staticallySized(1)).build(); + + ChannelFactory channelFactory = + () -> { + 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, channelFactory, channelPrimer); + + 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); + } + + /** Creates a BigtableTransportChannelProvider. */ + public static BigtableTransportChannelProvider create( + InstantiatingGrpcChannelProvider instantiatingGrpcChannelProvider, + ChannelPrimer channelPrimer) { + return new BigtableTransportChannelProvider(instantiatingGrpcChannelProvider, channelPrimer); + } +} 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..3d696213a6 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/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 ef4771454d..65cd1d20d5 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 @@ -305,6 +305,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 +395,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 +476,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, @@ -593,6 +647,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.bigtable.admin.v2.Backup$BackupType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.bigtable.admin.v2.Backup$Builder", "queryAllDeclaredConstructors": true, @@ -755,6 +818,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, @@ -1008,7 +1080,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata", + "name": "com.google.bigtable.admin.v2.CreateLogicalViewMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1017,7 +1089,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, @@ -1026,7 +1098,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest", + "name": "com.google.bigtable.admin.v2.CreateLogicalViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1035,7 +1107,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, @@ -1044,7 +1116,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.CreateTableRequest", + "name": "com.google.bigtable.admin.v2.CreateMaterializedViewMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1053,7 +1125,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, @@ -1062,7 +1134,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.CreateTableRequest$Split", + "name": "com.google.bigtable.admin.v2.CreateMaterializedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1071,7 +1143,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, @@ -1080,7 +1152,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DataBoostReadLocalWrites", + "name": "com.google.bigtable.admin.v2.CreateSchemaBundleMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1089,7 +1161,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, @@ -1098,7 +1170,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteAppProfileRequest", + "name": "com.google.bigtable.admin.v2.CreateSchemaBundleRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1107,7 +1179,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, @@ -1116,7 +1188,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest", + "name": "com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1125,7 +1197,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, @@ -1134,7 +1206,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteBackupRequest", + "name": "com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1143,7 +1215,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, @@ -1152,7 +1224,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteClusterRequest", + "name": "com.google.bigtable.admin.v2.CreateTableRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1161,7 +1233,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, @@ -1170,7 +1242,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteInstanceRequest", + "name": "com.google.bigtable.admin.v2.CreateTableRequest$Split", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1179,7 +1251,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, @@ -1188,7 +1260,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteSnapshotRequest", + "name": "com.google.bigtable.admin.v2.DataBoostReadLocalWrites", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1197,7 +1269,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, @@ -1206,7 +1278,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteTableRequest", + "name": "com.google.bigtable.admin.v2.DeleteAppProfileRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1215,7 +1287,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, @@ -1224,7 +1296,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DropRowRangeRequest", + "name": "com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1233,7 +1305,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, @@ -1242,7 +1314,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.EncryptionInfo", + "name": "com.google.bigtable.admin.v2.DeleteBackupRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1251,7 +1323,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, @@ -1260,7 +1332,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.EncryptionInfo$EncryptionType", + "name": "com.google.bigtable.admin.v2.DeleteClusterRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1269,7 +1341,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GcRule", + "name": "com.google.bigtable.admin.v2.DeleteClusterRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1278,7 +1350,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GcRule$Builder", + "name": "com.google.bigtable.admin.v2.DeleteInstanceRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1287,7 +1359,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, @@ -1296,7 +1368,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, @@ -1305,7 +1377,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, @@ -1314,7 +1386,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, @@ -1323,7 +1395,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest", + "name": "com.google.bigtable.admin.v2.DeleteMaterializedViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1332,7 +1404,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest$Builder", + "name": "com.google.bigtable.admin.v2.DeleteSchemaBundleRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1341,7 +1413,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse", + "name": "com.google.bigtable.admin.v2.DeleteSchemaBundleRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1350,7 +1422,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse$Builder", + "name": "com.google.bigtable.admin.v2.DeleteSnapshotRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1359,7 +1431,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetAppProfileRequest", + "name": "com.google.bigtable.admin.v2.DeleteSnapshotRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1368,7 +1440,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetAppProfileRequest$Builder", + "name": "com.google.bigtable.admin.v2.DeleteTableRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1377,7 +1449,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetAuthorizedViewRequest", + "name": "com.google.bigtable.admin.v2.DeleteTableRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1386,7 +1458,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetAuthorizedViewRequest$Builder", + "name": "com.google.bigtable.admin.v2.DropRowRangeRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1395,7 +1467,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetBackupRequest", + "name": "com.google.bigtable.admin.v2.DropRowRangeRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1404,7 +1476,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetBackupRequest$Builder", + "name": "com.google.bigtable.admin.v2.EncryptionInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1413,7 +1485,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetClusterRequest", + "name": "com.google.bigtable.admin.v2.EncryptionInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1422,7 +1494,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, @@ -1431,7 +1503,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetInstanceRequest", + "name": "com.google.bigtable.admin.v2.GcRule", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1440,7 +1512,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, @@ -1449,7 +1521,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetSnapshotRequest", + "name": "com.google.bigtable.admin.v2.GcRule$Intersection", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1458,7 +1530,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, @@ -1467,7 +1539,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetTableRequest", + "name": "com.google.bigtable.admin.v2.GcRule$Union", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1476,7 +1548,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, @@ -1485,7 +1557,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.HotTablet", + "name": "com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1494,7 +1566,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, @@ -1503,7 +1575,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Instance", + "name": "com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1512,7 +1584,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, @@ -1521,7 +1593,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Instance$State", + "name": "com.google.bigtable.admin.v2.GetAppProfileRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1530,7 +1602,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, @@ -1539,7 +1611,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListAppProfilesRequest", + "name": "com.google.bigtable.admin.v2.GetAuthorizedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1548,7 +1620,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, @@ -1557,7 +1629,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListAppProfilesResponse", + "name": "com.google.bigtable.admin.v2.GetBackupRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1566,7 +1638,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, @@ -1575,7 +1647,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsRequest", + "name": "com.google.bigtable.admin.v2.GetClusterRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1584,7 +1656,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, @@ -1593,7 +1665,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsResponse", + "name": "com.google.bigtable.admin.v2.GetInstanceRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1602,7 +1674,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, @@ -1611,7 +1683,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListBackupsRequest", + "name": "com.google.bigtable.admin.v2.GetLogicalViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1620,7 +1692,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, @@ -1629,7 +1701,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListBackupsResponse", + "name": "com.google.bigtable.admin.v2.GetMaterializedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1638,7 +1710,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, @@ -1647,7 +1719,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListClustersRequest", + "name": "com.google.bigtable.admin.v2.GetSchemaBundleRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1656,7 +1728,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, @@ -1665,7 +1737,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListClustersResponse", + "name": "com.google.bigtable.admin.v2.GetSnapshotRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1674,7 +1746,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, @@ -1683,7 +1755,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListHotTabletsRequest", + "name": "com.google.bigtable.admin.v2.GetTableRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1692,7 +1764,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, @@ -1701,7 +1773,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListHotTabletsResponse", + "name": "com.google.bigtable.admin.v2.HotTablet", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1710,7 +1782,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, @@ -1719,7 +1791,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListInstancesRequest", + "name": "com.google.bigtable.admin.v2.Instance", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1728,7 +1800,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, @@ -1737,7 +1809,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListInstancesResponse", + "name": "com.google.bigtable.admin.v2.Instance$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1746,7 +1818,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListInstancesResponse$Builder", + "name": "com.google.bigtable.admin.v2.Instance$Type", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1755,7 +1827,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListSnapshotsRequest", + "name": "com.google.bigtable.admin.v2.ListAppProfilesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1764,7 +1836,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListSnapshotsRequest$Builder", + "name": "com.google.bigtable.admin.v2.ListAppProfilesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1773,7 +1845,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListSnapshotsResponse", + "name": "com.google.bigtable.admin.v2.ListAppProfilesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1782,7 +1854,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListSnapshotsResponse$Builder", + "name": "com.google.bigtable.admin.v2.ListAppProfilesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1791,7 +1863,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListTablesRequest", + "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1800,7 +1872,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListTablesRequest$Builder", + "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1809,7 +1881,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListTablesResponse", + "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1818,7 +1890,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListTablesResponse$Builder", + "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1827,7 +1899,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest", + "name": "com.google.bigtable.admin.v2.ListBackupsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1836,7 +1908,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest$Builder", + "name": "com.google.bigtable.admin.v2.ListBackupsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1845,7 +1917,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest$Modification", + "name": "com.google.bigtable.admin.v2.ListBackupsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1854,7 +1926,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest$Modification$Builder", + "name": "com.google.bigtable.admin.v2.ListBackupsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1863,7 +1935,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.OperationProgress", + "name": "com.google.bigtable.admin.v2.ListClustersRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1872,7 +1944,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.OperationProgress$Builder", + "name": "com.google.bigtable.admin.v2.ListClustersRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1881,7 +1953,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.OptimizeRestoredTableMetadata", + "name": "com.google.bigtable.admin.v2.ListClustersResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1890,7 +1962,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.OptimizeRestoredTableMetadata$Builder", + "name": "com.google.bigtable.admin.v2.ListClustersResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1899,7 +1971,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.PartialUpdateClusterMetadata", + "name": "com.google.bigtable.admin.v2.ListHotTabletsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1908,7 +1980,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.PartialUpdateClusterMetadata$Builder", + "name": "com.google.bigtable.admin.v2.ListHotTabletsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1917,7 +1989,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.PartialUpdateClusterRequest", + "name": "com.google.bigtable.admin.v2.ListHotTabletsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1926,7 +1998,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.PartialUpdateClusterRequest$Builder", + "name": "com.google.bigtable.admin.v2.ListHotTabletsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1935,7 +2007,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.PartialUpdateInstanceRequest", + "name": "com.google.bigtable.admin.v2.ListInstancesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1944,7 +2016,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.PartialUpdateInstanceRequest$Builder", + "name": "com.google.bigtable.admin.v2.ListInstancesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1953,7 +2025,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.RestoreInfo", + "name": "com.google.bigtable.admin.v2.ListInstancesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1962,7 +2034,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.RestoreInfo$Builder", + "name": "com.google.bigtable.admin.v2.ListInstancesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1971,7 +2043,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.RestoreSourceType", + "name": "com.google.bigtable.admin.v2.ListLogicalViewsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1980,7 +2052,385 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.RestoreTableMetadata", + "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, @@ -1998,7 +2448,304 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.RestoreTableRequest", + "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, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.SnapshotTableMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.SnapshotTableMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.SnapshotTableRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.SnapshotTableRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.StandardReadRemoteWrites", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.StandardReadRemoteWrites$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.StorageType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Table", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Table$AutomatedBackupPolicy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Table$AutomatedBackupPolicy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Table$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Table$ClusterState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Table$ClusterState$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Table$ClusterState$ReplicationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Table$TimestampGranularity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Table$View", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Aggregate", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Aggregate$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Aggregate$HyperLogLogPlusPlusUniqueCount", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Aggregate$HyperLogLogPlusPlusUniqueCount$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Aggregate$Max", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Aggregate$Max$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Aggregate$Min", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Aggregate$Min$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Aggregate$Sum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Aggregate$Sum$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2007,7 +2754,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.RestoreTableRequest$Builder", + "name": "com.google.bigtable.admin.v2.Type$Array", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2016,7 +2763,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Snapshot", + "name": "com.google.bigtable.admin.v2.Type$Array$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2025,7 +2772,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Snapshot$Builder", + "name": "com.google.bigtable.admin.v2.Type$Bool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2034,7 +2781,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Snapshot$State", + "name": "com.google.bigtable.admin.v2.Type$Bool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2043,7 +2790,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.SnapshotTableMetadata", + "name": "com.google.bigtable.admin.v2.Type$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2052,7 +2799,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.SnapshotTableMetadata$Builder", + "name": "com.google.bigtable.admin.v2.Type$Bytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2061,7 +2808,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.SnapshotTableRequest", + "name": "com.google.bigtable.admin.v2.Type$Bytes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2070,7 +2817,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.SnapshotTableRequest$Builder", + "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2079,7 +2826,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.StandardReadRemoteWrites", + "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2088,7 +2835,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.StandardReadRemoteWrites$Builder", + "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding$Raw", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2097,7 +2844,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.StorageType", + "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding$Raw$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2106,7 +2853,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table", + "name": "com.google.bigtable.admin.v2.Type$Date", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2115,7 +2862,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$AutomatedBackupPolicy", + "name": "com.google.bigtable.admin.v2.Type$Date$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2124,7 +2871,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$AutomatedBackupPolicy$Builder", + "name": "com.google.bigtable.admin.v2.Type$Enum", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2133,7 +2880,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$Builder", + "name": "com.google.bigtable.admin.v2.Type$Enum$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2142,7 +2889,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$ClusterState", + "name": "com.google.bigtable.admin.v2.Type$Float32", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2151,7 +2898,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$ClusterState$Builder", + "name": "com.google.bigtable.admin.v2.Type$Float32$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2160,7 +2907,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$ClusterState$ReplicationState", + "name": "com.google.bigtable.admin.v2.Type$Float64", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2169,7 +2916,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$TimestampGranularity", + "name": "com.google.bigtable.admin.v2.Type$Float64$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2178,7 +2925,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$View", + "name": "com.google.bigtable.admin.v2.Type$Int64", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2187,7 +2934,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type", + "name": "com.google.bigtable.admin.v2.Type$Int64$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2196,7 +2943,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Aggregate", + "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2205,7 +2952,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Aggregate$Builder", + "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$BigEndianBytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2214,7 +2961,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Aggregate$Sum", + "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$BigEndianBytes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2223,7 +2970,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Aggregate$Sum$Builder", + "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2232,7 +2979,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Builder", + "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$OrderedCodeBytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2241,7 +2988,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Bytes", + "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$OrderedCodeBytes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2250,7 +2997,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Bytes$Builder", + "name": "com.google.bigtable.admin.v2.Type$Map", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2259,7 +3006,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding", + "name": "com.google.bigtable.admin.v2.Type$Map$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2268,7 +3015,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding$Builder", + "name": "com.google.bigtable.admin.v2.Type$Proto", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2277,7 +3024,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding$Raw", + "name": "com.google.bigtable.admin.v2.Type$Proto$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2286,7 +3033,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding$Raw$Builder", + "name": "com.google.bigtable.admin.v2.Type$String", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2295,7 +3042,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Int64", + "name": "com.google.bigtable.admin.v2.Type$String$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2304,7 +3051,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Int64$Builder", + "name": "com.google.bigtable.admin.v2.Type$String$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2313,7 +3060,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding", + "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2322,7 +3069,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$BigEndianBytes", + "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Utf8Bytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2331,7 +3078,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$BigEndianBytes$Builder", + "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Utf8Bytes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2340,7 +3087,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$Builder", + "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Utf8Raw", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2349,7 +3096,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$String", + "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Utf8Raw$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2358,7 +3105,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$String$Builder", + "name": "com.google.bigtable.admin.v2.Type$Struct", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2367,7 +3114,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$String$Encoding", + "name": "com.google.bigtable.admin.v2.Type$Struct$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2376,7 +3123,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Builder", + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2385,7 +3132,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Utf8Raw", + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2394,7 +3141,106 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Utf8Raw$Builder", + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding$DelimitedBytes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding$DelimitedBytes$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding$OrderedCodeBytes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding$OrderedCodeBytes$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding$Singleton", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding$Singleton$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Struct$Field", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Struct$Field$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Timestamp$Encoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Type$Timestamp$Encoding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2564,6 +3410,114 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.bigtable.admin.v2.UpdateLogicalViewMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.UpdateLogicalViewMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.UpdateLogicalViewRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.UpdateLogicalViewRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.UpdateMaterializedViewRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.UpdateMaterializedViewRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.UpdateSchemaBundleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.UpdateSchemaBundleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.bigtable.admin.v2.UpdateTableMetadata", "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 2e7b1522bf..a67b91152d 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 @@ -305,6 +305,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, @@ -315,7 +333,709 @@ "allPublicClasses": true }, { - "name": "com.google.api.ResourceDescriptor$Builder", + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingParameter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingParameter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.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.v2.ArrayValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.ArrayValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Cell", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Cell$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.CheckAndMutateRowRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.CheckAndMutateRowRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.CheckAndMutateRowResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.CheckAndMutateRowResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Column", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Column$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.ColumnMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.ColumnMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.ColumnRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.ColumnRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.ExecuteQueryRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.ExecuteQueryRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.ExecuteQueryResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.ExecuteQueryResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Family", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Family$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.FeatureFlags", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.FeatureFlags$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.FullReadStatsView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.FullReadStatsView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Idempotency", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Idempotency$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.MutateRowRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.MutateRowRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.MutateRowResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.MutateRowResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.MutateRowsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.MutateRowsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.MutateRowsRequest$Entry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.MutateRowsRequest$Entry$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.MutateRowsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.MutateRowsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.MutateRowsResponse$Entry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.MutateRowsResponse$Entry$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Mutation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Mutation$AddToCell", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Mutation$AddToCell$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Mutation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Mutation$DeleteFromColumn", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Mutation$DeleteFromColumn$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Mutation$DeleteFromFamily", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Mutation$DeleteFromFamily$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Mutation$DeleteFromRow", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Mutation$DeleteFromRow$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Mutation$MergeToCell", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Mutation$MergeToCell$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Mutation$SetCell", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Mutation$SetCell$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.PartialResultSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.PartialResultSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.PingAndWarmRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.PingAndWarmRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.PingAndWarmResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.PingAndWarmResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.PrepareQueryRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.PrepareQueryRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.PrepareQueryResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.PrepareQueryResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -324,7 +1044,7 @@ "allPublicClasses": true }, { - "name": "com.google.api.ResourceDescriptor$History", + "name": "com.google.bigtable.v2.ProtoFormat", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -333,7 +1053,7 @@ "allPublicClasses": true }, { - "name": "com.google.api.ResourceDescriptor$Style", + "name": "com.google.bigtable.v2.ProtoFormat$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -342,7 +1062,7 @@ "allPublicClasses": true }, { - "name": "com.google.api.ResourceReference", + "name": "com.google.bigtable.v2.ProtoRows", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -351,7 +1071,7 @@ "allPublicClasses": true }, { - "name": "com.google.api.ResourceReference$Builder", + "name": "com.google.bigtable.v2.ProtoRows$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -360,7 +1080,7 @@ "allPublicClasses": true }, { - "name": "com.google.api.RoutingParameter", + "name": "com.google.bigtable.v2.ProtoRowsBatch", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -369,7 +1089,7 @@ "allPublicClasses": true }, { - "name": "com.google.api.RoutingParameter$Builder", + "name": "com.google.bigtable.v2.ProtoRowsBatch$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -378,7 +1098,7 @@ "allPublicClasses": true }, { - "name": "com.google.api.RoutingRule", + "name": "com.google.bigtable.v2.ProtoSchema", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -387,7 +1107,7 @@ "allPublicClasses": true }, { - "name": "com.google.api.RoutingRule$Builder", + "name": "com.google.bigtable.v2.ProtoSchema$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -396,7 +1116,7 @@ "allPublicClasses": true }, { - "name": "com.google.api.RubySettings", + "name": "com.google.bigtable.v2.RateLimitInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -405,7 +1125,7 @@ "allPublicClasses": true }, { - "name": "com.google.api.RubySettings$Builder", + "name": "com.google.bigtable.v2.RateLimitInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -414,7 +1134,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Cell", + "name": "com.google.bigtable.v2.ReadChangeStreamRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -423,7 +1143,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Cell$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -432,7 +1152,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.CheckAndMutateRowRequest", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -441,7 +1161,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.CheckAndMutateRowRequest$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -450,7 +1170,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.CheckAndMutateRowResponse", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$CloseStream", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -459,7 +1179,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.CheckAndMutateRowResponse$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$CloseStream$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -468,7 +1188,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Column", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$DataChange", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -477,7 +1197,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Column$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$DataChange$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -486,7 +1206,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ColumnRange", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$DataChange$Type", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -495,7 +1215,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ColumnRange$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$Heartbeat", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -504,7 +1224,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Family", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$Heartbeat$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -513,7 +1233,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Family$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -522,7 +1242,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.FeatureFlags", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -531,7 +1251,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.FeatureFlags$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk$ChunkInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -540,7 +1260,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.FullReadStatsView", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk$ChunkInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -549,7 +1269,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.FullReadStatsView$Builder", + "name": "com.google.bigtable.v2.ReadIterationStats", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -558,7 +1278,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest", + "name": "com.google.bigtable.v2.ReadIterationStats$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -567,7 +1287,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest$Builder", + "name": "com.google.bigtable.v2.ReadModifyWriteRowRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -576,7 +1296,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse", + "name": "com.google.bigtable.v2.ReadModifyWriteRowRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -585,7 +1305,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse$Builder", + "name": "com.google.bigtable.v2.ReadModifyWriteRowResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -594,7 +1314,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowRequest", + "name": "com.google.bigtable.v2.ReadModifyWriteRowResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -603,7 +1323,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowRequest$Builder", + "name": "com.google.bigtable.v2.ReadModifyWriteRule", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -612,7 +1332,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowResponse", + "name": "com.google.bigtable.v2.ReadModifyWriteRule$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -621,7 +1341,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowResponse$Builder", + "name": "com.google.bigtable.v2.ReadRowsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -630,7 +1350,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsRequest", + "name": "com.google.bigtable.v2.ReadRowsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -639,7 +1359,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsRequest$Builder", + "name": "com.google.bigtable.v2.ReadRowsRequest$RequestStatsView", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -648,7 +1368,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsRequest$Entry", + "name": "com.google.bigtable.v2.ReadRowsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -657,7 +1377,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsRequest$Entry$Builder", + "name": "com.google.bigtable.v2.ReadRowsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -666,7 +1386,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsResponse", + "name": "com.google.bigtable.v2.ReadRowsResponse$CellChunk", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -675,7 +1395,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsResponse$Builder", + "name": "com.google.bigtable.v2.ReadRowsResponse$CellChunk$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -684,7 +1404,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsResponse$Entry", + "name": "com.google.bigtable.v2.RequestLatencyStats", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -693,7 +1413,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsResponse$Entry$Builder", + "name": "com.google.bigtable.v2.RequestLatencyStats$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -702,7 +1422,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation", + "name": "com.google.bigtable.v2.RequestStats", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -711,7 +1431,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$AddToCell", + "name": "com.google.bigtable.v2.RequestStats$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -720,7 +1440,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$AddToCell$Builder", + "name": "com.google.bigtable.v2.ResponseParams", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -729,7 +1449,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$Builder", + "name": "com.google.bigtable.v2.ResponseParams$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -738,7 +1458,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$DeleteFromColumn", + "name": "com.google.bigtable.v2.ResultSetMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -747,7 +1467,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$DeleteFromColumn$Builder", + "name": "com.google.bigtable.v2.ResultSetMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -756,7 +1476,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$DeleteFromFamily", + "name": "com.google.bigtable.v2.Row", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -765,7 +1485,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$DeleteFromFamily$Builder", + "name": "com.google.bigtable.v2.Row$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -774,7 +1494,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$DeleteFromRow", + "name": "com.google.bigtable.v2.RowFilter", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -783,7 +1503,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$DeleteFromRow$Builder", + "name": "com.google.bigtable.v2.RowFilter$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -792,7 +1512,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$SetCell", + "name": "com.google.bigtable.v2.RowFilter$Chain", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -801,7 +1521,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$SetCell$Builder", + "name": "com.google.bigtable.v2.RowFilter$Chain$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -810,7 +1530,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.PingAndWarmRequest", + "name": "com.google.bigtable.v2.RowFilter$Condition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -819,7 +1539,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.PingAndWarmRequest$Builder", + "name": "com.google.bigtable.v2.RowFilter$Condition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -828,7 +1548,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.PingAndWarmResponse", + "name": "com.google.bigtable.v2.RowFilter$Interleave", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -837,7 +1557,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.PingAndWarmResponse$Builder", + "name": "com.google.bigtable.v2.RowFilter$Interleave$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -846,7 +1566,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RateLimitInfo", + "name": "com.google.bigtable.v2.RowRange", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -855,7 +1575,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RateLimitInfo$Builder", + "name": "com.google.bigtable.v2.RowRange$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -864,7 +1584,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamRequest", + "name": "com.google.bigtable.v2.RowSet", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -873,7 +1593,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamRequest$Builder", + "name": "com.google.bigtable.v2.RowSet$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -882,7 +1602,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse", + "name": "com.google.bigtable.v2.SampleRowKeysRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -891,7 +1611,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$Builder", + "name": "com.google.bigtable.v2.SampleRowKeysRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -900,7 +1620,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$CloseStream", + "name": "com.google.bigtable.v2.SampleRowKeysResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -909,7 +1629,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$CloseStream$Builder", + "name": "com.google.bigtable.v2.SampleRowKeysResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -918,7 +1638,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$DataChange", + "name": "com.google.bigtable.v2.StreamContinuationToken", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -927,7 +1647,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$DataChange$Builder", + "name": "com.google.bigtable.v2.StreamContinuationToken$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -936,7 +1656,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$DataChange$Type", + "name": "com.google.bigtable.v2.StreamContinuationTokens", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -945,7 +1665,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$Heartbeat", + "name": "com.google.bigtable.v2.StreamContinuationTokens$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -954,7 +1674,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$Heartbeat$Builder", + "name": "com.google.bigtable.v2.StreamPartition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -963,7 +1683,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk", + "name": "com.google.bigtable.v2.StreamPartition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -972,7 +1692,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk$Builder", + "name": "com.google.bigtable.v2.TimestampRange", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -981,7 +1701,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk$ChunkInfo", + "name": "com.google.bigtable.v2.TimestampRange$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -990,7 +1710,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk$ChunkInfo$Builder", + "name": "com.google.bigtable.v2.Type", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -999,7 +1719,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadIterationStats", + "name": "com.google.bigtable.v2.Type$Aggregate", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1008,7 +1728,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadIterationStats$Builder", + "name": "com.google.bigtable.v2.Type$Aggregate$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1017,7 +1737,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadModifyWriteRowRequest", + "name": "com.google.bigtable.v2.Type$Aggregate$HyperLogLogPlusPlusUniqueCount", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1026,7 +1746,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadModifyWriteRowRequest$Builder", + "name": "com.google.bigtable.v2.Type$Aggregate$HyperLogLogPlusPlusUniqueCount$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1035,7 +1755,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadModifyWriteRowResponse", + "name": "com.google.bigtable.v2.Type$Aggregate$Max", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1044,7 +1764,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadModifyWriteRowResponse$Builder", + "name": "com.google.bigtable.v2.Type$Aggregate$Max$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1053,7 +1773,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadModifyWriteRule", + "name": "com.google.bigtable.v2.Type$Aggregate$Min", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1062,7 +1782,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadModifyWriteRule$Builder", + "name": "com.google.bigtable.v2.Type$Aggregate$Min$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1071,7 +1791,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadRowsRequest", + "name": "com.google.bigtable.v2.Type$Aggregate$Sum", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1080,7 +1800,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadRowsRequest$Builder", + "name": "com.google.bigtable.v2.Type$Aggregate$Sum$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1089,7 +1809,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadRowsRequest$RequestStatsView", + "name": "com.google.bigtable.v2.Type$Array", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1098,7 +1818,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadRowsResponse", + "name": "com.google.bigtable.v2.Type$Array$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1107,7 +1827,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadRowsResponse$Builder", + "name": "com.google.bigtable.v2.Type$Bool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1116,7 +1836,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadRowsResponse$CellChunk", + "name": "com.google.bigtable.v2.Type$Bool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1125,7 +1845,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadRowsResponse$CellChunk$Builder", + "name": "com.google.bigtable.v2.Type$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1134,7 +1854,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RequestLatencyStats", + "name": "com.google.bigtable.v2.Type$Bytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1143,7 +1863,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RequestLatencyStats$Builder", + "name": "com.google.bigtable.v2.Type$Bytes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1152,7 +1872,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RequestStats", + "name": "com.google.bigtable.v2.Type$Bytes$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1161,7 +1881,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RequestStats$Builder", + "name": "com.google.bigtable.v2.Type$Bytes$Encoding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1170,7 +1890,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ResponseParams", + "name": "com.google.bigtable.v2.Type$Bytes$Encoding$Raw", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1179,7 +1899,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ResponseParams$Builder", + "name": "com.google.bigtable.v2.Type$Bytes$Encoding$Raw$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1188,7 +1908,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Row", + "name": "com.google.bigtable.v2.Type$Date", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1197,7 +1917,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Row$Builder", + "name": "com.google.bigtable.v2.Type$Date$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1206,7 +1926,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter", + "name": "com.google.bigtable.v2.Type$Enum", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1215,7 +1935,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter$Builder", + "name": "com.google.bigtable.v2.Type$Enum$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1224,7 +1944,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter$Chain", + "name": "com.google.bigtable.v2.Type$Float32", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1233,7 +1953,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter$Chain$Builder", + "name": "com.google.bigtable.v2.Type$Float32$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1242,7 +1962,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter$Condition", + "name": "com.google.bigtable.v2.Type$Float64", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1251,7 +1971,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter$Condition$Builder", + "name": "com.google.bigtable.v2.Type$Float64$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1260,7 +1980,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter$Interleave", + "name": "com.google.bigtable.v2.Type$Int64", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1269,7 +1989,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter$Interleave$Builder", + "name": "com.google.bigtable.v2.Type$Int64$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1278,7 +1998,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowRange", + "name": "com.google.bigtable.v2.Type$Int64$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1287,7 +2007,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowRange$Builder", + "name": "com.google.bigtable.v2.Type$Int64$Encoding$BigEndianBytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1296,7 +2016,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowSet", + "name": "com.google.bigtable.v2.Type$Int64$Encoding$BigEndianBytes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1305,7 +2025,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowSet$Builder", + "name": "com.google.bigtable.v2.Type$Int64$Encoding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1314,7 +2034,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.SampleRowKeysRequest", + "name": "com.google.bigtable.v2.Type$Map", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1323,7 +2043,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.SampleRowKeysRequest$Builder", + "name": "com.google.bigtable.v2.Type$Map$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1332,7 +2052,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.SampleRowKeysResponse", + "name": "com.google.bigtable.v2.Type$Proto", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1341,7 +2061,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.SampleRowKeysResponse$Builder", + "name": "com.google.bigtable.v2.Type$Proto$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1350,7 +2070,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.StreamContinuationToken", + "name": "com.google.bigtable.v2.Type$String", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1359,7 +2079,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.StreamContinuationToken$Builder", + "name": "com.google.bigtable.v2.Type$String$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1368,7 +2088,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.StreamContinuationTokens", + "name": "com.google.bigtable.v2.Type$String$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1377,7 +2097,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.StreamContinuationTokens$Builder", + "name": "com.google.bigtable.v2.Type$String$Encoding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1386,7 +2106,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.StreamPartition", + "name": "com.google.bigtable.v2.Type$String$Encoding$Utf8Bytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1395,7 +2115,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.StreamPartition$Builder", + "name": "com.google.bigtable.v2.Type$String$Encoding$Utf8Bytes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1404,7 +2124,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.TimestampRange", + "name": "com.google.bigtable.v2.Type$String$Encoding$Utf8Raw", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1413,7 +2133,61 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.TimestampRange$Builder", + "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$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, @@ -2419,5 +3193,23 @@ "allPublicMethods": true, "allDeclaredClasses": true, "allPublicClasses": true + }, + { + "name": "com.google.type.Date", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Date$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true } ] \ No newline at end of file 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..ab2d542080 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 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. @@ -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 44e2f63211..49ffea6786 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 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. @@ -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,18 @@ 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.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 +166,7 @@ public void createTableTest() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -205,6 +216,7 @@ public void createTableTest2() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -254,6 +266,7 @@ public void createTableFromSnapshotTest() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -315,6 +328,7 @@ public void createTableFromSnapshotTest2() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -374,6 +388,7 @@ public void createTableFromSnapshotTest3() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -435,6 +450,7 @@ public void createTableFromSnapshotTest4() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -582,6 +598,7 @@ public void getTableTest() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -625,6 +642,7 @@ public void getTableTest2() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -668,6 +686,7 @@ public void updateTableTest() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -790,6 +809,7 @@ public void undeleteTableTest() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -841,6 +861,7 @@ public void undeleteTableTest2() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1309,6 +1330,7 @@ public void modifyColumnFamiliesTest() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -1356,6 +1378,7 @@ public void modifyColumnFamiliesTest2() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -2096,6 +2119,7 @@ public void createBackupTest() throws Exception { .setEndTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setHotToStandardTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2155,6 +2179,7 @@ public void createBackupTest2() throws Exception { .setEndTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setHotToStandardTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2214,6 +2239,7 @@ public void getBackupTest() throws Exception { .setEndTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setHotToStandardTime(Timestamp.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -2259,6 +2285,7 @@ public void getBackupTest2() throws Exception { .setEndTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setHotToStandardTime(Timestamp.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -2304,6 +2331,7 @@ public void updateBackupTest() throws Exception { .setEndTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setHotToStandardTime(Timestamp.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -2506,6 +2534,7 @@ public void restoreTableTest() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2569,6 +2598,7 @@ public void copyBackupTest() throws Exception { .setEndTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setHotToStandardTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2632,6 +2662,7 @@ public void copyBackupTest2() throws Exception { .setEndTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setHotToStandardTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2695,6 +2726,7 @@ public void copyBackupTest3() throws Exception { .setEndTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setHotToStandardTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2758,6 +2790,7 @@ public void copyBackupTest4() throws Exception { .setEndTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setHotToStandardTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2820,7 +2853,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); @@ -2842,7 +2876,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) { @@ -2902,7 +2937,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); @@ -2926,7 +2962,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"); @@ -2985,7 +3022,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); @@ -3009,7 +3047,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"); @@ -3056,4 +3095,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..9217443790 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,18 @@ 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.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 +75,9 @@ import com.google.protobuf.FieldMask; import io.grpc.Status; import io.grpc.Status.Code; +import java.util.HashSet; import java.util.List; +import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import org.junit.Before; @@ -95,6 +107,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 +116,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 +247,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); @@ -1034,6 +1111,159 @@ 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); + + 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 + Set clusterIds = new HashSet(); + clusterIds.add("cluster-id-1"); + clusterIds.add("cluster-id-2"); + 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 @@ -1405,4 +1635,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 fd761ff915..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 @@ -144,7 +152,7 @@ public void testToString() throws IOException { BigtableInstanceAdminSettings settings = builder.build(); checkToString(settings); assertThat(settings.toString()).contains("endpoint=example.com:1234"); - assertThat(settings.toString()).contains("totalTimeout=PT13H32M"); + assertThat(settings.toString()).contains("totalTimeoutDuration=PT13H32M"); } void checkToString(BigtableInstanceAdminSettings settings) { @@ -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 e604495c43..0bf3731161 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; @@ -46,10 +47,12 @@ import com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification; 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,24 +61,30 @@ 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.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; @@ -89,6 +98,11 @@ 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.file.Files; +import java.nio.file.Paths; import java.util.List; import java.util.Map; import java.util.concurrent.ExecutionException; @@ -121,6 +135,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 +175,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, @@ -222,6 +243,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; @@ -251,6 +301,63 @@ public void testCreateTable() { .setTableId(TABLE_ID) .setTable( com.google.bigtable.admin.v2.Table.newBuilder() + .putColumnFamilies( + "cf1", + ColumnFamily.newBuilder() + .setGcRule(GcRule.getDefaultInstance()) + .setValueType(TypeProtos.intSumType()) + .build()) + .putColumnFamilies( + "cf2", + ColumnFamily.newBuilder() + .setGcRule(GcRule.getDefaultInstance()) + .setValueType(TypeProtos.intMinType()) + .build()) + .putColumnFamilies( + "cf3", + ColumnFamily.newBuilder() + .setGcRule(GcRule.getDefaultInstance()) + .setValueType(TypeProtos.intMaxType()) + .build()) + .putColumnFamilies( + "cf4", + ColumnFamily.newBuilder() + .setGcRule(GcRule.getDefaultInstance()) + .setValueType(TypeProtos.intHllType()) + .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()) + .addFamily("cf2", Type.int64Min()) + .addFamily("cf3", Type.int64Max()) + .addFamily("cf4", Type.int64Hll())); + + // Verify + 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() @@ -267,7 +374,10 @@ public void testCreateTable() { // Execute Table result = - adminClient.createTable(CreateTableRequest.of(TABLE_ID).addFamily("cf1", Type.int64Sum())); + adminClient.createTable( + CreateTableRequest.of(TABLE_ID) + .addFamily("cf1", Type.int64Sum()) + .setDeletionProtection(true)); // Verify assertThat(result).isEqualTo(Table.fromProto(expectedResponse)); @@ -305,6 +415,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 @@ -436,7 +548,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 +655,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 @@ -592,7 +728,9 @@ 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), @@ -625,6 +763,61 @@ public void testCreateBackup() { 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), + com.google.bigtable.admin.v2.Backup.newBuilder() + .setName(backupName) + .setSourceTable(TABLE_NAME) + .setStartTime(startTime) + .setEndTime(endTime) + .setExpireTime(expireTime) + .setSizeBytes(sizeBytes) + .setBackupType(com.google.bigtable.admin.v2.Backup.BackupType.HOT) + .setHotToStandardTime(hotToStandardTime) + .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.getBackupType()).isEqualTo(Backup.BackupType.HOT); + assertThat(actualResult.getHotToStandardTime()) + .isEqualTo(Instant.ofEpochMilli(Timestamps.toMillis(hotToStandardTime))); + assertThat(actualResult.getSizeBytes()).isEqualTo(sizeBytes); + } + @Test public void testGetBackup() { // Setup @@ -651,6 +844,7 @@ public void testGetBackup() { .setEndTime(endTime) .setSizeBytes(sizeBytes) .setState(state) + .setBackupType(com.google.bigtable.admin.v2.Backup.BackupType.STANDARD) .build())); // Execute @@ -667,6 +861,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 @@ -675,6 +870,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))) @@ -686,6 +882,7 @@ public void testUpdateBackup() { .setSourceTable(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .setExpireTime(expireTime) .setSizeBytes(sizeBytes) + .setHotToStandardTime(hotToStandardTime) .build())); // Execute @@ -696,6 +893,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); } @@ -865,6 +1064,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; @@ -1138,6 +1338,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 @@ -1262,4 +1674,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 457ad4c637..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,14 +169,16 @@ 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); assertThat(defaultSettings.toString()).doesNotContain("endpoint=example.com:1234"); assertThat(settings.toString()).contains("endpoint=example.com:1234"); - assertThat(defaultSettings.toString()).doesNotContain("totalTimeout=PT13H32M"); - assertThat(settings.toString()).contains("totalTimeout=PT13H32M"); + assertThat(defaultSettings.toString()).doesNotContain("totalTimeoutDuration=PT13H32M"); + assertThat(settings.toString()).contains("totalTimeoutDuration=PT13H32M"); List nonStaticFields = Arrays.stream(BigtableTableAdminStubSettings.class.getDeclaredFields()) 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..e1b18af722 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 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. 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..810c0b7601 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 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. @@ -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..0df8357a13 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 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. 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..44e3472650 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 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. @@ -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/TypeProtos.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/TypeProtos.java index 0e73f923f6..f8fd3549f8 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/TypeProtos.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/TypeProtos.java @@ -34,7 +34,6 @@ public static com.google.bigtable.admin.v2.Type int64Type() { .setBigEndianBytes( com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes .newBuilder() - .setBytesType(bytesType()) .build()) .build())) .build(); @@ -48,4 +47,33 @@ public static com.google.bigtable.admin.v2.Type intSumType() { .setSum(com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance())) .build(); } + + public static com.google.bigtable.admin.v2.Type intMinType() { + return com.google.bigtable.admin.v2.Type.newBuilder() + .setAggregateType( + com.google.bigtable.admin.v2.Type.Aggregate.newBuilder() + .setInputType(TypeProtos.int64Type()) + .setMin(com.google.bigtable.admin.v2.Type.Aggregate.Min.getDefaultInstance())) + .build(); + } + + public static com.google.bigtable.admin.v2.Type intMaxType() { + return com.google.bigtable.admin.v2.Type.newBuilder() + .setAggregateType( + com.google.bigtable.admin.v2.Type.Aggregate.newBuilder() + .setInputType(TypeProtos.int64Type()) + .setMax(com.google.bigtable.admin.v2.Type.Aggregate.Max.getDefaultInstance())) + .build(); + } + + public static com.google.bigtable.admin.v2.Type intHllType() { + return com.google.bigtable.admin.v2.Type.newBuilder() + .setAggregateType( + com.google.bigtable.admin.v2.Type.Aggregate.newBuilder() + .setInputType(TypeProtos.int64Type()) + .setHllppUniqueCount( + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance())) + .build(); + } } 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..68f0b590d8 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 @@ -18,6 +18,7 @@ import static com.google.common.truth.Truth.assertThat; 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; @@ -59,6 +60,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 = @@ -71,6 +103,18 @@ public void extractAuthorizedViewIdFromAuthorizedViewNameTest() { 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"); + + exception.expect(IllegalArgumentException.class); + NameUtil.extractSchemaBundleIdFromSchemaBundleName("bad-format"); + } + @Test public void extractTableIdFromAuthorizedViewNameTest() { String testAuthorizedViewName = @@ -102,23 +146,64 @@ public void extractTableNameFromAuthorizedViewNameTest() { } @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")); + // No name is provided exception.expect(IllegalArgumentException.class); com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId("", ""); + // Multiple names are provided 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 + exception.expect(IllegalArgumentException.class); + com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId("", "", ""); + + // Multiple names are provided + exception.expect(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, "", testMaterializedViewName); + + exception.expect(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/BigtableBackupIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableBackupIT.java index 9230cecc70..e58783e466 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 @@ -72,14 +72,17 @@ public class BigtableBackupIT { 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; @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 +94,23 @@ public static void setUpClass() throws InterruptedException { targetCluster = testEnvRule.env().getPrimaryClusterId(); testTable = createAndPopulateTestTable(tableAdmin, dataClient); + + String newInstanceId = PrefixGenerator.newPrefix("backupIT"); + targetClusterHot = newInstanceId + "-c1"; + + instanceAdmin.createInstance( + CreateInstanceRequest.of(newInstanceId) + .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 @@ -164,6 +184,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 +268,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); } } 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..8660b7b611 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 @@ -100,17 +100,14 @@ 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()); 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..93e8f5b790 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; @@ -36,7 +37,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 +53,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(); @@ -279,6 +285,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(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); @@ -410,7 +453,7 @@ public void createClusterWithAutoscalingTest() { } @Test - public void createClusterWithAutoscalingAndPartialUpdateTest() { + public void createClusterWithAutoscalingAndPartialUpdateTest() throws Exception { String newInstanceId = prefixGenerator.newPrefix(); String newClusterId = newInstanceId + "-c1"; @@ -448,8 +491,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 +514,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 +528,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 +543,7 @@ public void createClusterWithAutoscalingAndPartialUpdateTest() { assertThat(retrievedUpdatedCluster.getStorageUtilizationGibPerNode()).isEqualTo(2561); updatedCluster = - client.updateClusterAutoscalingConfig( + updateClusterAutoScalingConfigWithRetry( ClusterAutoscalingConfig.of(newInstanceId, clusterId) .setCpuUtilizationTargetPercent(45) .setMaxNodes(5)); @@ -508,7 +559,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 +574,7 @@ public void createClusterWithAutoscalingAndPartialUpdateTest() { assertThat(retrievedUpdatedCluster.getStorageUtilizationGibPerNode()).isEqualTo(2777); updatedCluster = - client.updateClusterAutoscalingConfig( + updateClusterAutoScalingConfigWithRetry( ClusterAutoscalingConfig.of(newInstanceId, clusterId) // testing default case .setStorageUtilizationGibPerNode(0)); @@ -614,4 +665,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..d73d68d48f --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableLogicalViewIT.java @@ -0,0 +1,196 @@ +/* + * 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.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 int[] BACKOFF_DURATION = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}; + + private static BigtableInstanceAdminClient client; + private static Table testTable; + + private 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()); + } + + @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..c12d9332b2 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableMaterializedViewIT.java @@ -0,0 +1,214 @@ +/* + * 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.CreateInstanceRequest; +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.StorageType; +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 int[] BACKOFF_DURATION = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}; + + private BigtableInstanceAdminClient client; + private BigtableTableAdminClient tableAdminClient; + private Table testTable; + private String instanceId = ""; + + // 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(); + + instanceId = new PrefixGenerator().newPrefix(); + client.createInstance( + CreateInstanceRequest.of(instanceId) + .setDisplayName("BigtableMaterializedViewIT") + .addCluster( + instanceId + "-c1", testEnvRule.env().getPrimaryZone(), 1, StorageType.SSD)); + tableAdminClient = testEnvRule.env().getTableAdminClientForInstance(instanceId); + + testTable = createTestTable(tableAdminClient); + } + + @After + public void deleteInstance() { + if (!instanceId.isEmpty()) { + client.deleteInstance(instanceId); + } + } + + @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..62001f8230 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableSchemaBundleIT.java @@ -0,0 +1,219 @@ +/* + * 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.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.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 int[] 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 = 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 { + String tableId = PrefixGenerator.newPrefix("BigtableSchemaBundleIT#createAndPopulateTestTable"); + Table testTable = tableAdmin.createTable(CreateTableRequest.of(tableId).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++) { + 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..cfcc8d0b42 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; @@ -227,6 +229,23 @@ public void awaitReplication() { tableAdmin.awaitReplication(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 public void iamUpdateTest() { assume() 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/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..d9e40242a1 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequestTest.java @@ -0,0 +1,82 @@ +/* + * 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)); + } +} 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/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/LogicalViewTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/LogicalViewTest.java new file mode 100644 index 0000000000..7a17aaecf8 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/LogicalViewTest.java @@ -0,0 +1,112 @@ +/* + * 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( + 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..548be93f8c --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/MaterializedViewTest.java @@ -0,0 +1,116 @@ +/* + * 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( + 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..09f675aa63 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/SchemaBundleTest.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 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( + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setName(schemaBundleName.toString()) + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFromUtf8("schema")) + .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/TableAdminRequestsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/TableAdminRequestsTest.java index 05c2abcd85..ff5c40d4b4 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/TableAdminRequestsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/TableAdminRequestsTest.java @@ -80,6 +80,12 @@ public void modifyFamilies() { .addFamily("cf3") .addFamily("cf4", Type.int64Sum()) .addFamily("cf5", GCRules.GCRULES.maxVersions(1), Type.int64Sum()) + .addFamily("cf6", Type.int64Min()) + .addFamily("cf7", GCRules.GCRULES.maxVersions(1), Type.int64Min()) + .addFamily("cf8", Type.int64Max()) + .addFamily("cf9", GCRules.GCRULES.maxVersions(1), Type.int64Max()) + .addFamily("cf10", Type.int64Hll()) + .addFamily("cf11", GCRules.GCRULES.maxVersions(1), Type.int64Hll()) .updateFamily("cf1", GCRules.GCRULES.maxVersions(5)) .dropFamily("cf3") .toProto(PROJECT_ID, INSTANCE_ID); @@ -119,6 +125,48 @@ public void modifyFamilies() { com.google.bigtable.admin.v2.ColumnFamily.newBuilder() .setGcRule(GCRules.GCRULES.maxVersions(1).toProto()) .setValueType(Type.int64Sum().toProto()))) + .addModifications( + com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.newBuilder() + .setId("cf6") + .setCreate( + com.google.bigtable.admin.v2.ColumnFamily.newBuilder() + .setGcRule(GcRule.getDefaultInstance()) + .setValueType(Type.int64Min().toProto()))) + .addModifications( + com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.newBuilder() + .setId("cf7") + .setCreate( + com.google.bigtable.admin.v2.ColumnFamily.newBuilder() + .setGcRule(GCRules.GCRULES.maxVersions(1).toProto()) + .setValueType(Type.int64Min().toProto()))) + .addModifications( + com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.newBuilder() + .setId("cf8") + .setCreate( + com.google.bigtable.admin.v2.ColumnFamily.newBuilder() + .setGcRule(GcRule.getDefaultInstance()) + .setValueType(Type.int64Max().toProto()))) + .addModifications( + com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.newBuilder() + .setId("cf9") + .setCreate( + com.google.bigtable.admin.v2.ColumnFamily.newBuilder() + .setGcRule(GCRules.GCRULES.maxVersions(1).toProto()) + .setValueType(Type.int64Max().toProto()))) + .addModifications( + com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.newBuilder() + .setId("cf10") + .setCreate( + com.google.bigtable.admin.v2.ColumnFamily.newBuilder() + .setGcRule(GcRule.getDefaultInstance()) + .setValueType(Type.int64Hll().toProto()))) + .addModifications( + com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.newBuilder() + .setId("cf11") + .setCreate( + com.google.bigtable.admin.v2.ColumnFamily.newBuilder() + .setGcRule(GCRules.GCRULES.maxVersions(1).toProto()) + .setValueType(Type.int64Hll().toProto()))) .addModifications( com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.newBuilder() .setId("cf1") 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..cf11121455 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( + result.getAutomatedBackupPolicy().viewConfig(), + "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" + + // + "}"); + 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/TypeTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/TypeTest.java index e724dfe790..c08415a5c1 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/TypeTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/TypeTest.java @@ -55,7 +55,7 @@ public void bigEndianInt64() { @Test public void int64WithEncoding() { - Type type = Type.int64(Int64.Encoding.BigEndianBytes.create(Bytes.rawBytes())); + Type type = Type.int64(Int64.Encoding.BigEndianBytes.create()); assertThat(type.toProto()).isEqualTo(TypeProtos.int64Type()); } @@ -77,4 +77,61 @@ public void intSumFromProtoToProto() { assertThat(Type.fromProto(proto)).isEqualTo(Type.int64Sum()); assertThat(Type.fromProto(proto).toProto()).isEqualTo(proto); } + + @Test + public void int64Min() { + Type type = Type.int64Min(); + assertThat(type.toProto()).isEqualTo(TypeProtos.intMinType()); + } + + @Test + public void min() { + Type type = Type.min(Type.bigEndianInt64()); + assertThat(type.toProto()).isEqualTo(TypeProtos.intMinType()); + } + + @Test + public void intMinFromProtoToProto() { + com.google.bigtable.admin.v2.Type proto = TypeProtos.intMinType(); + assertThat(Type.fromProto(proto)).isEqualTo(Type.int64Min()); + assertThat(Type.fromProto(proto).toProto()).isEqualTo(proto); + } + + @Test + public void int64Max() { + Type type = Type.int64Max(); + assertThat(type.toProto()).isEqualTo(TypeProtos.intMaxType()); + } + + @Test + public void max() { + Type type = Type.max(Type.bigEndianInt64()); + assertThat(type.toProto()).isEqualTo(TypeProtos.intMaxType()); + } + + @Test + public void intMaxFromProtoToProto() { + com.google.bigtable.admin.v2.Type proto = TypeProtos.intMaxType(); + assertThat(Type.fromProto(proto)).isEqualTo(Type.int64Max()); + assertThat(Type.fromProto(proto).toProto()).isEqualTo(proto); + } + + @Test + public void bytesHll() { + Type type = Type.int64Hll(); + assertThat(type.toProto()).isEqualTo(TypeProtos.intHllType()); + } + + @Test + public void hll() { + Type type = Type.hll(Type.bigEndianInt64()); + assertThat(type.toProto()).isEqualTo(TypeProtos.intHllType()); + } + + @Test + public void bytesHllFromProtoToProto() { + com.google.bigtable.admin.v2.Type proto = TypeProtos.intHllType(); + assertThat(Type.fromProto(proto)).isEqualTo(Type.int64Hll()); + assertThat(Type.fromProto(proto).toProto()).isEqualTo(proto); + } } 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..9551fd70c4 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 @@ -37,11 +37,14 @@ public class UpdateBackupRequestTest { 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 +53,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 +68,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/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 62% 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..2628cdf224 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; @@ -47,11 +50,16 @@ import org.threeten.bp.Duration; @RunWith(JUnit4.class) -public class AwaitReplicationCallableTest { +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 +69,9 @@ public class AwaitReplicationCallableTest { private UnaryCallable mockCheckConsistencyCallable; - private AwaitReplicationCallable callable; + private AwaitReplicationCallable awaitReplicationCallable; + + private AwaitConsistencyCallable awaitConsistencyCallable; @Before public void setUp() { @@ -81,12 +91,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 +110,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 +138,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 +146,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 +175,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 +183,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 +205,7 @@ public void testPolling() throws Exception { CheckConsistencyRequest.newBuilder() .setName(TABLE_NAME.toString()) .setConsistencyToken("fake-token") + .setStandardReadRemoteWrites(StandardReadRemoteWrites.newBuilder().build()) .build(); CheckConsistencyResponse expectedResponse2 = @@ -199,7 +218,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 +240,7 @@ public void testPollingTimeout() throws Exception { CheckConsistencyRequest.newBuilder() .setName(TABLE_NAME.toString()) .setConsistencyToken("fake-token") + .setStandardReadRemoteWrites(StandardReadRemoteWrites.newBuilder().build()) .build(); CheckConsistencyResponse expectedResponse2 = @@ -227,7 +249,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 +262,67 @@ 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); + } } 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 new file mode 100644 index 0000000000..770887a324 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/common/TypeTest.java @@ -0,0 +1,208 @@ +/* + * 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.common; + +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.arrayType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesType; +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.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; +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.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.common.testing.EqualsTester; +import com.google.protobuf.ByteString; +import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class TypeTest { + + @Test + public void simpleTypes_TypeToString() { + assertThat(Type.String.create().toString()).isEqualTo("STRING"); + assertThat(Type.Bytes.create().toString()).isEqualTo("BYTES"); + assertThat(Type.Int64.create().toString()).isEqualTo("INT64"); + assertThat(Type.Float64.create().toString()).isEqualTo("FLOAT64"); + assertThat(Type.Float32.create().toString()).isEqualTo("FLOAT32"); + assertThat(Type.Bool.create().toString()).isEqualTo("BOOL"); + assertThat(Type.Timestamp.create().toString()).isEqualTo("TIMESTAMP"); + assertThat(Type.Date.create().toString()).isEqualTo("DATE"); + assertThat(Type.SchemalessStruct.create().toString()).isEqualTo("STRUCT"); + } + + @Test + public void simpleTypes_equals() { + assertThat(Type.String.create()).isEqualTo(Type.String.create()); + assertThat(Type.Bytes.create()).isEqualTo(Type.Bytes.create()); + assertThat(Type.Int64.create()).isEqualTo(Type.Int64.create()); + assertThat(Type.Float32.create()).isEqualTo(Type.Float32.create()); + assertThat(Type.Float64.create()).isEqualTo(Type.Float64.create()); + assertThat(Type.Bool.create()).isEqualTo(Type.Bool.create()); + assertThat(Type.Timestamp.create()).isEqualTo(Type.Timestamp.create()); + assertThat(Type.Date.create()).isEqualTo(Type.Date.create()); + assertThat(Type.SchemalessStruct.create()).isEqualTo(Type.SchemalessStruct.create()); + + assertThat(Type.String.create()).isNotEqualTo(Type.Bytes.create()); + assertThat(Type.Bytes.create()).isNotEqualTo(Type.String.create()); + assertThat(Type.Int64.create()).isNotEqualTo(Type.String.create()); + assertThat(Type.Float32.create()).isNotEqualTo(Type.String.create()); + assertThat(Type.Float64.create()).isNotEqualTo(Type.String.create()); + assertThat(Type.Bool.create()).isNotEqualTo(Type.String.create()); + assertThat(Type.Timestamp.create()).isNotEqualTo(Type.String.create()); + assertThat(Type.Date.create()).isNotEqualTo(Type.String.create()); + assertThat(Type.SchemalessStruct.create()).isNotEqualTo(Type.String.create()); + } + + @Test + public void array_equals() { + assertThat(Type.Array.create(Type.String.create())) + .isEqualTo(Type.Array.create(Type.String.create())); + assertThat(Type.Array.create(Type.String.create())) + .isNotEqualTo(Type.Array.create(Type.Bytes.create())); + // Nested arrays + assertThat(Type.Array.create(Type.Array.create(Type.String.create()))) + .isEqualTo(Type.Array.create(Type.Array.create(Type.String.create()))); + assertThat(Type.Array.create(Type.Array.create(Type.String.create()))) + .isNotEqualTo(Type.Array.create(Type.Array.create(Type.Bytes.create()))); + } + + @Test + public void map_equals() { + assertThat(Type.Map.create(Type.Bytes.create(), Type.String.create())) + .isEqualTo(Type.Map.create(Type.Bytes.create(), Type.String.create())); + assertThat(Type.Map.create(Type.Bytes.create(), Type.String.create())) + .isNotEqualTo(Type.Map.create(Type.String.create(), Type.String.create())); + assertThat(Type.Map.create(Type.Bytes.create(), Type.String.create())) + .isNotEqualTo(Type.Map.create(Type.Bytes.create(), Type.Bytes.create())); + // Nested Maps + assertThat( + Type.Map.create( + Type.Bytes.create(), Type.Map.create(Type.String.create(), Type.Bytes.create()))) + .isEqualTo( + Type.Map.create( + Type.Bytes.create(), Type.Map.create(Type.String.create(), Type.Bytes.create()))); + assertThat( + Type.Map.create( + Type.Bytes.create(), Type.Map.create(Type.String.create(), Type.Bytes.create()))) + .isNotEqualTo( + Type.Map.create( + Type.Bytes.create(), Type.Map.create(Type.String.create(), Type.String.create()))); + } + + @Test + public void structWithSchema_equals() { + com.google.bigtable.v2.Type structProto = + structType(structField("timestamp", timestampType()), structField("value", bytesType())); + com.google.bigtable.v2.Type complexStructProto = + structType( + structField("map", mapType(stringType(), bytesType())), + structField("array", arrayType(stringType()))); + new EqualsTester() + .addEqualityGroup( + StructWithSchema.fromProto(structProto.getStructType()), + StructWithSchema.fromProto(structProto.getStructType())) + .addEqualityGroup( + StructWithSchema.fromProto(complexStructProto.getStructType()), + StructWithSchema.fromProto(complexStructProto.getStructType())) + .testEquals(); + } + + @Test + public void structWithSchema_fields() { + StructWithSchema struct = + StructWithSchema.fromProto( + structType(structField("timestamp", timestampType()), structField("value", bytesType())) + .getStructType()); + assertThat(struct.getFields()).hasSize(2); + assertThat(struct.getFields().get(0).name()).isEqualTo("timestamp"); + assertThat(struct.getFields().get(0).type()).isEqualTo(Type.Timestamp.create()); + assertThat(struct.getType(0)).isEqualTo(Type.Timestamp.create()); + assertThat(struct.getType("timestamp")).isEqualTo(Type.Timestamp.create()); + assertThat(struct.getColumnIndex("timestamp")).isEqualTo(0); + + assertThat(struct.getFields().get(1).name()).isEqualTo("value"); + assertThat(struct.getFields().get(1).type()).isEqualTo(Type.Bytes.create()); + assertThat(struct.getType(1)).isEqualTo(Type.Bytes.create()); + assertThat(struct.getType("value")).isEqualTo(Type.Bytes.create()); + assertThat(struct.getColumnIndex("value")).isEqualTo(1); + } + + @Test + public void structWithSchema_handlesAmbiguousFields() { + StructWithSchema struct = + StructWithSchema.fromProto( + structType(structField("foo", timestampType()), structField("foo", bytesType())) + .getStructType()); + assertThat(struct.getFields()).hasSize(2); + assertThat(struct.getType(0)).isEqualTo(Type.Timestamp.create()); + assertThat(struct.getType(1)).isEqualTo(Type.Bytes.create()); + + assertThrows(IllegalArgumentException.class, () -> struct.getType("foo")); + assertThrows(IllegalArgumentException.class, () -> struct.getColumnIndex("foo")); + } + + @Test + public void structWithSchema_toString() { + StructWithSchema struct = + StructWithSchema.fromProto( + structType(structField("test", stringType()), structField("test2", int64Type())) + .getStructType()); + assertThat(struct.toString()) + .isEqualTo("STRUCT{fields=[Field{name=test, type=STRING}, Field{name=test2, type=INT64}]}"); + } + + @Test + public void schemalessStruct_throwsExceptionOnSchemaAccess() { + SchemalessStruct struct = Type.SchemalessStruct.create(); + + assertThrows(UnsupportedOperationException.class, () -> struct.getType("foo")); + assertThrows(UnsupportedOperationException.class, () -> struct.getType(0)); + assertThrows(UnsupportedOperationException.class, () -> struct.getColumnIndex("foo")); + assertThrows(UnsupportedOperationException.class, struct::getFields); + } + + @Test + public void array_toString() { + Type array = Type.Array.create(Type.String.create()); + + assertThat(array.toString()).isEqualTo("ARRAY{elementType=STRING}"); + } + + @Test + public void simpleMap_toString() { + Type map = Type.Map.create(Type.Bytes.create(), Type.String.create()); + + assertThat(map.toString()).isEqualTo("MAP{keyType=BYTES, valueType=STRING}"); + } + + @Test + public void historicalMap_toString() { + SqlType.Map> historicalMap = SqlType.historicalMap(); + + assertThat(historicalMap.toString()) + .isEqualTo("MAP{keyType=BYTES, valueType=ARRAY{elementType=STRUCT}}"); + } +} 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..42746bbecc 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 @@ -173,8 +173,7 @@ public void testNewClientsShareTransportChannel() throws Exception { // Create 3 lightweight clients try (BigtableDataClientFactory factory = BigtableDataClientFactory.create( - defaultSettings - .toBuilder() + defaultSettings.toBuilder() .setMetricsProvider(NoopMetricsProvider.INSTANCE) .build()); BigtableDataClient ignored1 = factory.createForInstance("project1", "instance1"); @@ -183,7 +182,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(); } @@ -271,7 +272,9 @@ 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(); 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..eaf5a40abb 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 @@ -21,9 +21,12 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.gax.batching.Batcher; +import com.google.api.gax.rpc.ClientContext; 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 +45,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; @@ -73,6 +79,7 @@ public class BigtableDataClientTests { @Rule public MockitoRule mockitoRule = MockitoJUnit.rule().strictness(Strictness.WARN); @Mock private EnhancedBigtableStub mockStub; + @Mock private ClientContext mockContext; @Mock(answer = Answers.RETURNS_DEEP_STUBS) private ServerStreamingCallable mockReadRowsCallable; @@ -89,6 +96,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 @@ -1059,4 +1067,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/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/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/internal/AbstractProtoStructReaderTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/AbstractProtoStructReaderTest.java new file mode 100644 index 0000000000..9bb7f6d787 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/AbstractProtoStructReaderTest.java @@ -0,0 +1,717 @@ +/* + * 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 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.boolType; +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; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float64Type; +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.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.nullValue; +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; +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.timestampType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.timestampValue; +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; + +import com.google.auto.value.AutoValue; +import com.google.bigtable.v2.ColumnMetadata; +import com.google.bigtable.v2.Type; +import com.google.bigtable.v2.Type.KindCase; +import com.google.bigtable.v2.Value; +import com.google.cloud.Date; +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.protobuf.ByteString; +import java.time.Instant; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.BiFunction; +import java.util.stream.Collectors; +import org.junit.Test; +import org.junit.experimental.runners.Enclosed; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; + +@SuppressWarnings("DoubleBraceInitialization") +@RunWith(Enclosed.class) +public class AbstractProtoStructReaderTest { + + // Timestamp can be in micros up to max long + private static final long MAX_TS_SECONDS = Long.MAX_VALUE / 1000 / 1000; + + @AutoValue + public abstract static class TestProtoStruct extends AbstractProtoStructReader { + public static TestProtoStruct create(ResultSetMetadata metadata, List values) { + return new AutoValue_AbstractProtoStructReaderTest_TestProtoStruct(values, metadata); + } + + abstract ResultSetMetadata metadata(); + + @Override + public int getColumnIndex(String columnName) { + return metadata().getColumnIndex(columnName); + } + + @Override + public SqlType getColumnType(int columnIndex) { + return metadata().getColumnType(columnIndex); + } + } + + // New tests should always be added to types test + // Specific tests we don't want to re-run for each type go here + @RunWith(JUnit4.class) + public static class OneOffTests { + @Test + public void simpleMapField_validatesType() { + TestProtoStruct structWithMap = + TestProtoStruct.create( + ProtoResultSetMetadata.fromProto( + metadata(columnMetadata("testField", mapType(bytesType(), stringType())))), + Collections.singletonList( + mapValue( + mapElement(bytesValue("foo"), stringValue("bar")), + mapElement(bytesValue("key"), stringValue("val"))))); + HashMap expectedMap = new HashMap<>(); + expectedMap.put(ByteString.copyFromUtf8("foo"), "bar"); + expectedMap.put(ByteString.copyFromUtf8("key"), "val"); + + assertThat( + structWithMap.getMap("testField", SqlType.mapOf(SqlType.bytes(), SqlType.string()))) + .isEqualTo(expectedMap); + assertThat(structWithMap.getMap(0, SqlType.mapOf(SqlType.bytes(), SqlType.string()))) + .isEqualTo(expectedMap); + + assertThrows( + IllegalStateException.class, + () -> structWithMap.getMap("testField", SqlType.mapOf(SqlType.bytes(), SqlType.bytes()))); + assertThrows( + IllegalStateException.class, + () -> structWithMap.getMap("testField", SqlType.mapOf(SqlType.bytes(), SqlType.bytes()))); + assertThrows( + IllegalStateException.class, + () -> structWithMap.getMap(0, SqlType.mapOf(SqlType.bytes(), SqlType.bytes()))); + assertThrows( + IllegalStateException.class, + () -> structWithMap.getMap(0, SqlType.mapOf(SqlType.bytes(), SqlType.bytes()))); + } + + @Test + public void nestedMapField_validatesType() { + TestProtoStruct historicalMap = + TestProtoStruct.create( + ProtoResultSetMetadata.fromProto( + metadata( + columnMetadata( + "testField", + mapType( + bytesType(), + arrayType( + structType( + structField("timestamp", timestampType()), + structField("value", bytesType()))))))), + Collections.singletonList( + mapValue( + mapElement( + bytesValue("qual"), + arrayValue( + structValue(timestampValue(10000, 100), bytesValue("test1")), + structValue(timestampValue(20000, 100), bytesValue("test2"))))))); + + HashMap> expectedMap = new HashMap<>(); + expectedMap.put( + ByteString.copyFromUtf8("qual"), + Arrays.asList( + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto( + structType( + structField("timestamp", timestampType()), + structField("value", bytesType()))), + arrayValue(timestampValue(10000, 100), bytesValue("test1")).getArrayValue()), + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto( + structType( + structField("timestamp", timestampType()), + structField("value", bytesType()))), + arrayValue(timestampValue(20000, 100), bytesValue("test2")).getArrayValue()))); + + assertThat(historicalMap.getMap("testField", SqlType.historicalMap())).isEqualTo(expectedMap); + assertThat(historicalMap.getMap(0, SqlType.historicalMap())).isEqualTo(expectedMap); + + assertThrows( + IllegalStateException.class, + () -> historicalMap.getMap("testField", SqlType.mapOf(SqlType.bytes(), SqlType.bytes()))); + assertThrows( + IllegalStateException.class, + () -> + historicalMap.getMap( + "testField", SqlType.mapOf(SqlType.bytes(), SqlType.arrayOf(SqlType.string())))); + assertThrows( + IllegalStateException.class, + () -> historicalMap.getMap(0, SqlType.mapOf(SqlType.bytes(), SqlType.bytes()))); + assertThrows( + IllegalStateException.class, + () -> + historicalMap.getMap( + 0, SqlType.mapOf(SqlType.bytes(), SqlType.arrayOf(SqlType.string())))); + } + + @Test + public void arrayField_validatesType() { + TestProtoStruct structWithList = + TestProtoStruct.create( + ProtoResultSetMetadata.fromProto( + metadata(columnMetadata("testField", arrayType(stringType())))), + Collections.singletonList(arrayValue(stringValue("foo"), stringValue("bar")))); + List expectedList = Arrays.asList("foo", "bar"); + + assertThat(structWithList.getList("testField", SqlType.arrayOf(SqlType.string()))) + .isEqualTo(expectedList); + assertThat(structWithList.getList(0, SqlType.arrayOf(SqlType.string()))) + .isEqualTo(expectedList); + + assertThrows( + IllegalStateException.class, + () -> structWithList.getList("testField", SqlType.arrayOf(SqlType.bytes()))); + assertThrows( + IllegalStateException.class, + () -> structWithList.getList(0, SqlType.arrayOf(SqlType.bytes()))); + } + + // Test this independently since it won't throw an exception until accessing an element if + // float is converted to double incorrectly + @Test + public void arrayField_accessingFloat() { + TestProtoStruct structWithList = + TestProtoStruct.create( + ProtoResultSetMetadata.fromProto( + metadata(columnMetadata("testField", arrayType(float32Type())))), + Collections.singletonList(arrayValue(floatValue(1.1f), floatValue(1.2f)))); + + List floatList = + structWithList.getList("testField", SqlType.arrayOf(SqlType.float32())); + assertThat(floatList.get(0)).isEqualTo(1.1f); + assertThat(floatList.get(1)).isEqualTo(1.2f); + } + } + + @RunWith(Parameterized.class) + public static class TypesTest { + @Parameterized.Parameters() + public static List parameters() { + return Arrays.asList( + new Object[][] { + // Bytes + { + Collections.singletonList(columnMetadata("testField", bytesType())), + Collections.singletonList(bytesValue("test")), + 0, + "testField", + (BiFunction) TestProtoStruct::getBytes, + (BiFunction) TestProtoStruct::getBytes, + ByteString.copyFromUtf8("test") + }, + // String + { + Collections.singletonList(columnMetadata("testField", stringType())), + Collections.singletonList(stringValue("test")), + 0, + "testField", + (BiFunction) TestProtoStruct::getString, + (BiFunction) TestProtoStruct::getString, + "test" + }, + // Long + { + Collections.singletonList(columnMetadata("testField", int64Type())), + Collections.singletonList(int64Value(110L)), + 0, + "testField", + (BiFunction) TestProtoStruct::getLong, + (BiFunction) TestProtoStruct::getLong, + 110L + }, + // Double + { + Collections.singletonList(columnMetadata("testField", float64Type())), + Collections.singletonList(floatValue(100.3d)), + 0, + "testField", + (BiFunction) TestProtoStruct::getDouble, + (BiFunction) TestProtoStruct::getDouble, + 100.3d + }, + // Float + { + Collections.singletonList(columnMetadata("testField", float32Type())), + Collections.singletonList(floatValue(100.3f)), + 0, + "testField", + (BiFunction) TestProtoStruct::getFloat, + (BiFunction) TestProtoStruct::getFloat, + 100.3f + }, + // Boolean + { + Collections.singletonList(columnMetadata("testField", boolType())), + Collections.singletonList(boolValue(true)), + 0, + "testField", + (BiFunction) TestProtoStruct::getBoolean, + (BiFunction) TestProtoStruct::getBoolean, + true + }, + // Timestamp + { + Collections.singletonList(columnMetadata("testField", timestampType())), + Collections.singletonList(timestampValue(1000000, 100)), + 0, + "testField", + (BiFunction) TestProtoStruct::getTimestamp, + (BiFunction) TestProtoStruct::getTimestamp, + Instant.ofEpochSecond(1000000, 100) + }, + // MAX long timestamp - bigtable allows users to set timestamp micros to any long + // so the client should parse them. In practice the server doesn't currently, + // support timestamps this large. + { + Collections.singletonList(columnMetadata("testField", timestampType())), + Collections.singletonList(timestampValue(MAX_TS_SECONDS, 0)), + 0, + "testField", + (BiFunction) TestProtoStruct::getTimestamp, + (BiFunction) TestProtoStruct::getTimestamp, + Instant.ofEpochSecond(MAX_TS_SECONDS) + }, + // Date + { + Collections.singletonList(columnMetadata("testField", dateType())), + Collections.singletonList(dateValue(2024, 6, 1)), + 0, + "testField", + (BiFunction) TestProtoStruct::getDate, + (BiFunction) TestProtoStruct::getDate, + Date.fromYearMonthDay(2024, 6, 1) + }, + // Struct + { + Collections.singletonList( + columnMetadata( + "testField", + structType( + structField("stringField", stringType()), + structField("intField", int64Type()), + structField("listField", arrayType(stringType()))))), + Collections.singletonList( + arrayValue( + stringValue("test"), + int64Value(100), + arrayValue(stringValue("nested"), stringValue("nested2")))), + 0, + "testField", + (BiFunction) TestProtoStruct::getStruct, + (BiFunction) TestProtoStruct::getStruct, + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto( + structType( + structField("stringField", stringType()), + structField("intField", int64Type()), + structField("listField", arrayType(stringType())))), + arrayValue( + stringValue("test"), + int64Value(100), + arrayValue(stringValue("nested"), stringValue("nested2"))) + .getArrayValue()) + }, + // Simple List + { + Collections.singletonList(columnMetadata("testField", arrayType(stringType()))), + Collections.singletonList( + arrayValue(stringValue("foo"), stringValue("bar"), stringValue("baz"))), + 0, + "testField", + (BiFunction>) + (row, field) -> row.getList(field, SqlType.arrayOf(SqlType.string())), + (BiFunction>) + (row, index) -> row.getList(index, SqlType.arrayOf(SqlType.string())), + Arrays.asList("foo", "bar", "baz") + }, + // List With Null Values + { + Collections.singletonList(columnMetadata("testField", arrayType(stringType()))), + Collections.singletonList( + arrayValue(stringValue("foo"), nullValue(), stringValue("baz"))), + 0, + "testField", + (BiFunction>) + (row, field) -> row.getList(field, SqlType.arrayOf(SqlType.string())), + (BiFunction>) + (row, index) -> row.getList(index, SqlType.arrayOf(SqlType.string())), + Arrays.asList("foo", null, "baz") + }, + // Float List + { + Collections.singletonList(columnMetadata("testField", arrayType(float32Type()))), + Collections.singletonList( + arrayValue(floatValue(1.1f), floatValue(1.2f), floatValue(1.3f))), + 0, + "testField", + (BiFunction>) + (row, field) -> row.getList(field, SqlType.arrayOf(SqlType.float32())), + (BiFunction>) + (row, index) -> row.getList(index, SqlType.arrayOf(SqlType.float32())), + Arrays.asList(1.1f, 1.2f, 1.3f) + }, + // Double List + { + Collections.singletonList(columnMetadata("testField", arrayType(float64Type()))), + Collections.singletonList( + arrayValue(floatValue(1.11d), floatValue(1.22d), floatValue(1.33d))), + 0, + "testField", + (BiFunction>) + (row, field) -> row.getList(field, SqlType.arrayOf(SqlType.float64())), + (BiFunction>) + (row, index) -> row.getList(index, SqlType.arrayOf(SqlType.float64())), + Arrays.asList(1.11d, 1.22d, 1.33d) + }, + // Simple Map + { + Collections.singletonList( + columnMetadata("testField", mapType(bytesType(), stringType()))), + Collections.singletonList( + mapValue( + mapElement(bytesValue("foo"), stringValue("bar")), + mapElement(bytesValue("key"), stringValue("val")))), + 0, + "testField", + (BiFunction>) + (row, field) -> + row.getMap(field, SqlType.mapOf(SqlType.bytes(), SqlType.string())), + (BiFunction>) + (row, index) -> + row.getMap(index, SqlType.mapOf(SqlType.bytes(), SqlType.string())), + new HashMap() { + { + put(ByteString.copyFromUtf8("foo"), "bar"); + put(ByteString.copyFromUtf8("key"), "val"); + } + } + }, + // Map With Null Keys and Values + { + Collections.singletonList( + columnMetadata("testField", mapType(bytesType(), stringType()))), + Collections.singletonList( + mapValue( + mapElement(bytesValue("foo"), nullValue()), + mapElement(nullValue(), stringValue("val")))), + 0, + "testField", + (BiFunction>) + (row, field) -> + row.getMap(field, SqlType.mapOf(SqlType.bytes(), SqlType.string())), + (BiFunction>) + (row, index) -> + row.getMap(index, SqlType.mapOf(SqlType.bytes(), SqlType.string())), + new HashMap() { + { + put(ByteString.copyFromUtf8("foo"), null); + put(null, "val"); + } + } + }, + // Map With List Values + { + Collections.singletonList( + columnMetadata("testField", mapType(bytesType(), arrayType(stringType())))), + Collections.singletonList( + mapValue( + mapElement( + bytesValue("key1"), arrayValue(stringValue("1.1"), stringValue("1.2"))), + mapElement(bytesValue("key2"), arrayValue(stringValue("2.1"))))), + 0, + "testField", + (BiFunction>>) + (row, field) -> + row.getMap( + field, SqlType.mapOf(SqlType.bytes(), SqlType.arrayOf(SqlType.string()))), + (BiFunction>>) + (row, index) -> + row.getMap( + index, SqlType.mapOf(SqlType.bytes(), SqlType.arrayOf(SqlType.string()))), + new HashMap>() { + { + put(ByteString.copyFromUtf8("key1"), Arrays.asList("1.1", "1.2")); + put(ByteString.copyFromUtf8("key2"), Collections.singletonList("2.1")); + } + } + }, + { + Collections.singletonList( + columnMetadata( + "historicalField", + mapType( + bytesType(), + arrayType( + structType( + structField("timestamp", timestampType()), + structField("value", bytesType())))))), + Collections.singletonList( + mapValue( + mapElement( + bytesValue("qual"), + arrayValue( + structValue(timestampValue(10000, 100), bytesValue("test1")), + structValue(timestampValue(20000, 100), bytesValue("test2")))))), + 0, + "historicalField", + (BiFunction>>) + (row, field) -> row.getMap(field, SqlType.historicalMap()), + (BiFunction>>) + (row, index) -> row.getMap(index, SqlType.historicalMap()), + new HashMap>() { + { + put( + ByteString.copyFromUtf8("qual"), + Arrays.asList( + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto( + structType( + structField("timestamp", timestampType()), + structField("value", bytesType()))), + arrayValue(timestampValue(10000, 100), bytesValue("test1")) + .getArrayValue()), + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto( + structType( + structField("timestamp", timestampType()), + structField("value", bytesType()))), + arrayValue(timestampValue(20000, 100), bytesValue("test2")) + .getArrayValue()))); + } + }, + } + }); + } + + @Parameter(value = 0) + public List schema; + + @Parameter(value = 1) + public List values; + + @Parameter(value = 2) + public Integer index; + + @Parameter(value = 3) + public String columnName; + + @Parameter(value = 4) + public BiFunction getByColumn; + + @Parameter(value = 5) + public BiFunction getByIndex; + + @Parameter(value = 6) + public Object expectedJavaValue; + + private TestProtoStruct getTestRow() { + return TestProtoStruct.create( + ProtoResultSetMetadata.fromProto(metadata(schema.toArray(new ColumnMetadata[] {}))), + values); + } + + @Test + public void getByColumnName_convertsValues() { + assertThat(getByColumn.apply(getTestRow(), columnName)).isEqualTo(expectedJavaValue); + } + + @Test + public void getByIndex_convertsValues() { + assertThat(getByIndex.apply(getTestRow(), index)).isEqualTo(expectedJavaValue); + } + + @Test + public void getByColumnName_throwsExceptionOnNonExistentColumn() { + assertThrows( + IllegalArgumentException.class, () -> getByColumn.apply(getTestRow(), "invalid")); + } + + @Test + public void getByColumnIndex_throwsExceptionOnNonExistentColumn() { + // Assume none of the tests have 10k columns + assertThrows(IndexOutOfBoundsException.class, () -> getByIndex.apply(getTestRow(), 10000)); + } + + @Test + public void getByColumnIndex_throwsNullPointerOnNullValue() { + TestProtoStruct row = + TestProtoStruct.create( + getTestRow().metadata(), + schema.stream() + .map((ColumnMetadata t) -> SqlProtoFactory.nullValue()) + .collect(Collectors.toList())); + + assertThrows(NullPointerException.class, () -> getByIndex.apply(row, index)); + } + + @Test + public void getByColumnName_throwsNullPointerOnNullValue() { + TestProtoStruct row = + TestProtoStruct.create( + getTestRow().metadata(), + schema.stream() + .map((ColumnMetadata t) -> SqlProtoFactory.nullValue()) + .collect(Collectors.toList())); + + assertThrows(NullPointerException.class, () -> getByColumn.apply(row, columnName)); + } + + @Test + public void getByColumnIndex_throwsExceptionOnWrongType() { + // Replace the given column with a column of a different type + Type updatedType = stringType(); + Value updatedValue = stringValue("test"); + if (schema.get(index).getType().getKindCase().equals(KindCase.STRING_TYPE)) { + updatedType = int64Type(); + updatedValue = int64Value(1000); + } + List updatedSchema = new ArrayList<>(schema); + updatedSchema.set(index, columnMetadata(columnName, updatedType)); + List updatedValues = new ArrayList<>(values); + updatedValues.set(index, updatedValue); + TestProtoStruct row = + TestProtoStruct.create( + ProtoResultSetMetadata.fromProto( + metadata(updatedSchema.toArray(new ColumnMetadata[] {}))), + updatedValues); + + assertThrows(IllegalStateException.class, () -> getByIndex.apply(row, index)); + } + + @Test + public void getByColumnName_throwsExceptionOnWrongType() { + // Replace the given column with a column of a different type + Type updatedType = stringType(); + Value updatedValue = stringValue("test"); + if (schema.get(index).getType().getKindCase().equals(KindCase.STRING_TYPE)) { + updatedType = int64Type(); + updatedValue = int64Value(1000); + } + List updatedSchema = new ArrayList<>(schema); + updatedSchema.set(index, columnMetadata(columnName, updatedType)); + List updatedValues = new ArrayList<>(values); + updatedValues.set(index, updatedValue); + TestProtoStruct row = + TestProtoStruct.create( + ProtoResultSetMetadata.fromProto( + metadata(updatedSchema.toArray(new ColumnMetadata[] {}))), + updatedValues); + + assertThrows(IllegalStateException.class, () -> getByColumn.apply(row, columnName)); + } + + @Test + public void isNull_worksForNullValues() { + TestProtoStruct row = + TestProtoStruct.create( + getTestRow().metadata(), + schema.stream() + .map((ColumnMetadata t) -> SqlProtoFactory.nullValue()) + .collect(Collectors.toList())); + + assertTrue(row.isNull(columnName)); + assertTrue(row.isNull(index)); + } + + @Test + public void isNull_worksForNonNullValues() { + assertFalse(getTestRow().isNull(columnName)); + assertFalse(getTestRow().isNull(index)); + } + + @Test + public void getColumnTypeByName() { + assertThat(SqlType.fromProto(schema.get(index).getType())) + .isEqualTo(getTestRow().getColumnType(columnName)); + } + + // consider moving it to non-parameterized test + @Test + public void getByColumnName_throwsExceptionForDuplicateColumnName() { + // Add all fields to the schema twice + List duplicatedSchema = new ArrayList<>(schema); + duplicatedSchema.addAll(schema); + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto( + metadata(duplicatedSchema.toArray(new ColumnMetadata[] {}))); + List duplicatedValues = new ArrayList<>(values); + duplicatedValues.addAll(values); + TestProtoStruct row = TestProtoStruct.create(metadata, duplicatedValues); + + assertThrows(IllegalArgumentException.class, () -> getByColumn.apply(row, columnName)); + } + + @Test + public void getByIndex_worksWithDuplicateColumnName() { + // Add all fields to the schema twice + List duplicatedSchema = new ArrayList<>(schema); + duplicatedSchema.addAll(schema); + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto( + 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)); + } + } +} 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..06f52598bc --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/PreparedStatementImplTest.java @@ -0,0 +1,418 @@ +/* + * 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()))) + // Refreshing channel doesn't work with FixedTransportChannelProvider + .setRefreshingChannel(false) + .build(); + // Remove log noise from client side metrics + settings.setMetricsProvider(NoopMetricsProvider.INSTANCE); + 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/ProtoResultSetMetadataTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/ProtoResultSetMetadataTest.java new file mode 100644 index 0000000000..067b3bb4ac --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/ProtoResultSetMetadataTest.java @@ -0,0 +1,210 @@ +/* + * 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 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.bigtable.v2.ProtoSchema; +import com.google.bigtable.v2.Type; +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 java.util.Arrays; +import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ProtoResultSetMetadataTest { + + @Test + public void getColumnIndex_returnsCorrectIndex() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.create( + Arrays.asList( + ColumnMetadataImpl.create("0", SqlType.string()), + ColumnMetadataImpl.create("1", SqlType.int64()), + ColumnMetadataImpl.create("2", SqlType.int64()), + ColumnMetadataImpl.create("3", SqlType.int64()), + ColumnMetadataImpl.create("4", SqlType.int64()))); + + assertThat(metadata.getColumnIndex("0")).isEqualTo(0); + assertThat(metadata.getColumnIndex("1")).isEqualTo(1); + assertThat(metadata.getColumnIndex("2")).isEqualTo(2); + assertThat(metadata.getColumnIndex("3")).isEqualTo(3); + assertThat(metadata.getColumnIndex("4")).isEqualTo(4); + } + + @Test + public void getColumnType_worksByName() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.create( + Arrays.asList( + ColumnMetadataImpl.create("col0", SqlType.string()), + ColumnMetadataImpl.create("col1", SqlType.int64()), + ColumnMetadataImpl.create("col2", SqlType.timestamp()), + ColumnMetadataImpl.create("col3", SqlType.date()), + ColumnMetadataImpl.create("col4", SqlType.int64()))); + + assertThat(metadata.getColumnType("col0")).isEqualTo(SqlType.string()); + assertThat(metadata.getColumnType("col1")).isEqualTo(SqlType.int64()); + assertThat(metadata.getColumnType("col2")).isEqualTo(SqlType.timestamp()); + assertThat(metadata.getColumnType("col3")).isEqualTo(SqlType.date()); + assertThat(metadata.getColumnType("col4")).isEqualTo(SqlType.int64()); + } + + @Test + public void getColumnType_worksByIndex() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.create( + Arrays.asList( + ColumnMetadataImpl.create("col0", SqlType.string()), + ColumnMetadataImpl.create("col1", SqlType.int64()), + ColumnMetadataImpl.create("col2", SqlType.timestamp()), + ColumnMetadataImpl.create("col3", SqlType.date()), + ColumnMetadataImpl.create("col4", SqlType.int64()))); + + assertThat(metadata.getColumnType(0)).isEqualTo(SqlType.string()); + assertThat(metadata.getColumnType(1)).isEqualTo(SqlType.int64()); + assertThat(metadata.getColumnType(2)).isEqualTo(SqlType.timestamp()); + assertThat(metadata.getColumnType(3)).isEqualTo(SqlType.date()); + assertThat(metadata.getColumnType(4)).isEqualTo(SqlType.int64()); + } + + @Test + public void getColumns_returnsColumnsUnchanged() { + List columns = + Arrays.asList( + ColumnMetadataImpl.create("col0", SqlType.string()), + ColumnMetadataImpl.create("col1", SqlType.int64()), + ColumnMetadataImpl.create("col2", SqlType.timestamp()), + ColumnMetadataImpl.create("col3", SqlType.date()), + ColumnMetadataImpl.create("col4", SqlType.int64())); + ResultSetMetadata metadata = ProtoResultSetMetadata.create(columns); + + assertThat(metadata.getColumns()).isEqualTo(columns); + } + + @Test + public void getColumnTypeByNonExistentName_throwsException() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.create( + Arrays.asList( + ColumnMetadataImpl.create("a", SqlType.string()), + ColumnMetadataImpl.create("b", SqlType.int64()))); + + assertThrows(IllegalArgumentException.class, () -> metadata.getColumnType("c")); + } + + @Test + public void getColumnTypeByNonExistentIndex_throwsException() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.create( + Arrays.asList( + ColumnMetadataImpl.create("a", SqlType.string()), + ColumnMetadataImpl.create("b", SqlType.int64()))); + + assertThrows(IndexOutOfBoundsException.class, () -> metadata.getColumnType(2)); + } + + @Test + public void getColumnIndexForNonExistentName_throwsException() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.create( + Arrays.asList( + ColumnMetadataImpl.create("a", SqlType.string()), + ColumnMetadataImpl.create("b", SqlType.int64()))); + + assertThrows(IllegalArgumentException.class, () -> metadata.getColumnIndex("c")); + } + + @Test + public void getColumnType_throwsExceptionForDuplicateName() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.create( + Arrays.asList( + ColumnMetadataImpl.create("test", SqlType.string()), + ColumnMetadataImpl.create("test", SqlType.int64()))); + + assertThrows(IllegalArgumentException.class, () -> metadata.getColumnType("test")); + } + + @Test + public void getColumnType_allowsGetByIndexWithDuplicateType() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.create( + Arrays.asList( + ColumnMetadataImpl.create("test", SqlType.string()), + ColumnMetadataImpl.create("test", SqlType.int64()))); + + assertThat(metadata.getColumnType(0)).isEqualTo(SqlType.string()); + assertThat(metadata.getColumnType(1)).isEqualTo(SqlType.int64()); + } + + @Test + public void getColumnIndex_throwsExceptionForDuplicateName() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.create( + Arrays.asList( + ColumnMetadataImpl.create("test", SqlType.string()), + ColumnMetadataImpl.create("test", SqlType.int64()))); + + assertThrows(IllegalArgumentException.class, () -> metadata.getColumnIndex("test")); + } + + @Test + public void fromProto_throwsExceptionWithEmptySchema() { + com.google.bigtable.v2.ResultSetMetadata invalidProto = + com.google.bigtable.v2.ResultSetMetadata.newBuilder().build(); + assertThrows(IllegalStateException.class, () -> ProtoResultSetMetadata.fromProto(invalidProto)); + } + + @Test + public void fromProto_withEmptyTypeInSchema_throwsException() { + com.google.bigtable.v2.ResultSetMetadata invalidProto = + com.google.bigtable.v2.ResultSetMetadata.newBuilder() + .setProtoSchema( + ProtoSchema.newBuilder() + .addColumns( + com.google.bigtable.v2.ColumnMetadata.newBuilder() + .setName("test") + .setType(Type.newBuilder().build()))) + .build(); + assertThrows(IllegalStateException.class, () -> ProtoResultSetMetadata.fromProto(invalidProto)); + } + + @Test + public void fromProto_allowsColumnWithNoName() { + com.google.bigtable.v2.ResultSetMetadata proto = + com.google.bigtable.v2.ResultSetMetadata.newBuilder() + .setProtoSchema( + ProtoSchema.newBuilder() + .addColumns( + com.google.bigtable.v2.ColumnMetadata.newBuilder() + .setType(stringType()) + .build())) + .build(); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(proto); + assertThat(metadata.getColumns().size()).isEqualTo(1); + assertThat(metadata.getColumns().get(0).type()).isEqualTo(SqlType.string()); + assertThat(metadata.getColumns().get(0).name()).isEqualTo(""); + assertThat(metadata.getColumnIndex("")).isEqualTo(0); + assertThat(metadata.getColumnType("")).isEqualTo(SqlType.string()); + } +} 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 new file mode 100644 index 0000000000..332825d16a --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/ProtoStructTest.java @@ -0,0 +1,299 @@ +/* + * 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 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.boolType; +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.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; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float64Type; +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.mapElement; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.mapType; +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; +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.timestampType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.timestampValue; +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; + +import com.google.bigtable.v2.ArrayValue; +import com.google.bigtable.v2.Type; +import com.google.bigtable.v2.Type.Struct; +import com.google.bigtable.v2.Value; +import com.google.cloud.Date; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +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; + +@SuppressWarnings("DoubleBraceInitialization") +@RunWith(JUnit4.class) +public class ProtoStructTest { + + static ProtoStruct struct = + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto( + structType( + structField("bytesField", bytesType()), + structField("stringField", stringType()), + structField("longField", int64Type()), + structField("doubleField", float64Type()), + structField("floatField", float32Type()), + structField("booleanField", boolType()), + structField("timestampField", timestampType()), + structField("dateField", dateType()), + structField( + "structField", structType(structField("stringField", stringType()))), + structField("listField", arrayType(stringType())), + structField("mapField", mapType(stringType(), stringType())))), + arrayValue( + bytesValue("testBytes"), + stringValue("testString"), + int64Value(123), + floatValue(1.23), + floatValue(1.23), + boolValue(true), + timestampValue(100000, 100), + dateValue(2024, 6, 1), + structValue(stringValue("string")), + arrayValue(stringValue("foo"), stringValue("bar")), + arrayValue( + mapElement(stringValue("foo"), stringValue("bar")), + mapElement(stringValue("key"), stringValue("val")))) + .getArrayValue()); + + // These are more extensively tested in AbstractProtoStructReaderTest since that is what + // implements the logic + @Test + public void getByIndex_supportsAllTypes() { + assertThat(struct.getBytes(0)).isEqualTo(ByteString.copyFromUtf8("testBytes")); + assertThat(struct.getString(1)).isEqualTo("testString"); + assertThat(struct.getLong(2)).isEqualTo(123); + assertThat(struct.getDouble(3)).isEqualTo(1.23d); + assertThat(struct.getFloat(4)).isEqualTo(1.23f); + assertThat(struct.getBoolean(5)).isTrue(); + assertThat(struct.getTimestamp(6)).isEqualTo(Instant.ofEpochSecond(100000, 100)); + assertThat(struct.getDate(7)).isEqualTo(Date.fromYearMonthDay(2024, 6, 1)); + assertThat(struct.getStruct(8)) + .isEqualTo( + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto(structType(structField("stringField", stringType()))), + structValue(stringValue("string")).getArrayValue())); + assertThat(struct.getList(9, SqlType.arrayOf(SqlType.string()))) + .isEqualTo(Arrays.asList("foo", "bar")); + assertThat(struct.getMap(10, SqlType.mapOf(SqlType.string(), SqlType.string()))) + .isEqualTo( + new HashMap() { + { + put("foo", "bar"); + put("key", "val"); + } + }); + } + + @Test + public void getByNameSupportsAllTypes() { + assertThat(struct.getBytes("bytesField")).isEqualTo(ByteString.copyFromUtf8("testBytes")); + assertThat(struct.getString("stringField")).isEqualTo("testString"); + assertThat(struct.getLong("longField")).isEqualTo(123); + assertThat(struct.getDouble("doubleField")).isEqualTo(1.23d); + assertThat(struct.getFloat("floatField")).isEqualTo(1.23f); + assertThat(struct.getBoolean("booleanField")).isTrue(); + assertThat(struct.getTimestamp("timestampField")).isEqualTo(Instant.ofEpochSecond(100000, 100)); + assertThat(struct.getDate("dateField")).isEqualTo(Date.fromYearMonthDay(2024, 6, 1)); + assertThat(struct.getStruct("structField")) + .isEqualTo( + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto(structType(structField("stringField", stringType()))), + structValue(stringValue("string")).getArrayValue())); + assertThat(struct.getList("listField", SqlType.arrayOf(SqlType.string()))) + .isEqualTo(Arrays.asList("foo", "bar")); + assertThat(struct.getMap("mapField", SqlType.mapOf(SqlType.string(), SqlType.string()))) + .isEqualTo( + new HashMap() { + { + put("foo", "bar"); + put("key", "val"); + } + }); + } + + @Test + public void getColumnType_byName() { + assertThat(struct.getColumnType("bytesField")).isEqualTo(SqlType.bytes()); + assertThat(struct.getColumnType("stringField")).isEqualTo(SqlType.string()); + assertThat(struct.getColumnType("longField")).isEqualTo(SqlType.int64()); + assertThat(struct.getColumnType("doubleField")).isEqualTo(SqlType.float64()); + assertThat(struct.getColumnType("floatField")).isEqualTo(SqlType.float32()); + assertThat(struct.getColumnType("booleanField")).isEqualTo(SqlType.bool()); + assertThat(struct.getColumnType("timestampField")).isEqualTo(SqlType.timestamp()); + assertThat(struct.getColumnType("dateField")).isEqualTo(SqlType.date()); + assertThat(struct.getColumnType("structField")) + .isEqualTo(SqlType.fromProto(structType(structField("stringField", stringType())))); + assertThat(struct.getColumnType("listField")).isEqualTo(SqlType.arrayOf(SqlType.string())); + assertThat(struct.getColumnType("mapField")) + .isEqualTo(SqlType.mapOf(SqlType.string(), SqlType.string())); + } + + @Test + public void getColumnType_byIndex() { + assertThat(struct.getColumnType(0)).isEqualTo(SqlType.bytes()); + assertThat(struct.getColumnType(1)).isEqualTo(SqlType.string()); + assertThat(struct.getColumnType(2)).isEqualTo(SqlType.int64()); + assertThat(struct.getColumnType(3)).isEqualTo(SqlType.float64()); + assertThat(struct.getColumnType(4)).isEqualTo(SqlType.float32()); + assertThat(struct.getColumnType(5)).isEqualTo(SqlType.bool()); + assertThat(struct.getColumnType(6)).isEqualTo(SqlType.timestamp()); + assertThat(struct.getColumnType(7)).isEqualTo(SqlType.date()); + assertThat(struct.getColumnType(8)) + .isEqualTo(SqlType.fromProto(structType(structField("stringField", stringType())))); + assertThat(struct.getColumnType(9)).isEqualTo(SqlType.arrayOf(SqlType.string())); + assertThat(struct.getColumnType(10)) + .isEqualTo(SqlType.mapOf(SqlType.string(), SqlType.string())); + } + + @Test + public void getColumnIndex_worksForExistingColumns() { + assertThat(struct.getColumnIndex("bytesField")).isEqualTo(0); + assertThat(struct.getColumnIndex("stringField")).isEqualTo(1); + assertThat(struct.getColumnIndex("longField")).isEqualTo(2); + assertThat(struct.getColumnIndex("doubleField")).isEqualTo(3); + assertThat(struct.getColumnIndex("floatField")).isEqualTo(4); + assertThat(struct.getColumnIndex("booleanField")).isEqualTo(5); + assertThat(struct.getColumnIndex("timestampField")).isEqualTo(6); + assertThat(struct.getColumnIndex("dateField")).isEqualTo(7); + assertThat(struct.getColumnIndex("structField")).isEqualTo(8); + assertThat(struct.getColumnIndex("listField")).isEqualTo(9); + assertThat(struct.getColumnIndex("mapField")).isEqualTo(10); + } + + @Test + public void getColumnIndex_throwsExceptionForNonExistentIndex() { + assertThrows(IllegalArgumentException.class, () -> struct.getColumnIndex("nonexistent")); + } + + @Test + public void values_populatedFromFieldValues() { + List values = Arrays.asList(stringValue("foo"), stringValue("bar")); + ProtoStruct s = + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto( + structType( + structField("stringField1", stringType()), + structField("stringField2", stringType()))), + arrayValue(values.toArray(new Value[] {})).getArrayValue()); + + assertThat(s.values()).isEqualTo(values); + } + + @Test + public void getByColumnIndex_supportsUnnamedColumn() { + ProtoStruct s = + ProtoStruct.create( + // This creates a struct with two unnamed string fields + (SqlType.Struct) SqlType.fromProto(structType(stringType(), stringType())), + arrayValue(stringValue("foo"), stringValue("bar")).getArrayValue()); + + assertThat(s.getString(0)).isEqualTo("foo"); + assertThat(s.getString(1)).isEqualTo("bar"); + } + + @Test + public void getByColumnName_supportsUnnamedColumn() { + ProtoStruct s = + ProtoStruct.create( + // This creates a struct with one unnamed string fields + (SqlType.Struct) SqlType.fromProto(structType(stringType())), + arrayValue(stringValue("foo")).getArrayValue()); + + assertThat(s.getString("")).isEqualTo("foo"); + } + + @Test + public void emptyStruct_behavesCorrectly() { + ProtoStruct empty = + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto( + Type.newBuilder().setStructType(Struct.newBuilder().build()).build()), + ArrayValue.newBuilder().build()); + + assertThrows(IndexOutOfBoundsException.class, () -> empty.getString(0)); + assertThrows(IllegalArgumentException.class, () -> empty.getString("")); + assertThrows(IndexOutOfBoundsException.class, () -> empty.getColumnType(0)); + assertThrows(IllegalArgumentException.class, () -> empty.getColumnType("")); + } + + @Test + public void getColumnIndexOnDuplicateField_throwsException() { + List values = Arrays.asList(stringValue("foo"), stringValue("bar")); + ProtoStruct s = + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto( + structType(structField("dup", stringType()), structField("dup", stringType()))), + arrayValue(values.toArray(new Value[] {})).getArrayValue()); + + assertThrows(IllegalArgumentException.class, () -> s.getColumnIndex("dup")); + } + + @Test + public void getByFieldNameOnDuplicateField_throwsException() { + List values = Arrays.asList(stringValue("foo"), stringValue("bar")); + ProtoStruct s = + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto( + structType(structField("dup", stringType()), structField("dup", stringType()))), + arrayValue(values.toArray(new Value[] {})).getArrayValue()); + + assertThrows(IllegalArgumentException.class, () -> s.getString("dup")); + } + + @Test + public void getByIndex_worksWithDuplicateFieldNames() { + List values = Arrays.asList(stringValue("foo"), stringValue("bar")); + ProtoStruct s = + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto( + structType(structField("dup", stringType()), structField("dup", stringType()))), + arrayValue(values.toArray(new Value[] {})).getArrayValue()); + + assertThat(s.getString(0)).isEqualTo("foo"); + assertThat(s.getString(1)).isEqualTo("bar"); + } +} 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 new file mode 100644 index 0000000000..b25595b96e --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/ResultSetImplTest.java @@ -0,0 +1,353 @@ +/* + * 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 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.boolType; +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.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; +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.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; +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.timestampType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.timestampValue; +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.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.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; +import java.util.concurrent.CancellationException; +import java.util.concurrent.ExecutionException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ResultSetImplTest { + + 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); + 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 { + 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()))); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(protoMetadata); + ResultSet resultSet = + resultSetWithFakeStream( + protoMetadata, + ProtoSqlRow.create( + metadata, + Arrays.asList( + stringValue("test"), + bytesValue("bytes"), + int64Value(100), + floatValue(1.23), + floatValue(1.23), + boolValue(true), + timestampValue(10000000, 100), + dateValue(2024, 6, 5), + structValue(stringValue("foo")), + arrayValue(stringValue("foo"), stringValue("bar")), + mapValue(mapElement(stringValue("key"), stringValue("val")))))); + int rows = 0; + while (resultSet.next()) { + rows++; + assertThat(resultSet.getString(0)).isEqualTo("test"); + assertThat(resultSet.getString("string")).isEqualTo("test"); + assertThat(resultSet.getBytes(1)).isEqualTo(ByteString.copyFromUtf8("bytes")); + assertThat(resultSet.getBytes("bytes")).isEqualTo(ByteString.copyFromUtf8("bytes")); + assertThat(resultSet.getLong(2)).isEqualTo(100); + assertThat(resultSet.getLong("long")).isEqualTo(100); + assertThat(resultSet.getDouble(3)).isEqualTo(1.23d); + assertThat(resultSet.getDouble("double")).isEqualTo(1.23d); + assertThat(resultSet.getFloat(4)).isEqualTo(1.23f); + assertThat(resultSet.getFloat("float")).isEqualTo(1.23f); + assertThat(resultSet.getBoolean(5)).isTrue(); + assertThat(resultSet.getBoolean("boolean")).isTrue(); + assertThat(resultSet.getTimestamp(6)).isEqualTo(Instant.ofEpochSecond(10000000, 100)); + assertThat(resultSet.getTimestamp("timestamp")) + .isEqualTo(Instant.ofEpochSecond(10000000, 100)); + assertThat(resultSet.getDate(7)).isEqualTo(Date.fromYearMonthDay(2024, 6, 5)); + assertThat(resultSet.getDate("date")).isEqualTo(Date.fromYearMonthDay(2024, 6, 5)); + assertThat(resultSet.getStruct(8)) + .isEqualTo( + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto(structType(structField("string", stringType()))), + structValue(stringValue("foo")).getArrayValue())); + assertThat(resultSet.getStruct("struct")) + .isEqualTo( + ProtoStruct.create( + (SqlType.Struct) + SqlType.fromProto(structType(structField("string", stringType()))), + structValue(stringValue("foo")).getArrayValue())); + assertThat(resultSet.getList(9, SqlType.arrayOf(SqlType.string()))) + .isEqualTo(Arrays.asList("foo", "bar")); + assertThat(resultSet.getList("list", SqlType.arrayOf(SqlType.string()))) + .isEqualTo(Arrays.asList("foo", "bar")); + assertThat(resultSet.getMap(10, SqlType.mapOf(SqlType.string(), SqlType.string()))) + .isEqualTo( + new HashMap() { + { + put("key", "val"); + } + }); + assertThat(resultSet.getMap("map", SqlType.mapOf(SqlType.string(), SqlType.string()))) + .isEqualTo( + new HashMap() { + { + put("key", "val"); + } + }); + } + assertThat(rows).isEqualTo(1); + assertThat(resultSet.next()).isFalse(); + assertThat(resultSet.getMetadata()).isEqualTo(metadata); + resultSet.close(); + } + + @Test + public void testIteration() { + com.google.bigtable.v2.ResultSetMetadata protoMetadata = + metadata(columnMetadata("string", stringType())); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(protoMetadata); + try (ResultSet resultSet = + resultSetWithFakeStream( + protoMetadata, + ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("foo"))), + ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("bar"))), + ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("baz"))), + ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("a"))), + ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("b"))))) { + + assertThat(resultSet.next()).isTrue(); + assertThat(resultSet.getString(0)).isEqualTo("foo"); + assertThat(resultSet.next()).isTrue(); + // skip a row + assertThat(resultSet.next()).isTrue(); + assertThat(resultSet.getString(0)).isEqualTo("baz"); + assertThat(resultSet.next()).isTrue(); + assertThat(resultSet.getString(0)).isEqualTo("a"); + assertThat(resultSet.next()).isTrue(); + assertThat(resultSet.getString(0)).isEqualTo("b"); + assertThat(resultSet.next()).isFalse(); + } + } + + @Test + 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); + } + } + + @Test + public void getCallsPrevented_afterNextReturnsFalse() { + com.google.bigtable.v2.ResultSetMetadata protoMetadata = + metadata(columnMetadata("string", stringType())); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(protoMetadata); + + ResultSet resultSet = + resultSetWithFakeStream( + protoMetadata, + ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("foo"))), + ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("bar")))); + + assertThat(resultSet.next()).isTrue(); + assertThat(resultSet.getString(0)).isEqualTo("foo"); + assertThat(resultSet.next()).isTrue(); + assertThat(resultSet.getString(0)).isEqualTo("bar"); + assertThat(resultSet.next()).isFalse(); + // Users can still call next + assertThat(resultSet.next()).isFalse(); + // Attempts to access data will throw an exception + assertThrows(IllegalStateException.class, () -> resultSet.getString(0)); + resultSet.close(); + } + + @Test + public void close_preventsGetCalls() { + com.google.bigtable.v2.ResultSetMetadata protoMetadata = + metadata(columnMetadata("string", stringType())); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(protoMetadata); + ResultSet resultSet = + resultSetWithFakeStream( + protoMetadata, + ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("foo")))); + + assertThat(resultSet.next()).isTrue(); + resultSet.close(); + assertThrows(IllegalStateException.class, () -> resultSet.getString(0)); + } + + @Test + public void close_cancelsStreamWhenResultsNotConsumed() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("string", stringType()))); + ServerStreamingStashCallable stream = + new ServerStreamingStashCallable<>( + Collections.singletonList( + ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("foo"))))); + SqlServerStream sqlServerStream = + SqlServerStreamImpl.create( + SettableApiFuture.create(), stream.call(ExecuteQueryRequest.newBuilder().build())); + ResultSet resultSet = ResultSetImpl.create(sqlServerStream); + resultSet.close(); + + Throwable lastCallError = stream.popLastCall().getError(); + assertThat(lastCallError).isInstanceOf(CancellationException.class); + } + + @Test + public void close_doesNotCancelStreamWhenResultsConsumed() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("string", stringType()))); + ServerStreamingStashCallable stream = + new ServerStreamingStashCallable<>( + Collections.singletonList( + ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("foo"))))); + SqlServerStream sqlServerStream = + SqlServerStreamImpl.create( + SettableApiFuture.create(), stream.call(ExecuteQueryRequest.newBuilder().build())); + ResultSet resultSet = ResultSetImpl.create(sqlServerStream); + + assertThat(resultSet.next()).isTrue(); + assertThat(resultSet.next()).isFalse(); + resultSet.close(); + Throwable lastCallError = stream.popLastCall().getError(); + assertThat(lastCallError).isNull(); + } + + @Test + public void getBeforeNext_throwsException() { + com.google.bigtable.v2.ResultSetMetadata protoMetadata = + metadata(columnMetadata("string", stringType())); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(protoMetadata); + try (ResultSet resultSet = + resultSetWithFakeStream( + protoMetadata, + ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("foo"))))) { + assertThrows(IllegalStateException.class, () -> resultSet.getString(0)); + } + } + + @Test + public void getOnColumnWithDuplicateName_throwsException() { + com.google.bigtable.v2.ResultSetMetadata protoMetadata = + metadata(columnMetadata("string", stringType())); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(protoMetadata); + try (ResultSet resultSet = + resultSetWithFakeStream( + protoMetadata, + ProtoSqlRow.create(metadata, Arrays.asList(stringValue("foo"), stringValue("bar"))))) { + + assertThat(resultSet.next()).isTrue(); + assertThrows(IllegalArgumentException.class, () -> resultSet.getString("name")); + } + } + + @Test + public void getMetadata_unwrapsExecutionExceptions() { + SettableApiFuture metadataFuture = SettableApiFuture.create(); + ServerStreamingStashCallable stream = + new ServerStreamingStashCallable<>(Collections.emptyList()); + PreparedStatement preparedStatement = + SqlProtoFactory.preparedStatement(metadata(columnMetadata("foo", stringType()))); + ExecuteQueryCallContext fakeCallContext = + callContext(preparedStatement.bind().build(), metadataFuture); + ResultSet rs = + ResultSetImpl.create( + SqlServerStreamImpl.create(metadataFuture, stream.call(fakeCallContext))); + + metadataFuture.setException(new IllegalStateException("test")); + assertThrows(IllegalStateException.class, rs::getMetadata); + } + + @Test + public void getMetadata_returnsNonRuntimeExecutionExceptionsWrapped() { + SettableApiFuture metadataFuture = SettableApiFuture.create(); + ServerStreamingStashCallable stream = + new ServerStreamingStashCallable<>(Collections.emptyList()); + PreparedStatement preparedStatement = + SqlProtoFactory.preparedStatement(metadata(columnMetadata("foo", stringType()))); + ExecuteQueryCallContext fakeCallContext = + callContext(preparedStatement.bind().build(), metadataFuture); + ResultSet rs = + ResultSetImpl.create( + SqlServerStreamImpl.create(metadataFuture, stream.call(fakeCallContext))); + + metadataFuture.setException(new Throwable("test")); + assertThrows(RuntimeException.class, rs::getMetadata); + } +} 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 new file mode 100644 index 0000000000..3de9821147 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/SqlRowMergerUtilTest.java @@ -0,0 +1,212 @@ +/* + * 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 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.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.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.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; + +import com.google.bigtable.v2.ColumnMetadata; +import com.google.bigtable.v2.ExecuteQueryResponse; +import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; +import com.google.common.collect.ImmutableList; +import java.util.ArrayList; +import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class SqlRowMergerUtilTest { + + @Test + public void close_succeedsWhenEmpty() { + com.google.bigtable.v2.ResultSetMetadata md = metadata(columnMetadata("a", stringType())); + try (SqlRowMergerUtil util = new SqlRowMergerUtil(md)) {} + + try (SqlRowMergerUtil util = new SqlRowMergerUtil(md)) { + // Metadata with no rows + List unused = util.parseExecuteQueryResponses(ImmutableList.of()); + } + } + + @Test + public void parseExecuteQueryResponses_handlesSingleValue_serializedProtoRows() { + com.google.bigtable.v2.ResultSetMetadata metadata = + metadata(columnMetadata("str", stringType())); + ImmutableList responses = + 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()))), + ImmutableList.of(stringValue("val")))); + ; + } + } + + @Test + public void + parseExecuteQueryResponses_handlesMultipleValuesAcrossMultipleRows_serializedProtoRows() { + ColumnMetadata[] columns = { + columnMetadata("str", stringType()), + columnMetadata("bytes", bytesType()), + columnMetadata("strArr", arrayType(stringType())), + columnMetadata("map", mapType(stringType(), bytesType())) + }; + com.google.bigtable.v2.ResultSetMetadata metadataProto = metadata(columns); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(metadataProto); + ImmutableList responses = + 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( + ProtoSqlRow.create( + metadata, + ImmutableList.of( + stringValue("str1"), + bytesValue("bytes1"), + arrayValue(stringValue("arr1")), + mapValue(mapElement(stringValue("key1"), bytesValue("val1"))))), + ProtoSqlRow.create( + metadata, + ImmutableList.of( + stringValue("str2"), + bytesValue("bytes2"), + arrayValue(stringValue("arr2")), + mapValue(mapElement(stringValue("key2"), bytesValue("val2"))))), + ProtoSqlRow.create( + metadata, + ImmutableList.of( + stringValue("str3"), + bytesValue("bytes3"), + arrayValue(stringValue("arr3")), + mapValue(mapElement(stringValue("key3"), bytesValue("val3")))))); + } + } + + @Test + public void parseExecuteQueryResponses_throwsOnCloseWithPartialBatch_serializedProtoRows() { + com.google.bigtable.v2.ResultSetMetadata metadata = + metadata(columnMetadata("str", stringType())); + ImmutableList responses = + ImmutableList.of(partialResultSetWithoutToken(stringValue("str1"))); + + SqlRowMergerUtil util = new SqlRowMergerUtil(metadata); + List unused = util.parseExecuteQueryResponses(responses); + assertThrows(IllegalStateException.class, util::close); + } + + @Test + public void + parseExecuteQueryResponses_throwsOnParseWithPartialRowsInCompleteBatch_serializedProtoRows() { + com.google.bigtable.v2.ResultSetMetadata metadata = + metadata(columnMetadata("str", stringType()), columnMetadata("bytes", bytesType())); + ImmutableList responses = + ImmutableList.of( + partialResultSetWithToken( + stringValue("str1"), bytesValue("bytes1"), stringValue("str2"))); + + SqlRowMergerUtil util = new SqlRowMergerUtil(metadata); + assertThrows(IllegalStateException.class, () -> util.parseExecuteQueryResponses(responses)); + } + + @Test + public void parseExecuteQueryResponses_worksWithIncrementalSetsOfResponses_serializedProtoRows() { + ColumnMetadata[] columns = { + columnMetadata("str", stringType()), + columnMetadata("bytes", bytesType()), + columnMetadata("strArr", arrayType(stringType())), + columnMetadata("map", mapType(stringType(), bytesType())) + }; + com.google.bigtable.v2.ResultSetMetadata metadataProto = metadata(columns); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(metadataProto); + ImmutableList responses = + 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))); + + assertThat(rows) + .containsExactly( + ProtoSqlRow.create( + metadata, + ImmutableList.of( + stringValue("str1"), + bytesValue("bytes1"), + arrayValue(stringValue("arr1")), + mapValue(mapElement(stringValue("key1"), bytesValue("val1"))))), + ProtoSqlRow.create( + metadata, + ImmutableList.of( + stringValue("str2"), + bytesValue("bytes2"), + arrayValue(stringValue("arr2")), + mapValue(mapElement(stringValue("key2"), bytesValue("val2"))))), + ProtoSqlRow.create( + metadata, + ImmutableList.of( + stringValue("str3"), + bytesValue("bytes3"), + arrayValue(stringValue("arr3")), + mapValue(mapElement(stringValue("key3"), bytesValue("val3")))))); + } + } +} 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 new file mode 100644 index 0000000000..4e64c75cac --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/SqlRowSubject.java @@ -0,0 +1,41 @@ +/* + * 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 static com.google.common.truth.Truth.assertAbout; + +import com.google.common.truth.FailureMetadata; +import com.google.common.truth.Subject; +import javax.annotation.Nullable; + +/** 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() { + return SqlRowSubject::new; + } + + public static SqlRowSubject assertThat(@Nullable SqlRow actual) { + return assertAbout(sqlRow()).that(actual); + } +} 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/it/BuiltinMetricsIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BuiltinMetricsIT.java index 4f8ff4e4c9..20555520f6 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,10 +24,7 @@ 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; @@ -36,9 +33,8 @@ 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.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 +59,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 +71,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 +92,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 +111,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 +135,7 @@ public void setup() throws IOException { SdkMeterProviderBuilder meterProvider = SdkMeterProvider.builder().registerMetricReader(metricReader); - BuiltinMetricsView.registerBuiltinMetrics(testEnvRule.env().getProjectId(), meterProvider); + CustomOpenTelemetryMetricsProvider.setupSdkMeterProvider(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(); } @@ -220,10 +206,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 +221,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); @@ -288,13 +274,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 +292,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 +331,7 @@ private ListTimeSeriesResponse verifyMetricsArePublished( private void verifyMetricsWithMetricsReader( ListTimeSeriesResponse response, MetricData dataFromReader) { + for (TimeSeries ts : response.getTimeSeriesList()) { Map attributesMap = ImmutableMap.builder() @@ -390,7 +371,8 @@ private void verifyMetricsWithMetricsReader( if (point.size() > 0) { 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..3753a37dd9 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 @@ -153,8 +153,7 @@ public void testManyMutations() throws IOException, InterruptedException { BatchingSettings batchingSettings = settings.getStubSettings().bulkMutateRowsSettings().getBatchingSettings(); - settings - .toBuilder() + settings.toBuilder() .stubSettings() .bulkMutateRowsSettings() .setBatchingSettings( @@ -202,8 +201,7 @@ public void testManyMutationsOnAuthorizedView() throws IOException, InterruptedE BatchingSettings batchingSettings = settings.getStubSettings().bulkMutateRowsSettings().getBatchingSettings(); - settings - .toBuilder() + settings.toBuilder() .stubSettings() .bulkMutateRowsSettings() .setBatchingSettings( 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..5c0d38ce51 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 @@ -19,9 +19,7 @@ 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.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; @@ -103,8 +101,7 @@ public void setup() throws IOException { (InstantiatingGrpcChannelProvider) defaultSettings.getStubSettings().getTransportChannelProvider(); InstantiatingGrpcChannelProvider instrumentedTransportChannelProvider = - defaultTransportProvider - .toBuilder() + defaultTransportProvider.toBuilder() .setAttemptDirectPath(true) .setPoolSize(1) .setChannelConfigurator( @@ -127,9 +124,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()); } @@ -195,7 +190,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() { 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 new file mode 100644 index 0000000000..fc4aba5768 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ExecuteQueryIT.java @@ -0,0 +1,383 @@ +/* + * 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.it; + +import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.TruthJUnit.assume; +import static org.junit.Assert.assertThrows; + +import com.google.cloud.Date; +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.Struct; +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.TestEnvRule; +import com.google.protobuf.ByteString; +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 org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ExecuteQueryIT { + + @ClassRule public static TestEnvRule testEnvRule = new TestEnvRule(); + private static BigtableDataClient dataClient; + private static String tableId; + private static String cf; + private static String uniquePrefix; + + @BeforeClass + public static void setUpAll() throws IOException { + assume() + .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(); + dataClient = testEnvRule.env().getDataClient(); + cf = testEnvRule.env().getFamilyId(); + uniquePrefix = UUID.randomUUID() + "-execute-query-it-"; + + dataClient.mutateRow( + RowMutation.create(TableId.of(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") + .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") + .setCell(cf, ByteString.copyFromUtf8("qual"), 10000, ByteString.copyFromUtf8("bval")) + .setCell( + cf, ByteString.copyFromUtf8("qual2"), 10000, ByteString.copyFromUtf8("bval2"))); + } + + @Test + public void selectStar() { + 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( + rs.getMap(cf, SqlType.mapOf(SqlType.bytes(), SqlType.bytes())) + .get(ByteString.copyFromUtf8("qual"))) + .isEqualTo(ByteString.copyFromUtf8("val")); + + assertThat(rs.next()).isTrue(); + assertThat(rs.getBytes("_key")).isEqualTo(ByteString.copyFromUtf8(uniquePrefix + "b")); + assertThat( + rs.getMap(cf, SqlType.mapOf(SqlType.bytes(), SqlType.bytes())) + .get(ByteString.copyFromUtf8("qual"))) + .isEqualTo(ByteString.copyFromUtf8("bval")); + + assertThat(rs.next()).isFalse(); + } + } + + @Test + public void withHistoryQuery() { + 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()); + List rowAQual = rowACf.get(ByteString.copyFromUtf8("qual")); + assertThat(rowAQual.size()).isEqualTo(2); + Struct rowAQual_0 = rowAQual.get(0); + assertThat(rowAQual_0.getBytes("value")).isEqualTo(ByteString.copyFromUtf8("val")); + // timestamp in micros above so we divide by 1000 + assertThat(rowAQual_0.getTimestamp("timestamp")).isEqualTo(Instant.ofEpochMilli(10)); + Struct rowAQual_1 = rowAQual.get(1); + assertThat(rowAQual_1.getBytes("value")).isEqualTo(ByteString.copyFromUtf8("old")); + assertThat(rowAQual_1.getTimestamp("timestamp")).isEqualTo(Instant.ofEpochMilli(1)); + + assertThat(rs.next()).isTrue(); + assertThat(rs.getBytes("_key")).isEqualTo(ByteString.copyFromUtf8(uniquePrefix + "b")); + Map> rowBCf = rs.getMap(cf, SqlType.historicalMap()); + List rowBQual = rowBCf.get(ByteString.copyFromUtf8("qual")); + assertThat(rowBQual.size()).isEqualTo(1); + Struct rowBQual_0 = rowBQual.get(0); + assertThat(rowBQual_0.getBytes("value")).isEqualTo(ByteString.copyFromUtf8("bval")); + + assertThat(rs.next()).isFalse(); + } + } + + @SuppressWarnings("DoubleBraceInitialization") + @Test + public void allTypes() { + PreparedStatement 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 `" + + tableId + + "` WHERE _key='" + + uniquePrefix + + "a' LIMIT 1", + new HashMap<>()); + 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"); + assertThat(rs.getBytes("bytesCol")).isEqualTo(ByteString.copyFromUtf8("foo")); + assertThat(rs.getBytes(1)).isEqualTo(ByteString.copyFromUtf8("foo")); + assertThat(rs.getLong("intCol")).isEqualTo(1L); + assertThat(rs.getLong(2)).isEqualTo(1L); + assertThat(rs.getFloat("f32Col")).isEqualTo(1.2f); + assertThat(rs.getFloat(3)).isEqualTo(1.2f); + assertThat(rs.getDouble("f64Col")).isEqualTo(1.3d); + assertThat(rs.getDouble(4)).isEqualTo(1.3d); + assertThat(rs.getBoolean("boolCol")).isTrue(); + assertThat(rs.getBoolean(5)).isTrue(); + assertThat(rs.getTimestamp("tsCol")).isEqualTo(Instant.ofEpochMilli(1000)); + assertThat(rs.getTimestamp(6)).isEqualTo(Instant.ofEpochMilli(1000)); + assertThat(rs.getDate("dateCol")).isEqualTo(Date.fromYearMonthDay(2024, 6, 1)); + assertThat(rs.getDate(7)).isEqualTo(Date.fromYearMonthDay(2024, 6, 1)); + assertThat(rs.getStruct("structCol").getLong("a")).isEqualTo(1); + assertThat(rs.getStruct("structCol").getString("b")).isEqualTo("foo"); + assertThat(rs.getStruct(8).getLong("a")).isEqualTo(1); + assertThat(rs.getStruct(8).getString("b")).isEqualTo("foo"); + assertThat(rs.getList("arrCol", SqlType.arrayOf(SqlType.int64()))) + .isEqualTo(Arrays.asList(1L, 2L, 3L)); + assertThat(rs.getList(9, SqlType.arrayOf(SqlType.int64()))) + .isEqualTo(Arrays.asList(1L, 2L, 3L)); + assertThat(rs.getMap("mapCol", SqlType.mapOf(SqlType.bytes(), SqlType.bytes()))) + .isEqualTo( + new HashMap() { + { + put(ByteString.copyFromUtf8("qual"), ByteString.copyFromUtf8("val")); + put(ByteString.copyFromUtf8("qual2"), ByteString.copyFromUtf8("val2")); + put(ByteString.copyFromUtf8("qual3"), ByteString.copyFromUtf8("val3")); + } + }); + assertThat(rs.getMap(10, SqlType.mapOf(SqlType.bytes(), SqlType.bytes()))) + .isEqualTo( + new HashMap() { + { + put(ByteString.copyFromUtf8("qual"), ByteString.copyFromUtf8("val")); + put(ByteString.copyFromUtf8("qual2"), ByteString.copyFromUtf8("val2")); + put(ByteString.copyFromUtf8("qual3"), ByteString.copyFromUtf8("val3")); + } + }); + + assertThat(rs.next()).isFalse(); + } + } + + @Test + public void allQueryParamsTypes() { + 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"); + assertThat(rs.getBytes("bytesCol")).isEqualTo(ByteString.copyFromUtf8("foo")); + assertThat(rs.getBytes(1)).isEqualTo(ByteString.copyFromUtf8("foo")); + assertThat(rs.getLong("intCol")).isEqualTo(1L); + assertThat(rs.getLong(2)).isEqualTo(1L); + assertThat(rs.getDouble("doubleCol")).isEqualTo(1.3d); + assertThat(rs.getDouble(3)).isEqualTo(1.3d); + assertThat(rs.getFloat("floatCol")).isEqualTo(1.4f); + assertThat(rs.getFloat(4)).isEqualTo(1.4f); + assertThat(rs.getBoolean("boolCol")).isTrue(); + assertThat(rs.getBoolean(5)).isTrue(); + assertThat(rs.getTimestamp("tsCol")).isEqualTo(Instant.ofEpochMilli(1000)); + assertThat(rs.getTimestamp(6)).isEqualTo(Instant.ofEpochMilli(1000)); + assertThat(rs.getDate("dateCol")).isEqualTo(Date.fromYearMonthDay(2024, 6, 1)); + assertThat(rs.getDate(7)).isEqualTo(Date.fromYearMonthDay(2024, 6, 1)); + assertThat(rs.getList("byteArrayCol", SqlType.arrayOf(SqlType.bytes()))) + .isEqualTo( + Arrays.asList(ByteString.copyFromUtf8("foo"), null, ByteString.copyFromUtf8("bar"))); + assertThat(rs.getList(8, SqlType.arrayOf(SqlType.bytes()))) + .isEqualTo( + Arrays.asList(ByteString.copyFromUtf8("foo"), null, ByteString.copyFromUtf8("bar"))); + assertThat(rs.getList("stringArrayCol", SqlType.arrayOf(SqlType.string()))) + .isEqualTo(Arrays.asList("foo", null, "bar")); + assertThat(rs.getList(9, SqlType.arrayOf(SqlType.string()))) + .isEqualTo(Arrays.asList("foo", null, "bar")); + assertThat(rs.getList("intArrayCol", SqlType.arrayOf(SqlType.int64()))) + .isEqualTo(Arrays.asList(1L, null, 2L)); + assertThat(rs.getList(10, SqlType.arrayOf(SqlType.int64()))) + .isEqualTo(Arrays.asList(1L, null, 2L)); + assertThat(rs.getList("floatArrayCol", SqlType.arrayOf(SqlType.float32()))) + .isEqualTo(Arrays.asList(1.2f, null, 1.3f)); + assertThat(rs.getList(11, SqlType.arrayOf(SqlType.float32()))) + .isEqualTo(Arrays.asList(1.2f, null, 1.3f)); + assertThat(rs.getList("doubleArrayCol", SqlType.arrayOf(SqlType.float64()))) + .isEqualTo(Arrays.asList(1.4d, null, 1.5d)); + assertThat(rs.getList(12, SqlType.arrayOf(SqlType.float64()))) + .isEqualTo(Arrays.asList(1.4d, null, 1.5d)); + assertThat(rs.getList("boolArrayCol", SqlType.arrayOf(SqlType.bool()))) + .isEqualTo(Arrays.asList(true, null, false)); + assertThat(rs.getList(13, SqlType.arrayOf(SqlType.bool()))) + .isEqualTo(Arrays.asList(true, null, false)); + assertThat(rs.getList("tsArrayCol", SqlType.arrayOf(SqlType.timestamp()))) + .isEqualTo( + Arrays.asList( + Instant.ofEpochSecond(1000, 1000), null, Instant.ofEpochSecond(2000, 2000))); + assertThat(rs.getList(14, SqlType.arrayOf(SqlType.timestamp()))) + .isEqualTo( + Arrays.asList( + Instant.ofEpochSecond(1000, 1000), null, Instant.ofEpochSecond(2000, 2000))); + assertThat(rs.getList("dateArrayCol", SqlType.arrayOf(SqlType.date()))) + .isEqualTo( + Arrays.asList( + Date.fromYearMonthDay(2024, 8, 1), null, Date.fromYearMonthDay(2024, 8, 2))); + assertThat(rs.getList(15, SqlType.arrayOf(SqlType.date()))) + .isEqualTo( + Arrays.asList( + Date.fromYearMonthDay(2024, 8, 1), null, Date.fromYearMonthDay(2024, 8, 2))); + } + + @Test + public void testNullColumns() { + 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 + assertThat(rs.isNull("maybeNull")).isFalse(); + assertThat(rs.isNull(1)).isFalse(); + assertThat(rs.getBytes("maybeNull")).isEqualTo(ByteString.copyFromUtf8("val3")); + assertThat(rs.next()).isTrue(); + assertThat(rs.getBytes("neverNull")).isEqualTo(ByteString.copyFromUtf8("bval")); + assertThat(rs.isNull("maybeNull")).isTrue(); + assertThat(rs.isNull(1)).isTrue(); + assertThrows(NullPointerException.class, () -> rs.getBytes("maybeNull")); + assertThrows(NullPointerException.class, () -> rs.getBytes(1)); + assertThat(rs.next()).isFalse(); + } + } +} 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..ff34169893 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 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,172 @@ public void testWriteRead() throws Exception { assertThat(row.getCells().get(0).getValue()).isEqualTo(largeValue); assertThat(row.getCells().get(1).getValue()).isEqualTo(largeValue); } + + 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); + } + } + + @Test + public void read() throws Throwable { + assume() + .withMessage("Large row read errors are not supported by emulator") + .that(testEnvRule.env()) + .isNotInstanceOf(EmulatorEnv.class); + + // TODO: remove this once skip large row for read is released + assume() + .withMessage("Skip large row for read is not released yet") + .that(System.getProperty("bigtable.testSkipLargeRowIntegrationTests")) + .isEqualTo("true"); + + BigtableDataClient client = testEnvRule.env().getDataClient(); + String tableId = 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")))); + + // 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_" + "_" + String.valueOf(i)); + client.mutateRow( + RowMutation.create(TableId.of(tableId), "r2").setCell(familyId, qualifier, largeValue)); + client.mutateRow( + RowMutation.create(TableId.of(tableId), "r3").setCell(familyId, qualifier, largeValue)); + } + + // sync + assertThat( + client + .skipLargeRowsCallable() + .all() + .call( + Query.create(tableId) + .range(ByteStringRange.unbounded().startClosed("r1").endOpen("r3")))) + .containsExactly(expectedRow1); + + assertThat( + client + .skipLargeRowsCallable() + .all() + .call( + Query.create(tableId) + .range(ByteStringRange.unbounded().startClosed("r1").endClosed("r4")))) + .containsExactly(expectedRow1, expectedRow4); + + 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); + // 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); + } } 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..6b71bac5b0 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; @@ -106,7 +107,7 @@ public void testOnAuthorizedView() } 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..1c9245ba39 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 @@ -29,7 +29,6 @@ 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.stub.metrics.CustomOpenTelemetryMetricsProvider; import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; @@ -72,7 +71,7 @@ public void setup() throws IOException { SdkMeterProviderBuilder meterProvider = SdkMeterProvider.builder().registerMetricReader(metricReader); - BuiltinMetricsView.registerBuiltinMetrics(testEnvRule.env().getProjectId(), meterProvider); + CustomOpenTelemetryMetricsProvider.setupSdkMeterProvider(meterProvider); OpenTelemetry openTelemetry = OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build(); @@ -139,8 +138,9 @@ public void testSuccess() throws Exception { public void testFailure() { Query query = Query.create("non-exist-table"); try { - Lists.newArrayList(client.readRows(query)); - } catch (NotFoundException e) { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(client.readRows(query)); + } catch (NotFoundException ignored) { } Collection allMetricData = metricReader.collectAllMetrics(); @@ -167,9 +167,9 @@ public void testFailure() { 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..0196614299 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 @@ -28,7 +28,6 @@ import com.google.cloud.bigtable.data.v2.BigtableDataSettings; 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.stub.metrics.CustomOpenTelemetryMetricsProvider; import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; @@ -71,7 +70,7 @@ public void setup() throws IOException { SdkMeterProviderBuilder meterProvider = SdkMeterProvider.builder().registerMetricReader(metricReader); - BuiltinMetricsView.registerBuiltinMetrics(testEnvRule.env().getProjectId(), meterProvider); + CustomOpenTelemetryMetricsProvider.setupSdkMeterProvider(meterProvider); OpenTelemetry openTelemetry = OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build(); @@ -182,7 +181,7 @@ public void testFailure() throws Exception { 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() @@ -193,7 +192,7 @@ public void testFailure() throws Exception { .map(pd -> pd.getAttributes().get(BuiltinMetricsConstants.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/ChangeStreamMutationTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java index 948c083224..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 { @@ -67,18 +72,26 @@ public void userInitiatedMutationTest() throws IOException, ClassNotFoundExcepti Value.rawValue(ByteString.copyFromUtf8("col1")), Value.rawTimestamp(1000), Value.intValue(1234)) + .mergeToCell( + "agg-family", + Value.rawValue(ByteString.copyFromUtf8("col2")), + 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(); @@ -107,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. @@ -115,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(); @@ -150,8 +166,13 @@ public void toRowMutationTest() { Value.rawValue(ByteString.copyFromUtf8("qual1")), Value.rawTimestamp(1000), Value.intValue(1234)) + .mergeToCell( + "agg-family", + Value.rawValue(ByteString.copyFromUtf8("qual2")), + 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. @@ -161,7 +182,7 @@ public void toRowMutationTest() { NameUtil.formatTableName( REQUEST_CONTEXT.getProjectId(), REQUEST_CONTEXT.getInstanceId(), TABLE_ID); assertThat(mutateRowRequest.getTableName()).isEqualTo(tableName); - assertThat(mutateRowRequest.getMutationsList()).hasSize(4); + assertThat(mutateRowRequest.getMutationsList()).hasSize(5); assertThat(mutateRowRequest.getMutations(0).getSetCell().getValue()) .isEqualTo(ByteString.copyFromUtf8("fake-value")); assertThat(mutateRowRequest.getMutations(1).getDeleteFromFamily().getFamilyName()) @@ -178,6 +199,14 @@ public void toRowMutationTest() { .setTimestamp(Value.rawTimestamp(1000).toProto()) .setInput(Value.intValue(1234).toProto()) .build()); + assertThat(mutateRowRequest.getMutations(4).getMergeToCell()) + .isEqualTo( + Mutation.MergeToCell.newBuilder() + .setFamilyName("agg-family") + .setColumnQualifier(Value.rawValue(ByteString.copyFromUtf8("qual2")).toProto()) + .setTimestamp(Value.rawTimestamp(1000).toProto()) + .setInput(Value.rawValue(ByteString.copyFrom(Longs.toByteArray(1234L))).toProto()) + .build()); } @Test @@ -186,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); } @@ -220,15 +249,20 @@ public void toRowMutationEntryTest() { Value.rawValue(ByteString.copyFromUtf8("qual1")), Value.rawTimestamp(1000), Value.intValue(1234)) + .mergeToCell( + "agg-family", + Value.rawValue(ByteString.copyFromUtf8("qual2")), + 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. RowMutationEntry rowMutationEntry = changeStreamMutation.toRowMutationEntry(); MutateRowsRequest.Entry mutateRowsRequestEntry = rowMutationEntry.toProto(); assertThat(mutateRowsRequestEntry.getRowKey()).isEqualTo(ByteString.copyFromUtf8("key")); - assertThat(mutateRowsRequestEntry.getMutationsList()).hasSize(4); + assertThat(mutateRowsRequestEntry.getMutationsList()).hasSize(5); assertThat(mutateRowsRequestEntry.getMutations(0).getSetCell().getValue()) .isEqualTo(ByteString.copyFromUtf8("fake-value")); assertThat(mutateRowsRequestEntry.getMutations(1).getDeleteFromFamily().getFamilyName()) @@ -245,6 +279,14 @@ public void toRowMutationEntryTest() { .setTimestamp(Value.rawTimestamp(1000).toProto()) .setInput(Value.intValue(1234).toProto()) .build()); + assertThat(mutateRowsRequestEntry.getMutations(4).getMergeToCell()) + .isEqualTo( + Mutation.MergeToCell.newBuilder() + .setFamilyName("agg-family") + .setColumnQualifier(Value.rawValue(ByteString.copyFromUtf8("qual2")).toProto()) + .setTimestamp(Value.rawTimestamp(1000).toProto()) + .setInput(Value.rawValue(ByteString.copyFrom(Longs.toByteArray(1234L))).toProto()) + .build()); } @Test @@ -253,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); } @@ -278,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..9dd66acc73 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,6 +30,7 @@ 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; @@ -37,7 +38,6 @@ 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 { @@ -129,7 +129,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())); 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..b6997ae9dd 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,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.Mutation; @@ -25,6 +26,7 @@ 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; @@ -32,7 +34,6 @@ 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,6 +42,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); + private static final org.threeten.bp.Instant FAKE_LOW_WATERMARK_THREETEN = + toThreetenInstant(FAKE_LOW_WATERMARK); @Rule public ExpectedException expect = ExpectedException.none(); @@ -59,7 +62,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,8 +76,8 @@ 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()); @@ -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,7 +115,7 @@ 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), @@ -133,8 +136,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 +189,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 +228,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 +261,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 +293,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 +330,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 +372,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 +421,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 +441,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/MaterializedViewIdTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/MaterializedViewIdTest.java new file mode 100644 index 0000000000..8978f8ff99 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/MaterializedViewIdTest.java @@ -0,0 +1,68 @@ +/* + * 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")); + assertThat(authorizedViewId).isNotEqualTo(TableId.of(TABLE_ID)); + } + + @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/MutationTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/MutationTest.java index fca65f90f5..3ba1de6701 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/MutationTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/MutationTest.java @@ -21,6 +21,7 @@ import com.google.bigtable.v2.Mutation.DeleteFromColumn; import com.google.bigtable.v2.Mutation.DeleteFromFamily; import com.google.bigtable.v2.Mutation.DeleteFromRow; +import com.google.bigtable.v2.Mutation.MergeToCell; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.common.primitives.Longs; import com.google.protobuf.ByteString; @@ -195,6 +196,21 @@ public void addToCellTest() { assertThat(actual).containsExactly(builder.build()); } + @Test + public void mergeToCellTest() { + mutation.mergeToCell("cf1", "q", 10000, ByteString.copyFrom(Longs.toByteArray(1234L))); + List actual = mutation.getMutations(); + + com.google.bigtable.v2.Mutation.Builder builder = com.google.bigtable.v2.Mutation.newBuilder(); + MergeToCell.Builder mergeToCellBuilder = builder.getMergeToCellBuilder(); + mergeToCellBuilder.setFamilyName("cf1"); + mergeToCellBuilder.getColumnQualifierBuilder().setRawValue(ByteString.copyFromUtf8("q")); + mergeToCellBuilder.getTimestampBuilder().setRawTimestampMicros(10000); + mergeToCellBuilder.getInputBuilder().setRawValue(ByteString.copyFrom(Longs.toByteArray(1234L))); + + assertThat(actual).containsExactly(builder.build()); + } + @Test public void serializationTest() throws IOException, ClassNotFoundException { Mutation expected = Mutation.create().setCell("cf", "q", "val"); @@ -281,7 +297,8 @@ public void fromProtoTest() { ByteString.copyFromUtf8("fake-value")) .deleteCells("fake-family", ByteString.copyFromUtf8("fake-qualifier")) .deleteFamily("fake-family2") - .addToCell("agg-family", "qual1", 1000, 1234); + .addToCell("agg-family", "qual1", 1000, 1234) + .mergeToCell("agg-family", "qual2", 1000, ByteString.copyFrom(Longs.toByteArray(1234L))); List protoMutation = mutation.getMutations(); 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..052cdc34ef 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 @@ -491,8 +491,7 @@ public void testFromProtoWithInvalidTableId() { @Test(expected = IllegalArgumentException.class) public void testFromProtoWithInvalidAuthorizedViewId() { Query.fromProto( - ReadRowsRequest.getDefaultInstance() - .toBuilder() + ReadRowsRequest.getDefaultInstance().toBuilder() .setAuthorizedViewName("invalid-name") .build()); @@ -511,8 +510,7 @@ public void testFromProtoWithEmptyTableAndAuthorizedViewId() { @Test(expected = IllegalArgumentException.class) public void testFromProtoWithBothTableAndAuthorizedViewId() { Query.fromProto( - ReadRowsRequest.getDefaultInstance() - .toBuilder() + ReadRowsRequest.getDefaultInstance().toBuilder() .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .setAuthorizedViewName( NameUtil.formatAuthorizedViewName( 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..13e1bcb915 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 @@ -34,6 +34,7 @@ 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; @@ -41,7 +42,6 @@ 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 { @@ -152,8 +152,7 @@ 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 = expectedProtoBuilder().setHeartbeatDuration(Duration.newBuilder().setSeconds(5).build()); @@ -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); @@ -302,7 +301,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 +311,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 +323,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 +349,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/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/SampleRowKeysRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/SampleRowKeysRequestTest.java index 4aa8a2b809..3b886c0cbf 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 @@ -106,8 +106,7 @@ public void fromProtoTest() { @Test(expected = IllegalArgumentException.class) public void testFromProtoWithInvalidTableId() { SampleRowKeysRequest.fromProto( - com.google.bigtable.v2.SampleRowKeysRequest.getDefaultInstance() - .toBuilder() + com.google.bigtable.v2.SampleRowKeysRequest.getDefaultInstance().toBuilder() .setTableName("invalid-name") .build()); @@ -118,8 +117,7 @@ public void testFromProtoWithInvalidTableId() { @Test(expected = IllegalArgumentException.class) public void testFromProtoWithInvalidAuthorizedViewId() { SampleRowKeysRequest.fromProto( - com.google.bigtable.v2.SampleRowKeysRequest.getDefaultInstance() - .toBuilder() + com.google.bigtable.v2.SampleRowKeysRequest.getDefaultInstance().toBuilder() .setAuthorizedViewName("invalid-name") .build()); @@ -139,8 +137,7 @@ public void testFromProtoWithEmptyTableAndAuthorizedViewId() { @Test(expected = IllegalArgumentException.class) public void testFromProtoWithBothTableAndAuthorizedViewId() { SampleRowKeysRequest.fromProto( - com.google.bigtable.v2.SampleRowKeysRequest.getDefaultInstance() - .toBuilder() + com.google.bigtable.v2.SampleRowKeysRequest.getDefaultInstance().toBuilder() .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .setAuthorizedViewName( NameUtil.formatAuthorizedViewName( diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/sql/BoundStatementTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/sql/BoundStatementTest.java new file mode 100644 index 0000000000..c089138286 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/sql/BoundStatementTest.java @@ -0,0 +1,874 @@ +/* + * 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.sql; + +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.boolType; +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; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float64Type; +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; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.timestampValue; +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; + +@RunWith(JUnit4.class) +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() { + 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(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, ByteString.copyFromUtf8("token"))) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .setResumeToken(ByteString.copyFromUtf8("token")) + .build()); + } + + @Test + public void statementWithBytesParam() { + BoundStatement s = + boundStatementBuilder(columnMetadata("key", bytesType())) + .setBytesParam("key", ByteString.copyFromUtf8("test")) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams( + "key", + Value.newBuilder() + .setType(bytesType()) + .setBytesValue(ByteString.copyFromUtf8("test")) + .build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithNullBytesParam() { + BoundStatement s = + boundStatementBuilder(columnMetadata("key", bytesType())) + .setBytesParam("key", null) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams("key", Value.newBuilder().setType(bytesType()).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithStringParam() { + BoundStatement s = + boundStatementBuilder(columnMetadata("key", stringType())) + .setStringParam("key", "test") + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams( + "key", Value.newBuilder().setType(stringType()).setStringValue("test").build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithNullStringParam() { + BoundStatement s = + boundStatementBuilder(columnMetadata("key", stringType())) + .setStringParam("key", null) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams("key", Value.newBuilder().setType(stringType()).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithInt64Param() { + BoundStatement s = + boundStatementBuilder(columnMetadata("number", int64Type())) + .setLongParam("number", 1L) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams("number", Value.newBuilder().setType(int64Type()).setIntValue(1).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithNullInt64Param() { + BoundStatement s = + boundStatementBuilder(columnMetadata("number", int64Type())) + .setLongParam("number", null) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams("number", Value.newBuilder().setType(int64Type()).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithBoolParam() { + BoundStatement s = + boundStatementBuilder(columnMetadata("bool", boolType())) + .setBooleanParam("bool", true) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams( + "bool", Value.newBuilder().setType(boolType()).setBoolValue(true).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithNullBoolParam() { + BoundStatement s = + boundStatementBuilder(columnMetadata("bool", boolType())) + .setBooleanParam("bool", null) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams("bool", Value.newBuilder().setType(boolType()).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithTimestampParam() { + BoundStatement s = + boundStatementBuilder(columnMetadata("timeParam", timestampType())) + .setTimestampParam("timeParam", Instant.ofEpochSecond(1000, 100)) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams( + "timeParam", + Value.newBuilder() + .setType(timestampType()) + .setTimestampValue(timestampValue(1000, 100).getTimestampValue()) + .build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithNullTimestampParam() { + BoundStatement s = + boundStatementBuilder(columnMetadata("timeParam", timestampType())) + .setTimestampParam("timeParam", null) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams("timeParam", Value.newBuilder().setType(timestampType()).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithDateParam() { + BoundStatement s = + boundStatementBuilder(columnMetadata("dateParam", dateType())) + .setDateParam("dateParam", Date.fromYearMonthDay(2024, 6, 11)) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams( + "dateParam", + Value.newBuilder() + .setType(dateType()) + .setDateValue(dateValue(2024, 6, 11).getDateValue()) + .build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithNullDateParam() { + BoundStatement s = + boundStatementBuilder(columnMetadata("dateParam", dateType())) + .setDateParam("dateParam", null) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams("dateParam", Value.newBuilder().setType(dateType()).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithBytesListParam() { + 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")), + SqlType.arrayOf(SqlType.bytes())) + .setListParam( + "listWithNullElem", + Arrays.asList(ByteString.copyFromUtf8("foo"), null, ByteString.copyFromUtf8("bar")), + SqlType.arrayOf(SqlType.bytes())) + .setListParam("emptyList", Collections.emptyList(), SqlType.arrayOf(SqlType.bytes())) + .setListParam("nullList", null, SqlType.arrayOf(SqlType.bytes())) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams( + "listParam", + Value.newBuilder() + .setType(arrayType(bytesType())) + .setArrayValue( + arrayValue(bytesValue("foo"), bytesValue("bar")).getArrayValue()) + .build()) + .putParams( + "listWithNullElem", + Value.newBuilder() + .setType(arrayType(bytesType())) + .setArrayValue( + arrayValue(bytesValue("foo"), nullValue(), bytesValue("bar")) + .getArrayValue()) + .build()) + .putParams( + "emptyList", + Value.newBuilder() + .setType(arrayType(bytesType())) + .setArrayValue(arrayValue().getArrayValue()) + .build()) + .putParams("nullList", Value.newBuilder().setType(arrayType(bytesType())).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithStringListParam() { + 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( + "listWithNullElem", + Arrays.asList("foo", "bar", null), + SqlType.arrayOf(SqlType.string())) + .setListParam("emptyList", Collections.emptyList(), SqlType.arrayOf(SqlType.string())) + .setListParam("nullList", null, SqlType.arrayOf(SqlType.string())) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams( + "listParam", + Value.newBuilder() + .setType(arrayType(stringType())) + .setArrayValue( + arrayValue(stringValue("foo"), stringValue("bar")).getArrayValue()) + .build()) + .putParams( + "listWithNullElem", + Value.newBuilder() + .setType(arrayType(stringType())) + .setArrayValue( + arrayValue(stringValue("foo"), stringValue("bar"), nullValue()) + .getArrayValue()) + .build()) + .putParams( + "emptyList", + Value.newBuilder() + .setType(arrayType(stringType())) + .setArrayValue(arrayValue().getArrayValue()) + .build()) + .putParams("nullList", Value.newBuilder().setType(arrayType(stringType())).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithInt64ListParam() { + 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())) + .setListParam("emptyList", Collections.emptyList(), SqlType.arrayOf(SqlType.int64())) + .setListParam("nullList", null, SqlType.arrayOf(SqlType.int64())) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams( + "listParam", + Value.newBuilder() + .setType(arrayType(int64Type())) + .setArrayValue(arrayValue(int64Value(1), int64Value(2)).getArrayValue()) + .build()) + .putParams( + "listWithNullElem", + Value.newBuilder() + .setType(arrayType(int64Type())) + .setArrayValue( + arrayValue(nullValue(), int64Value(3), int64Value(4)).getArrayValue()) + .build()) + .putParams( + "emptyList", + Value.newBuilder() + .setType(arrayType(int64Type())) + .setArrayValue(arrayValue().getArrayValue()) + .build()) + .putParams("nullList", Value.newBuilder().setType(arrayType(int64Type())).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithFloat32ListParam() { + 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( + "listWithNullElem", + Arrays.asList(1.3f, 1.4f, null), + SqlType.arrayOf(SqlType.float32())) + .setListParam("emptyList", Collections.emptyList(), SqlType.arrayOf(SqlType.float32())) + .setListParam("nullList", null, SqlType.arrayOf(SqlType.float32())) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams( + "listParam", + Value.newBuilder() + .setType(arrayType(float32Type())) + .setArrayValue( + arrayValue(floatValue(1.1f), floatValue(1.2f)).getArrayValue()) + .build()) + .putParams( + "listWithNullElem", + Value.newBuilder() + .setType(arrayType(float32Type())) + .setArrayValue( + arrayValue(floatValue(1.3f), floatValue(1.4f), nullValue()) + .getArrayValue()) + .build()) + .putParams( + "emptyList", + Value.newBuilder() + .setType(arrayType(float32Type())) + .setArrayValue(arrayValue().getArrayValue()) + .build()) + .putParams("nullList", Value.newBuilder().setType(arrayType(float32Type())).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithFloat64ListParam() { + 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( + "listWithNullElem", + Arrays.asList(1.3d, 1.4d, null), + SqlType.arrayOf(SqlType.float64())) + .setListParam("emptyList", Collections.emptyList(), SqlType.arrayOf(SqlType.float64())) + .setListParam("nullList", null, SqlType.arrayOf(SqlType.float64())) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams( + "listParam", + Value.newBuilder() + .setType(arrayType(float64Type())) + .setArrayValue(arrayValue(floatValue(1.1), floatValue(1.2)).getArrayValue()) + .build()) + .putParams( + "listWithNullElem", + Value.newBuilder() + .setType(arrayType(float64Type())) + .setArrayValue( + arrayValue(floatValue(1.3), floatValue(1.4), nullValue()) + .getArrayValue()) + .build()) + .putParams( + "emptyList", + Value.newBuilder() + .setType(arrayType(float64Type())) + .setArrayValue(arrayValue().getArrayValue()) + .build()) + .putParams("nullList", Value.newBuilder().setType(arrayType(float64Type())).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithBooleanListParam() { + 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", + Arrays.asList(true, false, null), + SqlType.arrayOf(SqlType.bool())) + .setListParam("emptyList", Collections.emptyList(), SqlType.arrayOf(SqlType.bool())) + .setListParam("nullList", null, SqlType.arrayOf(SqlType.bool())) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams( + "listParam", + Value.newBuilder() + .setType(arrayType(boolType())) + .setArrayValue( + arrayValue(boolValue(true), boolValue(false)).getArrayValue()) + .build()) + .putParams( + "listWithNullElem", + Value.newBuilder() + .setType(arrayType(boolType())) + .setArrayValue( + arrayValue(boolValue(true), boolValue(false), nullValue()) + .getArrayValue()) + .build()) + .putParams( + "emptyList", + Value.newBuilder() + .setType(arrayType(boolType())) + .setArrayValue(arrayValue().getArrayValue()) + .build()) + .putParams("nullList", Value.newBuilder().setType(arrayType(boolType())).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithTimestampListParam() { + 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)), + SqlType.arrayOf(SqlType.timestamp())) + .setListParam( + "listWithNullElem", + Arrays.asList( + Instant.ofEpochSecond(1000, 100), Instant.ofEpochSecond(2000, 100), null), + SqlType.arrayOf(SqlType.timestamp())) + .setListParam( + "emptyList", Collections.emptyList(), SqlType.arrayOf(SqlType.timestamp())) + .setListParam("nullList", null, SqlType.arrayOf(SqlType.timestamp())) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams( + "listParam", + Value.newBuilder() + .setType(arrayType(timestampType())) + .setArrayValue( + arrayValue(timestampValue(3000, 100), timestampValue(4000, 100)) + .getArrayValue()) + .build()) + .putParams( + "listWithNullElem", + Value.newBuilder() + .setType(arrayType(timestampType())) + .setArrayValue( + arrayValue( + timestampValue(1000, 100), + timestampValue(2000, 100), + nullValue()) + .getArrayValue()) + .build()) + .putParams( + "emptyList", + Value.newBuilder() + .setType(arrayType(timestampType())) + .setArrayValue(arrayValue().getArrayValue()) + .build()) + .putParams( + "nullList", Value.newBuilder().setType(arrayType(timestampType())).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithDateListParam() { + 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)), + SqlType.arrayOf(SqlType.date())) + .setListParam( + "listWithNullElem", + Arrays.asList( + Date.fromYearMonthDay(2024, 8, 1), Date.fromYearMonthDay(2024, 8, 2), null), + SqlType.arrayOf(SqlType.date())) + .setListParam("emptyList", Collections.emptyList(), SqlType.arrayOf(SqlType.date())) + .setListParam("nullList", null, SqlType.arrayOf(SqlType.date())) + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams( + "listParam", + Value.newBuilder() + .setType(arrayType(dateType())) + .setArrayValue( + arrayValue(dateValue(2024, 6, 1), dateValue(2024, 7, 1)) + .getArrayValue()) + .build()) + .putParams( + "listWithNullElem", + Value.newBuilder() + .setType(arrayType(dateType())) + .setArrayValue( + arrayValue(dateValue(2024, 8, 1), dateValue(2024, 8, 2), nullValue()) + .getArrayValue()) + .build()) + .putParams( + "emptyList", + Value.newBuilder() + .setType(arrayType(dateType())) + .setArrayValue(arrayValue().getArrayValue()) + .build()) + .putParams("nullList", Value.newBuilder().setType(arrayType(dateType())).build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void setListParamRejectsUnsupportedElementTypes() { + BoundStatement.Builder statement = boundStatementBuilder(); + + assertThrows( + IllegalArgumentException.class, + () -> statement.setListParam("param", null, SqlType.arrayOf(SqlType.struct()))); + assertThrows( + IllegalArgumentException.class, + () -> + statement.setListParam( + "param", null, SqlType.arrayOf(SqlType.arrayOf(SqlType.string())))); + assertThrows( + IllegalArgumentException.class, + () -> + statement.setListParam( + "param", null, SqlType.arrayOf(SqlType.mapOf(SqlType.bytes(), SqlType.bytes())))); + } + + @Test + public void statementBuilderAllowsParamsToBeOverridden() { + BoundStatement s = + boundStatementBuilder(columnMetadata("key", stringType())) + .setStringParam("key", "test1") + .setStringParam("key", "test2") + .setStringParam("key", "test3") + .setStringParam("key", "test4") + .build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .putParams( + "key", Value.newBuilder().setType(stringType()).setStringValue("test4").build()) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void builderWorksWithNoParams() { + 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 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"); + IllegalArgumentException eDouble = + 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 new file mode 100644 index 0000000000..8fef0f6c03 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/sql/SqlTypeTest.java @@ -0,0 +1,191 @@ +/* + * 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.sql; + +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.mapType; +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; +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.common.Type.StructWithSchema; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType.Code; +import com.google.protobuf.ByteString; +import java.util.Arrays; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class SqlTypeTest { + + private HashMap> protoToJavaMapping; + + @Before + public void setUp() { + protoToJavaMapping = new HashMap<>(); + protoToJavaMapping.put(bytesType(), SqlType.bytes()); + protoToJavaMapping.put(stringType(), SqlType.string()); + protoToJavaMapping.put(int64Type(), SqlType.int64()); + protoToJavaMapping.put(float32Type(), SqlType.float32()); + protoToJavaMapping.put(float64Type(), SqlType.float64()); + protoToJavaMapping.put(boolType(), SqlType.bool()); + protoToJavaMapping.put(timestampType(), SqlType.timestamp()); + protoToJavaMapping.put(dateType(), SqlType.date()); + protoToJavaMapping.put( + structType(structField("foo", stringType()), structField("bar", int64Type())), + new StructWithSchema( + Arrays.asList( + StructWithSchema.Field.fromProto(structField("foo", stringType())), + StructWithSchema.Field.fromProto(structField("bar", int64Type()))))); + protoToJavaMapping.put(arrayType(stringType()), SqlType.arrayOf(SqlType.string())); + protoToJavaMapping.put( + mapType(bytesType(), stringType()), SqlType.mapOf(SqlType.bytes(), SqlType.string())); + } + + @Test + public void fromProto_supportsAllTypes() { + EnumSet allCodes = EnumSet.allOf(SqlType.Code.class); + for (Map.Entry> entry : protoToJavaMapping.entrySet()) { + SqlType converted = SqlType.fromProto(entry.getKey()); + assertThat(converted).isEqualTo(entry.getValue()); + allCodes.remove(converted.getCode()); + } + assertThat(allCodes).isEmpty(); + } + + @Test + public void typesMatch_supportsAllTypes() { + EnumSet allCodes = EnumSet.allOf(SqlType.Code.class); + + for (Map.Entry> entry : protoToJavaMapping.entrySet()) { + SqlType type = entry.getValue(); + SqlType copyOfType = SqlType.fromProto(entry.getKey()); + assertThat(SqlType.typesMatch(type, copyOfType)).isTrue(); + SqlType otherType = + type.getCode().equals(Code.STRING) ? SqlType.bytes() : SqlType.string(); + assertThat(SqlType.typesMatch(type, otherType)).isFalse(); + allCodes.remove(type.getCode()); + } + + assertThat(allCodes).isEmpty(); + } + + @Test + public void historicalMap_matchesProto() { + SqlType expected = + SqlType.fromProto( + mapType( + bytesType(), + arrayType( + structType( + structField("timestamp", timestampType()), + structField("value", bytesType()))))); + assertThat(SqlType.typesMatch(SqlType.historicalMap(), expected)).isTrue(); + } + + @Test + public void typesMatch_ignoresStructSchema() { + SqlType.Struct schemalessStruct = SqlType.struct(); + Type structProto = + structType(structField("timestamp", timestampType()), structField("value", bytesType())); + StructWithSchema structWithSchema = StructWithSchema.fromProto(structProto.getStructType()); + SqlType.Array arrayNestedSchemaless = SqlType.arrayOf(SqlType.struct()); + SqlType arrayNestedSchema = SqlType.fromProto(arrayType(structProto)); + SqlType.Map> historicalMapSchemaless = SqlType.historicalMap(); + SqlType mapNestedSchema = SqlType.fromProto(mapType(bytesType(), arrayType(structProto))); + + assertThat(SqlType.typesMatch(schemalessStruct, structWithSchema)).isTrue(); + assertThat(SqlType.typesMatch(arrayNestedSchema, arrayNestedSchemaless)).isTrue(); + assertThat(SqlType.typesMatch(historicalMapSchemaless, mapNestedSchema)).isTrue(); + } + + @Test + public void typesMatch_checksArrayElements() { + SqlType.Array stringArray = SqlType.arrayOf(SqlType.string()); + SqlType.Array bytesArray = SqlType.arrayOf(SqlType.bytes()); + SqlType.Array> nestedStringArray = + SqlType.arrayOf(SqlType.arrayOf(SqlType.string())); + SqlType.Array> nestedBytesArray = + SqlType.arrayOf(SqlType.arrayOf(SqlType.bytes())); + + assertThat(SqlType.typesMatch(stringArray, bytesArray)).isFalse(); + assertThat(SqlType.typesMatch(nestedStringArray, nestedBytesArray)).isFalse(); + } + + @Test + public void typesMatch_checksMapSchema() { + SqlType.Map bytesBytesMap = + SqlType.mapOf(SqlType.bytes(), SqlType.bytes()); + SqlType.Map bytesStringMap = + SqlType.mapOf(SqlType.string(), SqlType.bytes()); + SqlType.Map stringBytesMap = + SqlType.mapOf(SqlType.bytes(), SqlType.string()); + + assertThat(SqlType.typesMatch(bytesBytesMap, bytesStringMap)).isFalse(); + assertThat(SqlType.typesMatch(bytesBytesMap, stringBytesMap)).isFalse(); + assertThat( + SqlType.typesMatch( + SqlType.mapOf(SqlType.bytes(), bytesBytesMap), + SqlType.mapOf(SqlType.bytes(), bytesStringMap))) + .isFalse(); + } + + @Test + public void struct_getFields() { + Type structProto = + structType(structField("timestamp", timestampType()), structField("value", bytesType())); + SqlType struct = SqlType.fromProto(structProto); + SqlType.Struct typedStruct = (SqlType.Struct) struct; + SqlType.Struct.Field timestampField = typedStruct.getFields().get(0); + SqlType.Struct.Field valueField = typedStruct.getFields().get(1); + assertThat(timestampField.name()).isEqualTo("timestamp"); + assertThat(timestampField.type()).isEqualTo(SqlType.timestamp()); + assertThat(valueField.name()).isEqualTo("value"); + assertThat(valueField.type()).isEqualTo(SqlType.bytes()); + } + + @Test + public void array_getElementType() { + SqlType array = SqlType.fromProto(arrayType(stringType())); + SqlType.Array typedArray = (SqlType.Array) array; + + assertThat(typedArray.getElementType()).isEqualTo(SqlType.string()); + } + + @Test + public void map_getKeyAndValueTypes() { + SqlType map = SqlType.mapOf(SqlType.bytes(), SqlType.string()); + SqlType.Map typedMap = (SqlType.Map) map; + + assertThat(typedMap.getKeyType()).isEqualTo(SqlType.bytes()); + assertThat(typedMap.getValueType()).isEqualTo(SqlType.string()); + } +} 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..f29fa6200a 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.SettableApiFuture; 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 { + SettableApiFuture 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); + } + }; + + SettableApiFuture 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..73ecdb1cff --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/BigtableUnaryOperationCallableTest.java @@ -0,0 +1,159 @@ +/* + * 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); + + ApiFuture f = 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 edf0b87fd9..bf02ce447a 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,13 @@ 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.common.collect.Lists; import io.grpc.ForwardingServerCall; import io.grpc.Metadata; import io.grpc.MethodDescriptor; @@ -63,6 +71,8 @@ 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; @@ -94,9 +104,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 +121,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 +188,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("fake-table"))); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -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("fake-table"))); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -443,15 +483,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 +555,8 @@ 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("table"))); Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); @@ -517,7 +576,8 @@ 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("fake-table"))); fakeService.count.set(0); client.mutateRow(RowMutation.create("fake-table", "key").setCell("cf", "q", "v")); @@ -540,12 +600,17 @@ public void testAllMethodsAreCalled() { ReadModifyWriteRow.create("fake-table", "key").append("cf", "q", "v")); fakeService.count.set(0); - client.generateInitialChangeStreamPartitions("fake-table").iterator().hasNext(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored2 = + Lists.newArrayList(client.generateInitialChangeStreamPartitions("fake-table")); fakeService.count.set(0); for (ChangeStreamRecord record : 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,6 +618,7 @@ public void testAllMethodsAreCalled() { // Exclude methods that are not supported by routing cookie methods.add("PingAndWarm"); + methods.add("ExecuteQuery"); // TODO remove when retries are implemented assertThat(methods).containsExactlyElementsIn(expected); } @@ -563,7 +629,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("fake-table"))); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -584,7 +651,8 @@ public void testCookieSetWithBigtableClientFactory() throws Exception { fakeService.count.set(0); serverMetadata.clear(); - client2.readRows(Query.create("fake-table")).iterator().hasNext(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored2 = Lists.newArrayList(client2.readRows(Query.create("fake-table"))); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -612,7 +680,8 @@ public void testDisableRoutingCookie() throws IOException { // is added. settings.stubSettings().setEnableRoutingCookie(false); try (BigtableDataClient client = BigtableDataClient.create(settings.build())) { - client.readRows(Query.create("fake-table")).iterator().hasNext(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(client.readRows(Query.create("fake-table"))); assertThat(fakeService.count.get()).isEqualTo(2); fakeService.count.set(0); @@ -641,7 +710,9 @@ public void testDisableRoutingCookie() throws IOException { assertThat(fakeService.count.get()).isEqualTo(2); fakeService.count.set(0); - client.generateInitialChangeStreamPartitions("fake-table").iterator().hasNext(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored2 = + Lists.newArrayList(client.generateInitialChangeStreamPartitions("fake-table")); assertThat(fakeService.count.get()).isEqualTo(2); fakeService.count.set(0); @@ -656,7 +727,7 @@ public void testDisableRoutingCookie() throws IOException { static class FakeService extends BigtableGrpc.BigtableImplBase { - private boolean returnCookie = true; + private volatile boolean returnCookie = true; private final AtomicInteger count = new AtomicInteger(); @Override @@ -665,7 +736,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; @@ -680,7 +750,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; @@ -695,7 +764,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; @@ -713,7 +781,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; @@ -793,6 +860,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..f9c1c89a51 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); 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 290fcc321f..888dbc0f34 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,11 +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.BoundStatement; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Range; @@ -78,6 +82,7 @@ public void settingsAreNotLostTest() { Duration watchdogInterval = Duration.ofSeconds(12); boolean enableRoutingCookie = false; boolean enableRetryInfo = false; + String metricsEndpoint = "test-endpoint:443"; EnhancedBigtableStubSettings.Builder builder = EnhancedBigtableStubSettings.newBuilder() @@ -90,7 +95,8 @@ public void settingsAreNotLostTest() { .setStreamWatchdogProvider(watchdogProvider) .setStreamWatchdogCheckInterval(watchdogInterval) .setEnableRoutingCookie(enableRoutingCookie) - .setEnableRetryInfo(enableRetryInfo); + .setEnableRetryInfo(enableRetryInfo) + .setMetricsEndpoint(metricsEndpoint); verifyBuilder( builder, @@ -103,7 +109,8 @@ public void settingsAreNotLostTest() { watchdogProvider, watchdogInterval, enableRoutingCookie, - enableRetryInfo); + enableRetryInfo, + metricsEndpoint); verifySettings( builder.build(), projectId, @@ -115,7 +122,8 @@ public void settingsAreNotLostTest() { watchdogProvider, watchdogInterval, enableRoutingCookie, - enableRetryInfo); + enableRetryInfo, + metricsEndpoint); verifyBuilder( builder.build().toBuilder(), projectId, @@ -127,7 +135,8 @@ public void settingsAreNotLostTest() { watchdogProvider, watchdogInterval, enableRoutingCookie, - enableRetryInfo); + enableRetryInfo, + metricsEndpoint); } private void verifyBuilder( @@ -141,7 +150,8 @@ private void verifyBuilder( WatchdogProvider watchdogProvider, Duration watchdogInterval, boolean enableRoutingCookie, - boolean enableRetryInfo) { + boolean enableRetryInfo, + String metricsEndpoint) { assertThat(builder.getProjectId()).isEqualTo(projectId); assertThat(builder.getInstanceId()).isEqualTo(instanceId); assertThat(builder.getAppProfileId()).isEqualTo(appProfileId); @@ -152,6 +162,7 @@ private void verifyBuilder( assertThat(builder.getStreamWatchdogCheckInterval()).isEqualTo(watchdogInterval); assertThat(builder.getEnableRoutingCookie()).isEqualTo(enableRoutingCookie); assertThat(builder.getEnableRetryInfo()).isEqualTo(enableRetryInfo); + assertThat(builder.getMetricsEndpoint()).isEqualTo(metricsEndpoint); } private void verifySettings( @@ -165,7 +176,8 @@ private void verifySettings( WatchdogProvider watchdogProvider, Duration watchdogInterval, boolean enableRoutingCookie, - boolean enableRetryInfo) { + boolean enableRetryInfo, + String metricsEndpoint) { assertThat(settings.getProjectId()).isEqualTo(projectId); assertThat(settings.getInstanceId()).isEqualTo(instanceId); assertThat(settings.getAppProfileId()).isEqualTo(appProfileId); @@ -176,6 +188,7 @@ private void verifySettings( assertThat(settings.getStreamWatchdogCheckInterval()).isEqualTo(watchdogInterval); assertThat(settings.getEnableRoutingCookie()).isEqualTo(enableRoutingCookie); assertThat(settings.getEnableRetryInfo()).isEqualTo(enableRetryInfo); + assertThat(settings.getMetricsEndpoint()).isEqualTo(metricsEndpoint); } @Test @@ -536,17 +549,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()) @@ -691,16 +700,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); @@ -759,6 +764,123 @@ public void pingAndWarmRetriesAreDisabled() { assertThat(builder.getRetrySettings().getInitialRpcTimeout()).isAtMost(Duration.ofSeconds(30)); } + @Test + public void executeQuerySettingsAreNotLost() { + String dummyProjectId = "my-project"; + String dummyInstanceId = "my-instance"; + + 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); + + // Note that we don't support retries yet so the settings won't do anything. + // We still don't want the settings to be dropped though. + RetrySettings retrySettings = + RetrySettings.newBuilder() + .setMaxAttempts(10) + .setTotalTimeout(Duration.ofHours(1)) + .setInitialRpcTimeout(Duration.ofSeconds(10)) + .setRpcTimeoutMultiplier(1) + .setMaxRpcTimeout(Duration.ofSeconds(10)) + .setJittered(true) + .build(); + + builder + .executeQuerySettings() + .setIdleTimeout(Duration.ofMinutes(5)) + .setRetryableCodes(Code.ABORTED, Code.DEADLINE_EXCEEDED) + .setRetrySettings(retrySettings) + .build(); + + builder.executeQuerySettings().setRetryableCodes(Code.ABORTED, Code.DEADLINE_EXCEEDED); + + assertThat(builder.executeQuerySettings().getIdleTimeout()).isEqualTo(Duration.ofMinutes(5)); + assertThat(builder.executeQuerySettings().getRetryableCodes()) + .containsAtLeast(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.executeQuerySettings().getRetrySettings()).isEqualTo(retrySettings); + + assertThat(builder.build().executeQuerySettings().getIdleTimeout()) + .isEqualTo(Duration.ofMinutes(5)); + assertThat(builder.build().executeQuerySettings().getRetryableCodes()) + .containsAtLeast(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.build().executeQuerySettings().getRetrySettings()).isEqualTo(retrySettings); + + assertThat(builder.build().toBuilder().executeQuerySettings().getIdleTimeout()) + .isEqualTo(Duration.ofMinutes(5)); + assertThat(builder.build().toBuilder().executeQuerySettings().getRetryableCodes()) + .containsAtLeast(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.build().toBuilder().executeQuerySettings().getRetrySettings()) + .isEqualTo(retrySettings); + } + + @Test + public void executeQueryHasSaneDefaults() { + ServerStreamingCallSettings.Builder builder = + EnhancedBigtableStubSettings.newBuilder().executeQuerySettings(); + + // Retries aren't supported right now + // call verifyRetrySettingAreSane when we do + 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 prepareQuerySettingsAreNotLost() { + String dummyProjectId = "my-project"; + String dummyInstanceId = "my-instance"; + + 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)) + .setJittered(true) + .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) { assertThat(retryCodes).containsAtLeast(Code.DEADLINE_EXCEEDED, Code.UNAVAILABLE); @@ -871,9 +993,9 @@ public void enableRetryInfoFalseValueTest() throws IOException { "appProfileId", "isRefreshingChannel", "primedTableIds", - "jwtAudienceMapping", "enableRoutingCookie", "enableRetryInfo", + "enableSkipTrailers", "readRowsSettings", "readRowSettings", "sampleRowKeysSettings", @@ -885,7 +1007,12 @@ public void enableRetryInfoFalseValueTest() throws IOException { "generateInitialChangeStreamPartitionsSettings", "readChangeStreamSettings", "pingAndWarmSettings", + "executeQuerySettings", + "prepareQuerySettings", "metricsProvider", + "metricsEndpoint", + "areInternalMetricsEnabled", + "jwtAudience", }; @Test @@ -902,8 +1029,7 @@ public void testToString() { assertThat(defaultSettings.toString()).contains("primedTableIds=[]"); EnhancedBigtableStubSettings settings = - defaultSettings - .toBuilder() + defaultSettings.toBuilder() .setPrimedTableIds("2", "12", "85", "06") .setEndpoint("example.com:1234") .build(); 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 e2e44b0b83..aba814b05d 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 @@ -15,11 +15,19 @@ */ 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.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; import static org.junit.Assert.assertThrows; import com.google.api.client.json.gson.GsonFactory; import com.google.api.client.json.webtoken.JsonWebSignature; +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.BatchingException; @@ -31,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; @@ -38,13 +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; @@ -52,16 +71,39 @@ 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.models.*; -import com.google.common.collect.ImmutableMap; +import com.google.cloud.bigtable.data.v2.internal.SqlRow; +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.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.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; @@ -85,12 +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; @@ -104,11 +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 String TABLE_ID = "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 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; @@ -135,6 +191,7 @@ public void setUp() throws IOException, IllegalAccessException, InstantiationExc .setInstanceId(INSTANCE_ID) .setAppProfileId(APP_PROFILE_ID) .setCredentialsProvider(NoCredentialsProvider.create()) + .setMetricsProvider(NoopMetricsProvider.INSTANCE) .build() .getStubSettings(); @@ -150,9 +207,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(); @@ -168,14 +222,14 @@ 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("fake-table")).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)); @@ -189,9 +243,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(); @@ -204,32 +255,31 @@ 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(); + EnhancedBigtableStubSettings settings = + EnhancedBigtableStubSettings.newBuilder() + .setProjectId("fake-project") + .setInstanceId("fake-instance") + .setEndpoint("batch-bigtable.googleapis.com:443") + .setCredentialsProvider(FixedCredentialsProvider.create(jwtCreds)) + .setMetricsProvider(NoopMetricsProvider.INSTANCE) + // 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("fake-table")).get(); metadata = metadataInterceptor.headers.take(); - } finally { - emulatorChannel.shutdown(); } + channel.shutdown(); String authValue = metadata.get(Key.of("Authorization", Metadata.ASCII_STRING_MARSHALLER)); String expectedPrefix = "Bearer "; @@ -241,7 +291,6 @@ public void testBatchJwtAudience() @Test public void testFeatureFlags() throws InterruptedException, IOException, ExecutionException { - enhancedBigtableStub.readRowCallable().futureCall(Query.create("fake-table")).get(); Metadata metadata = metadataInterceptor.headers.take(); @@ -254,6 +303,199 @@ public void testFeatureFlags() throws InterruptedException, IOException, Executi assertThat(featureFlags.getLastScannedRowResponses()).isTrue(); } + @Test + public void testPingAndWarmFeatureFlags() + throws InterruptedException, IOException, ExecutionException { + 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(Key.of("bigtable-features", Metadata.ASCII_STRING_MARSHALLER)); + FeatureFlags featureFlags = + FeatureFlags.parseFrom(BaseEncoding.base64Url().decode(encodedFeatureFlags)); + + assertThat(featureFlags.getReverseScans()).isTrue(); + assertThat(featureFlags.getLastScannedRowResponses()).isTrue(); + assertThat(featureFlags.getRoutingCookie()).isTrue(); + assertThat(featureFlags.getRetryInfo()).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(TableId.of(TABLE_ID), "my-key").deleteRow(); + + ApiFuture f = enhancedBigtableStub.mutateRowCallable().futureCall(req, null); + f.get(); + + Metadata reqMetadata = metadataInterceptor.headers.poll(1, TimeUnit.SECONDS); + + // RequestParamsExtractor + String reqParams = + reqMetadata.get(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(StreamObserver.class)); + + RowMutation req = RowMutation.create(TableId.of(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); + + // RequestParamsExtractor + String reqParams = + reqMetadata.get(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(StreamObserver.class)); + 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 = @@ -455,8 +697,7 @@ public void testBulkMutationFlowControllerConfigured() throws Exception { public void testCallContextPropagatedInMutationBatcher() throws IOException, InterruptedException, ExecutionException { EnhancedBigtableStubSettings settings = - defaultSettings - .toBuilder() + defaultSettings.toBuilder() .setRefreshingChannel(true) .setPrimedTableIds("table1", "table2") .build(); @@ -486,8 +727,7 @@ public void testCallContextPropagatedInMutationBatcher() public void testCallContextPropagatedInReadBatcher() throws IOException, InterruptedException, ExecutionException { EnhancedBigtableStubSettings settings = - defaultSettings - .toBuilder() + defaultSettings.toBuilder() .setRefreshingChannel(true) .setPrimedTableIds("table1", "table2") .build(); @@ -626,7 +866,8 @@ public void testBatchMutationsPartialFailure() { 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"); } @@ -650,7 +891,69 @@ public void testBatchMutationRPCErrorCode() { 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(); + 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) + .setPreparedQuery(ByteString.copyFromUtf8("abc")) + .build(); + assertThat(sqlServerStream.rows().iterator().next()).isNotNull(); + assertThat(sqlServerStream.metadataFuture().isDone()).isTrue(); + assertThat(fakeDataService.popLastExecuteQueryRequest()).isEqualTo(expectedRequest); + } + + @Test + public void testExecuteQueryWaitTimeoutIsSet() 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()); + Iterator 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 { + 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)); + + 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 { @@ -684,12 +987,53 @@ private static class FakeDataService extends BigtableGrpc.BigtableImplBase { final BlockingQueue readChangeReadStreamRequests = 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); } + 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) { @@ -750,5 +1094,40 @@ public void pingAndWarm( responseObserver.onNext(PingAndWarmResponse.getDefaultInstance()); responseObserver.onCompleted(); } + + @Override + public void executeQuery( + ExecuteQueryRequest request, StreamObserver responseObserver) { + if (request.getPreparedQuery().startsWith(ByteString.copyFromUtf8(WAIT_TIME_QUERY))) { + try { + Thread.sleep(WATCHDOG_CHECK_DURATION.toMillis() * 2); + } catch (Exception e) { + + } + } + executeQueryRequests.add(request); + 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 e) { + + } + } + 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 ecab86906b..a61fd99414 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,6 +15,10 @@ */ 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.gax.batching.Batcher; @@ -27,6 +31,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; @@ -42,6 +48,7 @@ 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.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; import com.google.rpc.Status; import io.grpc.Metadata; import io.grpc.Server; @@ -49,6 +56,7 @@ import io.grpc.ServerCallHandler; import io.grpc.ServerInterceptor; import io.grpc.stub.StreamObserver; +import java.util.HashMap; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import org.junit.After; @@ -62,8 +70,10 @@ 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 String TABLE_NAME = - "projects%2F" + PROJECT_ID + "%2Finstances%2F" + INSTANCE_ID + "%2Ftables%2F" + TABLE_ID; + + 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 APP_PROFILE_ID = "fake-profile"; private static final String TEST_FIXED_HEADER_STRING = "test_fixed_header"; @@ -101,11 +111,7 @@ public void setUp() throws Exception { .setHeaderProvider(headerProvider) .bulkMutateRowsSettings() .setBatchingSettings( - settings - .stubSettings() - .bulkMutateRowsSettings() - .getBatchingSettings() - .toBuilder() + settings.stubSettings().bulkMutateRowsSettings().getBatchingSettings().toBuilder() .setElementCountThreshold(1L) .build()); @@ -160,7 +166,25 @@ public void readModifyWriteTest() { verifyHeaderSent(); } + @Test + public void executeQueryTest() { + 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); + } + private void verifyHeaderSent() { + verifyHeaderSent(false); + } + + private void verifyHeaderSent(boolean useInstance) { Metadata metadata; try { metadata = sentMetadata.take(); @@ -169,7 +193,11 @@ private void verifyHeaderSent() { } String requestParamsvalue = metadata.get(X_GOOG_REQUEST_PARAMS_KEY); - assertThat(requestParamsvalue).containsMatch("(^|.*&)table_name=" + TABLE_NAME + "($|&.*)"); + if (useInstance) { + assertThat(requestParamsvalue).containsMatch("(^|.*&)name=" + INSTANCE_NAME + "($|&.*)"); + } else { + assertThat(requestParamsvalue).containsMatch("(^|.*&)table_name=" + TABLE_NAME + "($|&.*)"); + } assertThat(requestParamsvalue) .containsMatch("(^|.*&)app_profile_id=" + APP_PROFILE_ID + "($|&.*)"); @@ -242,5 +270,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 a4b2520725..0000000000 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/MutateRowCallableTest.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.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.truth.Truth; -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); - - 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 abbf46c468..ea4b46a713 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; @@ -150,7 +161,12 @@ public void testAllMethods() { attemptCounter.set(0); verifyRetryInfoIsUsed( - () -> client.readRows(Query.create(TableId.of("table"))).iterator().hasNext(), true); + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(client.readRows(Query.create(TableId.of("table")))); + }, + true); attemptCounter.set(0); verifyRetryInfoIsUsed( @@ -188,13 +204,25 @@ public void testAllMethods() { 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,6 +233,7 @@ public void testAllMethods() { // Exclude methods that don't support retry info methods.add("PingAndWarm"); + methods.add("ExecuteQuery"); // TODO remove when retries are implemented assertThat(methods).containsExactlyElementsIn(expected); } @@ -239,7 +268,12 @@ public void testReadRowServerNotReturningRetryInfoClientDisabledHandling() throw @Test public void testReadRowsNonRetraybleErrorWithRetryInfo() { - verifyRetryInfoIsUsed(() -> client.readRows(Query.create("table")).iterator().hasNext(), false); + verifyRetryInfoIsUsed( + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(client.readRows(Query.create("table"))); + }, + false); } @Test @@ -248,13 +282,21 @@ public void testReadRowsDisableRetryInfo() throws IOException { try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { verifyRetryInfoCanBeDisabled( - () -> newClient.readRows(Query.create("table")).iterator().hasNext()); + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(newClient.readRows(Query.create("table"))); + }); } } @Test public void testReadRowsServerNotReturningRetryInfo() { - verifyNoRetryInfo(() -> client.readRows(Query.create("table")).iterator().hasNext(), true); + verifyNoRetryInfo( + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(client.readRows(Query.create("table"))); + }, + true); } @Test @@ -262,7 +304,12 @@ public void testReadRowsServerNotReturningRetryInfoClientDisabledHandling() thro 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(newClient.readRows(Query.create("table"))); + }, + true); } } @@ -461,7 +508,11 @@ public void testReadModifyWriteNotReturningRetryInfoClientDisabledHandling() thr @Test public void testReadChangeStreamNonRetryableErrorWithRetryInfo() { verifyRetryInfoIsUsed( - () -> client.readChangeStream(ReadChangeStreamQuery.create("table")).iterator().hasNext(), + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(client.readChangeStream(ReadChangeStreamQuery.create("table"))); + }, false); } @@ -471,18 +522,23 @@ public void testReadChangeStreamDisableRetryInfo() throws IOException { try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { verifyRetryInfoCanBeDisabled( - () -> - newClient - .readChangeStream(ReadChangeStreamQuery.create("table")) - .iterator() - .hasNext()); + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList( + newClient.readChangeStream(ReadChangeStreamQuery.create("table"))); + }); } } @Test public void testReadChangeStreamServerNotReturningRetryInfo() { verifyNoRetryInfo( - () -> client.readChangeStream(ReadChangeStreamQuery.create("table")).iterator().hasNext(), + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(client.readChangeStream(ReadChangeStreamQuery.create("table"))); + }, true); } @@ -492,11 +548,12 @@ public void testReadChangeStreamNotReturningRetryInfoClientDisabledHandling() th try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { verifyNoRetryInfo( - () -> - newClient - .readChangeStream(ReadChangeStreamQuery.create("table")) - .iterator() - .hasNext(), + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList( + newClient.readChangeStream(ReadChangeStreamQuery.create("table"))); + }, true, com.google.protobuf.Duration.newBuilder().setSeconds(5).setNanos(0).build()); } @@ -505,7 +562,12 @@ public void testReadChangeStreamNotReturningRetryInfoClientDisabledHandling() th @Test public void testGenerateInitialChangeStreamPartitionNonRetryableError() { verifyRetryInfoIsUsed( - () -> client.generateInitialChangeStreamPartitions("table").iterator().hasNext(), false); + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(client.generateInitialChangeStreamPartitions("table")); + }, + false); } @Test @@ -514,14 +576,23 @@ public void testGenerateInitialChangeStreamPartitionDisableRetryInfo() throws IO try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { verifyRetryInfoCanBeDisabled( - () -> newClient.generateInitialChangeStreamPartitions("table").iterator().hasNext()); + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(newClient.generateInitialChangeStreamPartitions("table")); + }); } } @Test public void testGenerateInitialChangeStreamServerNotReturningRetryInfo() { verifyNoRetryInfo( - () -> client.generateInitialChangeStreamPartitions("table").iterator().hasNext(), true); + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(client.generateInitialChangeStreamPartitions("table")); + }, + true); } @Test @@ -531,11 +602,48 @@ public void testGenerateInitialChangeStreamServerNotReturningRetryInfoClientDisa try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { verifyNoRetryInfo( - () -> newClient.generateInitialChangeStreamPartitions("table").iterator().hasNext(), + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(newClient.generateInitialChangeStreamPartitions("table")); + }, true); } } + @Test + public void testPrepareQueryNonRetryableErrorWithRetryInfo() { + verifyRetryInfoIsUsed( + () -> client.prepareStatement("SELECT * FROM table", new HashMap<>()), false); + } + + @Test + public void testPrepareQueryDisableRetryInfo() throws IOException { + settings.stubSettings().setEnableRetryInfo(false); + + try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { + + verifyRetryInfoCanBeDisabled( + () -> newClient.prepareStatement("SELECT * FROM table", new HashMap<>())); + } + } + + @Test + public void testPrepareQueryServerNotReturningRetryInfo() { + verifyNoRetryInfo(() -> client.prepareStatement("SELECT * FROM table", new HashMap<>()), true); + } + + @Test + public void testPrepareQueryServerNotReturningRetryInfoClientDisabledHandling() + throws IOException { + settings.stubSettings().setEnableRetryInfo(false); + + try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { + verifyNoRetryInfo( + () -> newClient.prepareStatement("SELECT * FROM table", new HashMap<>()), true); + } + } + // Test the case where server returns retry info and client enables handling of retry info private void verifyRetryInfoIsUsed(Runnable runnable, boolean retryableError) { if (retryableError) { @@ -801,5 +909,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/SkipTrailersTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SkipTrailersTest.java new file mode 100644 index 0000000000..eb9d4bc91a --- /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.GeneratedMessageV3; +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.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.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); + + BigtableDataSettings.Builder clientBuilder = + BigtableDataSettings.newBuilderForEmulator(server.getPort()) + .setProjectId(PROJECT_ID) + .setInstanceId(INSTANCE_ID) + .setMetricsProvider(NoopMetricsProvider.INSTANCE) + .setCredentialsProvider(NoCredentialsProvider.create()); + clientBuilder.stubSettings().setEnableSkipTrailers(true).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) { + Assert.fail("timed out waiting for the trailer optimization future to resolve"); + } + + // 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/metrics/BigtableCloudMonitoringExporterTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableCloudMonitoringExporterTest.java index 81629e2d9d..0a8ad0afbd 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/stub/metrics/BigtableCloudMonitoringExporterTest.java @@ -24,7 +24,10 @@ 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.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; @@ -34,7 +37,9 @@ import com.google.api.gax.rpc.UnaryCallable; 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; @@ -53,6 +58,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; @@ -89,7 +96,9 @@ public void setUp() { exporter = new BigtableCloudMonitoringExporter( - projectId, fakeMetricServiceClient, /* applicationResource= */ null, taskId); + "bigtable metrics", + fakeMetricServiceClient, + new BigtableCloudMonitoringExporter.PublicTimeSeriesConverter(taskId)); attributes = Attributes.builder() @@ -301,14 +310,23 @@ public void testTimeSeriesForMetricWithGceOrGkeResource() { String gceProjectId = "fake-gce-project"; BigtableCloudMonitoringExporter exporter = new BigtableCloudMonitoringExporter( - projectId, + "application metrics", fakeMetricServiceClient, - MonitoredResource.newBuilder() - .setType("gce-instance") - .putLabels("some-gce-key", "some-gce-value") - .putLabels("project_id", gceProjectId) - .build(), - taskId); + new BigtableCloudMonitoringExporter.InternalTimeSeriesConverter( + Suppliers.ofInstance( + MonitoredResource.newBuilder() + .setType("bigtable_client") + .putLabels("project_id", gceProjectId) + .putLabels("instance", "resource-instance") + .putLabels("app_profile", "resource-app-profile") + .putLabels("client_project", "client-project") + .putLabels("region", "cleint-region") + .putLabels("cloud_platform", "gce_instance") + .putLabels("host_id", "1234567890") + .putLabels("host_name", "harold") + .putLabels("client_name", "java/1234") + .putLabels("uuid", "something") + .build()))); ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateTimeSeriesRequest.class); @@ -360,21 +378,136 @@ public void testTimeSeriesForMetricWithGceOrGkeResource() { 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", gceProjectId) + .put("instance", "resource-instance") + .put("app_profile", "resource-app-profile") + .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", "java/1234") + .put("uuid", "something") + .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(BIGTABLE_PROJECT_ID_KEY.getKey(), projectId) + .put(INSTANCE_ID_KEY.getKey(), instanceId) + .put(APP_PROFILE_KEY.getKey(), appProfileId) + .put(CLIENT_NAME_KEY.getKey(), clientName) + .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(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( + 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), + ImmutableMap.of( + BIGTABLE_PROJECT_ID_KEY.getKey(), + "another-project", + INSTANCE_ID_KEY.getKey(), + instanceId, + TABLE_ID_KEY.getKey(), + tableId, + CLUSTER_ID_KEY.getKey(), + cluster, + 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/stub/metrics/BigtableTracerCallableTest.java index a12dd3cfbd..b0966a2166 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/stub/metrics/BigtableTracerCallableTest.java @@ -44,6 +44,7 @@ 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.common.collect.ImmutableMap; import io.grpc.ForwardingServerCall.SimpleForwardingServerCall; @@ -126,11 +127,10 @@ public void sendHeaders(Metadata headers) { .setAppProfileId(APP_PROFILE_ID) .build(); + BigtableClientContext bigtableClientContext = + EnhancedBigtableStub.createBigtableClientContext(settings.getStubSettings()); ClientContext clientContext = - EnhancedBigtableStub.createClientContext(settings.getStubSettings()); - clientContext = - clientContext - .toBuilder() + bigtableClientContext.getClientContext().toBuilder() .setTracerFactory( EnhancedBigtableStub.createBigtableTracerFactory( settings.getStubSettings(), @@ -152,11 +152,10 @@ public void sendHeaders(Metadata headers) { .setAppProfileId(APP_PROFILE_ID) .build(); + BigtableClientContext noHeaderBigtableClientContext = + EnhancedBigtableStub.createBigtableClientContext(noHeaderSettings.getStubSettings()); ClientContext noHeaderClientContext = - EnhancedBigtableStub.createClientContext(noHeaderSettings.getStubSettings()); - noHeaderClientContext = - noHeaderClientContext - .toBuilder() + noHeaderBigtableClientContext.getClientContext().toBuilder() .setTracerFactory( EnhancedBigtableStub.createBigtableTracerFactory( noHeaderSettings.getStubSettings(), 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 index e3304acdbf..5a3b086f95 100644 --- 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 @@ -21,8 +21,10 @@ 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.FIRST_RESPONSE_LATENCIES_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.REMAINING_DEADLINE_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; @@ -33,9 +35,11 @@ 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 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; @@ -66,19 +70,16 @@ 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.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; @@ -93,9 +94,15 @@ 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.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; @@ -104,6 +111,8 @@ 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.Assert; import org.junit.Before; @@ -113,7 +122,6 @@ import org.junit.runners.JUnit4; import org.mockito.junit.MockitoJUnit; import org.mockito.junit.MockitoRule; -import org.threeten.bp.Duration; @RunWith(JUnit4.class) public class BuiltinMetricsTracerTest { @@ -123,6 +131,7 @@ public class BuiltinMetricsTracerTest { private static final String TABLE = "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; @@ -130,8 +139,7 @@ public class BuiltinMetricsTracerTest { 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; + private static final Duration CHANNEL_BLOCKING_LATENCY = Duration.ofMillis(200); @Rule public final MockitoRule mockitoRule = MockitoJUnit.rule(); @@ -146,6 +154,8 @@ public class BuiltinMetricsTracerTest { private InMemoryMetricReader metricReader; + private DelayProxyDetector delayProxyDetector; + @Before public void setUp() throws Exception { metricReader = InMemoryMetricReader.create(); @@ -197,28 +207,6 @@ public void sendHeaders(Metadata headers) { } }; - 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 = @@ -226,13 +214,25 @@ public void sendMessage(ReqT message) { .setProjectId(PROJECT_ID) .setInstanceId(INSTANCE_ID) .setAppProfileId(APP_PROFILE_ID) + .setRefreshingChannel(false) .build(); EnhancedBigtableStubSettings.Builder stubSettingsBuilder = settings.getStubSettings().toBuilder(); stubSettingsBuilder .mutateRowSettings() .retrySettings() - .setInitialRetryDelay(Duration.ofMillis(200)); + .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() @@ -242,7 +242,7 @@ public void sendMessage(ReqT message) { BatchingSettings.newBuilder() .setElementCountThreshold((long) batchElementCount) .setRequestByteThreshold(1000L) - .setDelayThreshold(Duration.ofHours(1)) + .setDelayThresholdDuration(java.time.Duration.ofHours(1)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setMaxOutstandingElementCount((long) batchElementCount + 1) @@ -260,15 +260,16 @@ public void sendMessage(ReqT message) { final ApiFunction oldConfigurator = channelProvider.getChannelConfigurator(); + delayProxyDetector = new DelayProxyDetector(); + channelProvider.setChannelConfigurator( (builder) -> { if (oldConfigurator != null) { builder = oldConfigurator.apply(builder); } - return builder.intercept(clientInterceptor); + return builder.proxyDetector(delayProxyDetector); }); stubSettingsBuilder.setTransportChannelProvider(channelProvider.build()); - EnhancedBigtableStubSettings stubSettings = stubSettingsBuilder.build(); stub = new EnhancedBigtableStub(stubSettings, ClientContext.create(stubSettings)); } @@ -286,8 +287,7 @@ public void testReadRowsOperationLatencies() { long elapsed = stopwatch.elapsed(TimeUnit.MILLISECONDS); Attributes expectedAttributes = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(STATUS_KEY, "OK") .put(TABLE_ID_KEY, TABLE) .put(ZONE_ID_KEY, ZONE) @@ -312,8 +312,7 @@ public void testReadRowsOperationLatenciesOnAuthorizedView() { long elapsed = stopwatch.elapsed(TimeUnit.MILLISECONDS); Attributes expectedAttributes = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(STATUS_KEY, "OK") .put(TABLE_ID_KEY, TABLE) .put(ZONE_ID_KEY, ZONE) @@ -328,13 +327,57 @@ public void testReadRowsOperationLatenciesOnAuthorizedView() { assertThat(value).isIn(Range.closed(SERVER_LATENCY, elapsed)); } + @Test + public void testFirstResponseLatencies() { + Stopwatch firstResponseTimer = Stopwatch.createStarted(); + stub.readRowsCallable() + .call( + Query.create(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 e) { + } + } + + @Override + public void onError(Throwable t) {} + + @Override + public void onComplete() {} + }); + + Attributes expectedAttributes = + baseAttributes.toBuilder() + .put(STATUS_KEY, "OK") + .put(TABLE_ID_KEY, FIRST_RESPONSE_TABLE_ID) + .put(ZONE_ID_KEY, ZONE) + .put(CLUSTER_ID_KEY, CLUSTER) + .put(METHOD_KEY, "Bigtable.ReadRows") + .put(CLIENT_NAME_KEY, CLIENT_NAME) + .build(); + + MetricData metricData = getMetricData(metricReader, FIRST_RESPONSE_LATENCIES_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 = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(STATUS_KEY, "OK") .put(TABLE_ID_KEY, TABLE) .put(ZONE_ID_KEY, ZONE) @@ -351,18 +394,16 @@ public void testGfeMetrics() { MetricData connectivityErrorCountMetricData = getMetricData(metricReader, CONNECTIVITY_ERROR_COUNT_NAME); Attributes expected1 = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(STATUS_KEY, "UNAVAILABLE") .put(TABLE_ID_KEY, TABLE) .put(ZONE_ID_KEY, "global") - .put(CLUSTER_ID_KEY, "unspecified") + .put(CLUSTER_ID_KEY, "") .put(METHOD_KEY, "Bigtable.ReadRows") .put(CLIENT_NAME_KEY, CLIENT_NAME) .build(); Attributes expected2 = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(STATUS_KEY, "OK") .put(TABLE_ID_KEY, TABLE) .put(ZONE_ID_KEY, ZONE) @@ -417,8 +458,7 @@ public void onComplete() { getMetricData(metricReader, APPLICATION_BLOCKING_LATENCIES_NAME); Attributes expectedAttributes = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(TABLE_ID_KEY, TABLE) .put(ZONE_ID_KEY, ZONE) .put(CLUSTER_ID_KEY, CLUSTER) @@ -453,8 +493,7 @@ public void testReadRowsApplicationLatencyWithManualFlowControl() throws Excepti getMetricData(metricReader, APPLICATION_BLOCKING_LATENCIES_NAME); Attributes expectedAttributes = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(TABLE_ID_KEY, TABLE) .put(ZONE_ID_KEY, ZONE) .put(CLUSTER_ID_KEY, CLUSTER) @@ -483,8 +522,7 @@ public void testRetryCount() throws InterruptedException { MetricData metricData = getMetricData(metricReader, RETRY_COUNT_NAME); Attributes expectedAttributes = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(TABLE_ID_KEY, TABLE) .put(ZONE_ID_KEY, ZONE) .put(CLUSTER_ID_KEY, CLUSTER) @@ -505,20 +543,18 @@ public void testMutateRowAttemptsTagValues() { MetricData metricData = getMetricData(metricReader, ATTEMPT_LATENCIES_NAME); Attributes expected1 = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(STATUS_KEY, "UNAVAILABLE") .put(TABLE_ID_KEY, TABLE) .put(ZONE_ID_KEY, "global") - .put(CLUSTER_ID_KEY, "unspecified") + .put(CLUSTER_ID_KEY, "") .put(METHOD_KEY, "Bigtable.MutateRow") .put(CLIENT_NAME_KEY, CLIENT_NAME) .put(STREAMING_KEY, false) .build(); Attributes expected2 = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(STATUS_KEY, "OK") .put(TABLE_ID_KEY, TABLE) .put(ZONE_ID_KEY, ZONE) @@ -546,8 +582,7 @@ public void testMutateRowsPartialError() throws InterruptedException { MetricData metricData = getMetricData(metricReader, ATTEMPT_LATENCIES_NAME); Attributes expected = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(STATUS_KEY, "OK") .put(TABLE_ID_KEY, TABLE) .put(ZONE_ID_KEY, ZONE) @@ -575,12 +610,11 @@ public void testMutateRowsRpcError() { MetricData metricData = getMetricData(metricReader, ATTEMPT_LATENCIES_NAME); Attributes expected = - baseAttributes - .toBuilder() + 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(CLUSTER_ID_KEY, "") .put(METHOD_KEY, "Bigtable.MutateRows") .put(CLIENT_NAME_KEY, CLIENT_NAME) .put(STREAMING_KEY, false) @@ -596,20 +630,18 @@ public void testReadRowsAttemptsTagValues() { MetricData metricData = getMetricData(metricReader, ATTEMPT_LATENCIES_NAME); Attributes expected1 = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(STATUS_KEY, "UNAVAILABLE") .put(TABLE_ID_KEY, TABLE) .put(ZONE_ID_KEY, "global") - .put(CLUSTER_ID_KEY, "unspecified") + .put(CLUSTER_ID_KEY, "") .put(METHOD_KEY, "Bigtable.ReadRows") .put(CLIENT_NAME_KEY, CLIENT_NAME) .put(STREAMING_KEY, true) .build(); Attributes expected2 = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(STATUS_KEY, "OK") .put(TABLE_ID_KEY, TABLE) .put(ZONE_ID_KEY, ZONE) @@ -638,8 +670,7 @@ public void testBatchBlockingLatencies() throws InterruptedException { MetricData applicationLatency = getMetricData(metricReader, CLIENT_BLOCKING_LATENCIES_NAME); Attributes expectedAttributes = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(TABLE_ID_KEY, TABLE) .put(ZONE_ID_KEY, ZONE) .put(CLUSTER_ID_KEY, CLUSTER) @@ -657,14 +688,15 @@ public void testBatchBlockingLatencies() throws InterruptedException { } @Test - public void testQueuedOnChannelServerStreamLatencies() { - stub.readRowsCallable().all().call(Query.create(TABLE)); + public void testQueuedOnChannelServerStreamLatencies() throws Exception { + ApiFuture> f = stub.readRowsCallable().all().futureCall(Query.create(TABLE)); + Duration proxyDelayPriorTest = delayProxyDetector.getCurrentDelayUsed(); + f.get(); MetricData clientLatency = getMetricData(metricReader, CLIENT_BLOCKING_LATENCIES_NAME); Attributes attributes = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(TABLE_ID_KEY, TABLE) .put(CLUSTER_ID_KEY, CLUSTER) .put(ZONE_ID_KEY, ZONE) @@ -672,20 +704,25 @@ public void testQueuedOnChannelServerStreamLatencies() { .put(CLIENT_NAME_KEY, CLIENT_NAME) .build(); - long value = getAggregatedValue(clientLatency, attributes); - assertThat(value).isAtLeast(CHANNEL_BLOCKING_LATENCY); + 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() { - - stub.mutateRowCallable().call(RowMutation.create(TABLE, "a-key").setCell("f", "q", "v")); + 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(); MetricData clientLatency = getMetricData(metricReader, CLIENT_BLOCKING_LATENCIES_NAME); Attributes attributes = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(TABLE_ID_KEY, TABLE) .put(CLUSTER_ID_KEY, CLUSTER) .put(ZONE_ID_KEY, ZONE) @@ -693,9 +730,11 @@ public void testQueuedOnChannelUnaryLatencies() { .put(CLIENT_NAME_KEY, CLIENT_NAME) .build(); - long expected = CHANNEL_BLOCKING_LATENCY * 2 / 3; - long actual = getAggregatedValue(clientLatency, attributes); - assertThat(actual).isAtLeast(expected); + 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 @@ -709,11 +748,10 @@ public void testPermanentFailure() { MetricData attemptLatency = getMetricData(metricReader, ATTEMPT_LATENCIES_NAME); Attributes expected = - baseAttributes - .toBuilder() + baseAttributes.toBuilder() .put(STATUS_KEY, "NOT_FOUND") .put(TABLE_ID_KEY, BAD_TABLE_ID) - .put(CLUSTER_ID_KEY, "unspecified") + .put(CLUSTER_ID_KEY, "") .put(ZONE_ID_KEY, "global") .put(STREAMING_KEY, true) .put(METHOD_KEY, "Bigtable.ReadRows") @@ -726,6 +764,53 @@ public void testPermanentFailure() { verifyAttributes(opLatency, expected); } + @Test + public void testRemainingDeadline() { + stub.readRowsCallable().all().call(Query.create(TABLE)); + MetricData deadlineMetric = getMetricData(metricReader, REMAINING_DEADLINE_NAME); + + Attributes retryAttributes = + baseAttributes.toBuilder() + .put(STATUS_KEY, "UNAVAILABLE") + .put(TABLE_ID_KEY, TABLE) + .put(METHOD_KEY, "Bigtable.ReadRows") + .put(ZONE_ID_KEY, "global") + .put(CLUSTER_ID_KEY, "") + .put(STREAMING_KEY, true) + .put(CLIENT_NAME_KEY, 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 = + 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(); + 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)); + } + private static class FakeService extends BigtableGrpc.BigtableImplBase { static List createFakeResponse() { @@ -756,6 +841,12 @@ static List createFakeResponse() { @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; @@ -839,4 +930,36 @@ public AtomicInteger getResponseCounter() { return responseCounter; } } + + 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 e) { + + } + 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/stub/metrics/CompositeTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracerTest.java index 11dd0b5095..71a4728f9f 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/stub/metrics/CompositeTracerTest.java @@ -15,6 +15,7 @@ */ package com.google.cloud.bigtable.data.v2.stub.metrics; +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; @@ -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 @@ -258,4 +270,11 @@ public void testRequestBlockedOnChannel() { verify(child3, times(1)).grpcChannelQueuedLatencies(5L); verify(child4, times(1)).grpcChannelQueuedLatencies(5L); } + + @Test + 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/stub/metrics/ErrorCountPerConnectionTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/ErrorCountPerConnectionTest.java index b34d21da17..94beeff6f7 100644 --- 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 @@ -28,8 +28,10 @@ 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.models.Row; import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; +import com.google.common.collect.Lists; import io.grpc.Server; import io.grpc.Status; import io.grpc.StatusRuntimeException; @@ -89,9 +91,9 @@ public void setup() throws Exception { SdkMeterProviderBuilder meterProvider = SdkMeterProvider.builder().registerMetricReader(metricReader); - for (Map.Entry entry : - BuiltinMetricsConstants.getAllViews().entrySet()) { - meterProvider.registerView(entry.getKey(), entry.getValue()); + for (Map.Entry e : + BuiltinMetricsConstants.getInternalViews().entrySet()) { + meterProvider.registerView(e.getKey(), e.getValue()); } OpenTelemetrySdk otel = @@ -103,7 +105,8 @@ public void setup() throws Exception { .setBackgroundExecutorProvider(FixedExecutorProvider.create(executors)) .setProjectId("fake-project") .setInstanceId("fake-instance") - .setMetricsProvider(CustomOpenTelemetryMetricsProvider.create(otel)); + .setMetricsProvider(NoopMetricsProvider.INSTANCE) + .setInternalMetricsProvider((ignored1, ignored2) -> otel); runnableCaptor = ArgumentCaptor.forClass(Runnable.class); when(executors.scheduleAtFixedRate(runnableCaptor.capture(), anyLong(), anyLong(), any())) @@ -131,7 +134,8 @@ public void readWithOneChannel() throws Exception { query = Query.create(SUCCESS_TABLE_NAME); } try { - stub.readRowsCallable().call(query).iterator().hasNext(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(stub.readRowsCallable().call(query)); } catch (Exception e) { // noop } @@ -159,17 +163,20 @@ public void readWithTwoChannels() throws Exception { builder.setTransportChannelProvider( ((InstantiatingGrpcChannelProvider) builder.getTransportChannelProvider()) .toBuilder() - .setChannelPoolSettings(ChannelPoolSettings.staticallySized(2)) - .build()); + .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(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(stub.readRowsCallable().call(Query.create(ERROR_TABLE_NAME))); } else { - stub.readRowsCallable().call(Query.create(SUCCESS_TABLE_NAME)).iterator().hasNext(); + ArrayList ignored = + Lists.newArrayList(stub.readRowsCallable().call(Query.create(SUCCESS_TABLE_NAME))); } } catch (Exception e) { // noop @@ -209,7 +216,8 @@ public void readOverTwoPeriods() throws Exception { query = Query.create(SUCCESS_TABLE_NAME); } try { - stub.readRowsCallable().call(query).iterator().hasNext(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(stub.readRowsCallable().call(query)); } catch (Exception e) { // noop } @@ -226,7 +234,8 @@ public void readOverTwoPeriods() throws Exception { errorCount2 += 1; } try { - stub.readRowsCallable().call(query).iterator().hasNext(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(stub.readRowsCallable().call(query)); } catch (Exception e) { // noop } @@ -254,7 +263,9 @@ 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(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(stub.readRowsCallable().call(Query.create(SUCCESS_TABLE_NAME))); } catch (Exception e) { // noop } 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/stub/metrics/MetricsTracerTest.java index d72eac4056..a9f3aa038b 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/stub/metrics/MetricsTracerTest.java @@ -38,6 +38,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.RowMutationEntry; +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.mutaterows.MutateRowsBatchingDescriptor; import com.google.common.base.Stopwatch; @@ -56,6 +57,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; @@ -120,11 +122,10 @@ public void setUp() throws Exception { .setAppProfileId(APP_PROFILE_ID) .build(); + BigtableClientContext bigtableClientContext = + EnhancedBigtableStub.createBigtableClientContext(settings.getStubSettings()); ClientContext clientContext = - EnhancedBigtableStub.createClientContext(settings.getStubSettings()); - clientContext = - clientContext - .toBuilder() + bigtableClientContext.getClientContext().toBuilder() .setTracerFactory( EnhancedBigtableStub.createBigtableTracerFactory( settings.getStubSettings(), @@ -162,7 +163,9 @@ public Object answer(InvocationOnMock invocation) throws Throwable { .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 = @@ -195,8 +198,12 @@ public Object answer(InvocationOnMock invocation) { .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("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID))); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored2 = + Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID))); long opLatency = StatsTestUtils.getAggregationValueAsLong( @@ -293,7 +300,9 @@ public Object answer(InvocationOnMock invocation) { .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( @@ -338,7 +347,9 @@ public Object answer(InvocationOnMock invocation) throws Throwable { .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 = 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..7c6f34bb26 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 @@ -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 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 ERROR_DETAILS_KEY = + Metadata.Key.of("grpc-status-details-bin", Metadata.BINARY_BYTE_MARSHALLER); @Rule public GrpcServerRule serverRule = new GrpcServerRule(); private TestBigtableService service; @@ -74,7 +87,8 @@ public void setUp() throws IOException { BigtableDataSettings.newBuilder() .setProjectId(PROJECT_ID) .setInstanceId(INSTANCE_ID) - .setCredentialsProvider(NoCredentialsProvider.create()); + .setCredentialsProvider(NoCredentialsProvider.create()) + .setMetricsProvider(NoopMetricsProvider.INSTANCE); settings .stubSettings() @@ -124,6 +138,203 @@ public void immediateRetryTest() { Truth.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())) + .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> rangeList; + 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)); + Truth.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)); + Truth.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")); + Truth.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")); + Truth.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")); + Truth.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")); + Truth.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")); + Truth.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)); + Truth.assertThat(actualResults).containsExactly("r6", "r5", "r4").inOrder(); + } + @Test public void multipleRetryTest() { service.expectations.add( @@ -299,6 +510,15 @@ private List getResults(Query query) { return actualValues; } + private List getSkipLargeRowsResults(Query query) { + List actualRowKeys = + client.skipLargeRowsCallable().all().call(query).stream() + .map(row -> row.getKey().toStringUtf8()) + .collect(Collectors.toList()); + + return actualRowKeys; + } + private static class TestBigtableService extends BigtableGrpc.BigtableImplBase { Queue expectations = new LinkedBlockingDeque<>(); int i = -1; @@ -336,6 +556,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 +580,58 @@ RpcExpectation expectRequest(String... keys) { return this; } + RpcExpectation expectRequestForMultipleRowRanges(List> rowRanges) { + RowSet.Builder rowRange = requestBuilder.getRowsBuilder(); + for (Range range : rowRanges) { + rowRangeBuilder(range); + } + return this; + } + + /** + * Build Row Range + * + * @param range + * @return + */ + 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/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 new file mode 100644 index 0000000000..9c960b4537 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallableTest.java @@ -0,0 +1,189 @@ +/* + * 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.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.SqlRow; +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; + +@RunWith(JUnit4.class) +public class ExecuteQueryCallableTest { + + private static final class FakePreparedStatement extends PreparedStatementImpl { + + public FakePreparedStatement() { + super( + PrepareResponse.fromProto(prepareResponse(metadata(columnMetadata("foo", stringType())))), + new HashMap<>(), + null, + null); + } + + @Override + public 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()))), + Collections.singletonList(stringValue("foo"))); + ServerStreamingStashCallable innerCallable = + new ServerStreamingStashCallable<>(Collections.singletonList(row)); + ExecuteQueryCallable callable = new ExecuteQueryCallable(innerCallable); + SqlServerStream stream = callable.call(PREPARED_STATEMENT.bind().build()); + + assertThat(stream.metadataFuture()) + .isEqualTo(innerCallable.getActualRequest().resultSetMetadataFuture()); + Iterator responseIterator = stream.rows().iterator(); + 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 (SqlRow sqlRow : 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..9d50544dfb --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryRetryTest.java @@ -0,0 +1,900 @@ +/* + * 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.time.Instant; +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()))) + // Refreshing channel doesn't work with FixedTransportChannelProvider + .setRefreshingChannel(false) + .build(); + // Remove log noise from client side metrics + settings.setMetricsProvider(NoopMetricsProvider.INSTANCE); + 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(300)) + .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(1000)) + .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/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..f1e214e10c --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/PlanRefreshingCallableTest.java @@ -0,0 +1,335 @@ +/* + * 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.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.ofMillis(5000); + 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 new file mode 100644 index 0000000000..e9f6bf09e6 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachineSubject.java @@ -0,0 +1,70 @@ +/* + * 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.common.truth.Truth.assertAbout; + +import com.google.cloud.bigtable.data.v2.internal.SqlRow; +import com.google.common.truth.FailureMetadata; +import com.google.common.truth.Subject; +import com.google.common.truth.Truth; +import java.util.ArrayDeque; +import java.util.Queue; +import javax.annotation.Nullable; + +/** Truth subject for {@link ProtoRowsMergingStateMachine}. Intended for ease-of-use in testing. */ +public final class ProtoRowsMergingStateMachineSubject extends Subject { + + private final ProtoRowsMergingStateMachine actual; + + private ProtoRowsMergingStateMachineSubject( + FailureMetadata metadata, @Nullable ProtoRowsMergingStateMachine actual) { + super(metadata, actual); + this.actual = actual; + } + + public static Factory + stateMachine() { + return ProtoRowsMergingStateMachineSubject::new; + } + + public static ProtoRowsMergingStateMachineSubject assertThat( + @Nullable ProtoRowsMergingStateMachine actual) { + return assertAbout(stateMachine()).that(actual); + } + + public void hasCompleteBatches(boolean expectation) { + if (expectation) { + check("hasCompleteBatch()").that(actual.hasCompleteBatches()).isTrue(); + } else { + check("hasCompleteBatch()").that(actual.hasCompleteBatches()).isFalse(); + } + } + + public void isBatchInProgress(boolean expectation) { + if (expectation) { + check("isBatchInProgress()").that(actual.isBatchInProgress()).isTrue(); + } else { + check("isBatchInProgress()").that(actual.isBatchInProgress()).isFalse(); + } + } + + public void populateQueueYields(SqlRow... expectedRows) { + Queue actualQueue = new ArrayDeque<>(); + actual.populateQueue(actualQueue); + Truth.assertThat(actualQueue).containsExactlyElementsIn(expectedRows); + } +} 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 new file mode 100644 index 0000000000..327e71e484 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachineTest.java @@ -0,0 +1,668 @@ +/* + * 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.ProtoRowsMergingStateMachineSubject.assertThat; +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.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.data.v2.internal.ProtoResultSetMetadata; +import com.google.cloud.bigtable.data.v2.internal.ProtoSqlRow; +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.Strings; +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; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; + +// Use enclosed runner so we can put parameterized and non-parameterized cases in the same test +// suite +@RunWith(Enclosed.class) +public final class ProtoRowsMergingStateMachineTest { + + public static final class IndividualTests { + @Test + public void stateMachine_hasCompleteBatches_falseWhenEmpty() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + assertThat(stateMachine).hasCompleteBatches(false); + } + + @Test + public void stateMachine_hasCompleteBatches_falseWhenAwaitingPartialBatch() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + stateMachine.addPartialResultSet( + partialResultSetWithoutToken(stringValue("foo")).getResults()); + assertThat(stateMachine).hasCompleteBatches(false); + } + + @Test + public void stateMachine_hasCompleteBatches_trueWhenAwaitingBatchConsume() { + ResultSetMetadata 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).hasCompleteBatches(true); + } + + @Test + public void stateMachine_isBatchInProgress_falseWhenEmpty() { + ResultSetMetadata 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()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + stateMachine.addPartialResultSet( + partialResultSetWithoutToken(stringValue("foo")).getResults()); + assertThat(stateMachine).isBatchInProgress(true); + } + + @Test + public void stateMachine_isBatchInProgress_trueWhenAwaitingBatchConsume() { + 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 stateMachine_consumeRow_throwsExceptionWhenColumnsArentComplete() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto( + 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( + IllegalStateException.class, () -> stateMachine.populateQueue(new ArrayDeque<>())); + } + + @Test + public void stateMachine_consumeRow_throwsExceptionWhenAwaitingPartialBatch() { + ResultSetMetadata 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()); + assertThrows( + IllegalStateException.class, () -> stateMachine.populateQueue(new ArrayDeque<>())); + } + + @Test + public void stateMachine_mergesPartialBatches() { + ResultSetMetadata metadata = + 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( + 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_mergesPartialBatches_withRandomChunks() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto( + metadata(columnMetadata("map", mapType(stringType(), bytesType())))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + Value mapVal = + mapValue( + mapElement( + stringValue(Strings.repeat("a", 10)), bytesValue(Strings.repeat("aVal", 100))), + mapElement(stringValue("b"), bytesValue(Strings.repeat("bVal", 100)))); + ProtoRows rows = ProtoRows.newBuilder().addValues(mapVal).build(); + ByteString chunk1 = rows.toByteString().substring(0, 100); + ByteString chunk2 = rows.toByteString().substring(100); + + stateMachine.addPartialResultSet( + PartialResultSet.newBuilder() + .setProtoRowsBatch(ProtoRowsBatch.newBuilder().setBatchData(chunk1).build()) + .build()); + stateMachine.addPartialResultSet( + PartialResultSet.newBuilder() + .setResumeToken(ByteString.copyFromUtf8("token")) + .setProtoRowsBatch(ProtoRowsBatch.newBuilder().setBatchData(chunk2).build()) + .setBatchChecksum(checksum(rows.toByteString())) + .build()); + + assertThat(stateMachine) + .populateQueueYields(ProtoSqlRow.create(metadata, ImmutableList.of(mapVal))); + } + + @Test + public void stateMachine_reconstructsRowWithMultipleColumns() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto( + 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()); + Value bytesVal = bytesValue("bytes"); + stateMachine.addPartialResultSet(partialResultSetWithoutToken(bytesVal).getResults()); + Value arrayVal = arrayValue(stringValue("foo"), stringValue("bar")); + stateMachine.addPartialResultSet(partialResultSetWithoutToken(arrayVal).getResults()); + Value mapVal = + mapValue( + mapElement(stringValue("a"), bytesValue("aVal")), + mapElement(stringValue("b"), bytesValue("bVal"))); + stateMachine.addPartialResultSet(partialResultSetWithToken(mapVal).getResults()); + + 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).hasCompleteBatches(false); + assertThrows( + IllegalStateException.class, () -> stateMachine.populateQueue(new ArrayDeque<>())); + assertThat(stateMachine).isBatchInProgress(false); + } + + @Test + public void stateMachine_throwsExceptionWhenValuesDontMatchSchema() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto( + metadata(columnMetadata("a", stringType()), columnMetadata("b", bytesType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + + // values in wrong order + stateMachine.addPartialResultSet( + partialResultSetWithToken(bytesValue("test"), stringValue("test")).getResults()); + assertThrows( + IllegalStateException.class, () -> stateMachine.populateQueue(new ArrayDeque<>())); + } + + @Test + public void stateMachine_handlesResumeTokenWithNoValues() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + + stateMachine.addPartialResultSet(partialResultSetWithToken().getResults()); + assertThat(stateMachine).populateQueueYields(new ProtoSqlRow[] {}); + } + + @Test + public void stateMachine_handlesResumeTokenWithOpenBatch() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + + stateMachine.addPartialResultSet( + partialResultSetWithoutToken(stringValue("test")).getResults()); + stateMachine.addPartialResultSet( + tokenOnlyResultSet(ByteString.copyFromUtf8("token")).getResults()); + assertThat(stateMachine) + .populateQueueYields(ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("test")))); + } + + @Test + public void addPartialResultSet_throwsExceptionWhenAwaitingRowConsume() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + stateMachine.addPartialResultSet(partialResultSetWithToken(stringValue("test")).getResults()); + + assertThrows( + IllegalStateException.class, + () -> + 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) + public static final class ParameterizedTests { + + public ParameterizedTests(SqlType.Code typeCode) { + this.typeCase = typeCode; + } + + private final SqlType.Code typeCase; + + @Parameters + public static SqlType.Code[] valueTypes() { + return SqlType.Code.values(); + } + + @Test + @SuppressWarnings("UnnecessaryDefaultInEnumSwitch") + public void testValidateSupportsAllTypes() { + switch (typeCase) { + case STRING: + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.string(), bytesValue("test"))); + break; + case BYTES: + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.bytes(), stringValue("test"))); + break; + case INT64: + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.int64(), stringValue("test"))); + break; + case BOOL: + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.bool(), stringValue("test"))); + break; + case FLOAT32: + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.float32(), stringValue("test"))); + break; + case FLOAT64: + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.float64(), stringValue("test"))); + break; + case TIMESTAMP: + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.timestamp(), stringValue("test"))); + break; + case DATE: + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.date(), stringValue("test"))); + break; + case ARRAY: + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.arrayOf(SqlType.string()), stringValue("test"))); + // It should check nested values match + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.arrayOf(SqlType.string()), + arrayValue(stringValue("test"), bytesValue("test")))); + break; + case STRUCT: + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.fromProto(structType(stringType(), bytesType())), + stringValue("test"))); + // It should check nested values match + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.fromProto(structType(stringType(), bytesType())), + structValue(stringValue("test"), stringValue("test")))); + break; + case MAP: + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.mapOf(SqlType.string(), SqlType.string()), stringValue("test"))); + // It should check nested values match + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.mapOf(SqlType.string(), SqlType.bytes()), + mapValue( + mapElement(stringValue("key"), bytesValue("val")), + mapElement(stringValue("key2"), stringValue("val2"))))); + // It should check all map elements contain only one key and one value because map + // elements + // are represented as structs which are represented as an array of fields. + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + SqlType.mapOf(SqlType.string(), SqlType.bytes()), + mapValue( + mapElement(stringValue("key"), bytesValue("val")), + structValue( + stringValue("key2"), bytesValue("val2"), bytesValue("val3"))))); + break; + default: + assertWithMessage( + "Unknown TypeCase " + + typeCase.name() + + " 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 new file mode 100644 index 0000000000..25858cd9f7 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlProtoFactory.java @@ -0,0 +1,619 @@ +/* + * 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.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; +import com.google.bigtable.v2.ResultSetMetadata; +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(); + } + + public static Type stringType() { + return Type.newBuilder().setStringType(Type.String.getDefaultInstance()).build(); + } + + public static Type bytesType() { + return Type.newBuilder().setBytesType(Type.Bytes.getDefaultInstance()).build(); + } + + public static Type int64Type() { + return Type.newBuilder().setInt64Type(Type.Int64.getDefaultInstance()).build(); + } + + public static Type boolType() { + return Type.newBuilder().setBoolType(Type.Bool.getDefaultInstance()).build(); + } + + public static Type float32Type() { + return Type.newBuilder().setFloat32Type(Type.Float32.getDefaultInstance()).build(); + } + + public static Type float64Type() { + return Type.newBuilder().setFloat64Type(Type.Float64.getDefaultInstance()).build(); + } + + public static Type timestampType() { + return Type.newBuilder().setTimestampType(Type.Timestamp.getDefaultInstance()).build(); + } + + public static Type dateType() { + return Type.newBuilder().setDateType(Type.Date.getDefaultInstance()).build(); + } + + public static Type aggregateSumType() { + return Type.newBuilder() + .setAggregateType( + Type.Aggregate.newBuilder().setSum(Type.Aggregate.Sum.getDefaultInstance())) + .build(); + } + + public static Type arrayType(Type elementType) { + return Type.newBuilder() + .setArrayType(Type.Array.newBuilder().setElementType(elementType).build()) + .build(); + } + + public static Type structType(Type... fieldTypes) { + Field[] fields = new Field[fieldTypes.length]; + for (int i = 0; i < fieldTypes.length; i++) { + fields[i] = Type.Struct.Field.newBuilder().setType(fieldTypes[i]).build(); + } + return structType(fields); + } + + public static Type structType(Field... fields) { + return Type.newBuilder() + .setStructType(Type.Struct.newBuilder().addAllFields(Arrays.asList(fields)).build()) + .build(); + } + + public static Field structField(String name, Type type) { + return Type.Struct.Field.newBuilder().setFieldName(name).setType(type).build(); + } + + public static Type mapType(Type keyType, Type valueType) { + return Type.newBuilder() + .setMapType(Type.Map.newBuilder().setKeyType(keyType).setValueType(valueType).build()) + .build(); + } + + public static Value nullValue() { + return Value.newBuilder().build(); + } + + public static Value stringValue(String contents) { + return Value.newBuilder().setStringValue(contents).build(); + } + + public static Value bytesValue(String contents) { + return Value.newBuilder().setBytesValue(ByteString.copyFromUtf8(contents)).build(); + } + + public static Value int64Value(long data) { + return Value.newBuilder().setIntValue(data).build(); + } + + public static Value floatValue(double data) { + return Value.newBuilder().setFloatValue(data).build(); + } + + public static Value boolValue(boolean data) { + return Value.newBuilder().setBoolValue(data).build(); + } + + public static Value timestampValue(long seconds, int nanos) { + return Value.newBuilder() + .setTimestampValue(Timestamp.newBuilder().setSeconds(seconds).setNanos(nanos).build()) + .build(); + } + + public static Value dateValue(int year, int month, int day) { + return Value.newBuilder() + .setDateValue(Date.newBuilder().setYear(year).setMonth(month).setDay(day).build()) + .build(); + } + + public static Value arrayValue(Value... elements) { + return Value.newBuilder() + .setArrayValue(ArrayValue.newBuilder().addAllValues(Arrays.asList(elements))) + .build(); + } + + public static Value structValue(Value... fields) { + return arrayValue(fields); + } + + public static Value mapValue(Value... elements) { + return arrayValue(elements); + } + + public static Value mapElement(Value... fields) { + return structValue(fields); + } + + /** Creates a single response representing a complete batch, with no token */ + public static ExecuteQueryResponse partialResultSetWithoutToken(Value... values) { + 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 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) { + return ExecuteQueryResponse.newBuilder() + .setResults(PartialResultSet.newBuilder().setResumeToken(token)) + .build(); + } + + /** + * 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(); + 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; + private Map> paramTypes; + + public FakePreparedStatement() { + super(DEFAULT_INITIAL_RESPONSE, new HashMap<>(), null, null); + this.initialPlan = DEFAULT_INITIAL_PLAN; + this.planOnRefresh = DEFAULT_PLAN_ON_REFRESH; + this.paramTypes = new HashMap<>(); + } + + 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; + this.paramTypes = paramTypes; + } + + 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 PreparedQueryData markExpiredAndStartRefresh( + PreparedQueryVersion expiredPreparedQueryVersion) { + return planOnRefresh; + } + + @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 new file mode 100644 index 0000000000..cb2c068939 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlProtoFactoryTest.java @@ -0,0 +1,62 @@ +/* + * 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.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; +import com.google.protobuf.ByteString; +import com.google.protobuf.InvalidProtocolBufferException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public final class SqlProtoFactoryTest { + + @Test + public void serializedProtoRows_canRoundTrip() throws InvalidProtocolBufferException { + ExecuteQueryResponse response = + partialResultSetWithToken( + SqlProtoFactory.stringValue("string"), SqlProtoFactory.bytesValue("bytes")); + PartialResultSet results = response.getResults(); + + assertThat(results.getResumeToken()).isEqualTo(ByteString.copyFromUtf8("test")); + ProtoRows protoRows = ProtoRows.parseFrom(results.getProtoRowsBatch().getBatchData()); + assertThat(protoRows.getValuesCount()).isEqualTo(2); + assertThat(protoRows.getValuesList().get(0).getStringValue()).isEqualTo("string"); + 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/SqlRowMergerSubject.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergerSubject.java new file mode 100644 index 0000000000..6a6f2bc1d0 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergerSubject.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.stub.sql; + +import static com.google.common.truth.Truth.assertAbout; + +import com.google.common.truth.FailureMetadata; +import com.google.common.truth.Subject; +import javax.annotation.Nullable; + +/** Truth subject for {@link SqlRowMerger}. Intended for ease-of-use in testing. */ +final class SqlRowMergerSubject extends Subject { + + private final @Nullable SqlRowMerger actual; + + private SqlRowMergerSubject(FailureMetadata metadata, @Nullable SqlRowMerger actual) { + super(metadata, actual); + this.actual = actual; + } + + public static Factory sqlRowMerger() { + return SqlRowMergerSubject::new; + } + + public static SqlRowMergerSubject assertThat(@Nullable SqlRowMerger actual) { + return assertAbout(sqlRowMerger()).that(actual); + } + + public void hasPartialFrame(boolean expectation) { + if (expectation) { + check("hasPartialFrame()").that(actual.hasPartialFrame()).isTrue(); + } else { + check("hasPartialFrame()").that(actual.hasPartialFrame()).isFalse(); + } + } + + public void hasFullFrame(boolean expectation) { + if (expectation) { + check("hasFullFrame()").that(actual.hasFullFrame()).isTrue(); + } else { + check("hasFullFrame()").that(actual.hasFullFrame()).isFalse(); + } + } +} 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 new file mode 100644 index 0000000000..d61d9d5f20 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergerTest.java @@ -0,0 +1,323 @@ +/* + * 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.internal.SqlRowSubject.assertThat; +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.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.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.tokenOnlyResultSet; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlRowMergerSubject.assertThat; +import static org.junit.Assert.assertThrows; + +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; +import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; +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; + +@RunWith(JUnit4.class) +public class SqlRowMergerTest { + + static Supplier toSupplier( + com.google.bigtable.v2.ResultSetMetadata metadataProto) { + return () -> ProtoResultSetMetadata.fromProto(metadataProto); + } + + @Test + public void sqlRowMerger_handlesEmptyState() { + 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() { + 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_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_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() { + 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() { + 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")))); + } + + @Test + public void hasFullFrame_trueWithFullRow() { + 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); + } + + @Test + public void hasFullFrame_falseWithIncompleteBatch() { + 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() { + 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 = { + // first response + stringValue("test"), + bytesValue("bytes"), + arrayValue(stringValue("foo"), stringValue("bar")), + mapValue(mapElement(stringValue("key"), bytesValue("bytes"))), + stringValue("test2"), + // second response + bytesValue("bytes2"), + arrayValue(stringValue("foo2"), stringValue("bar2")), + mapValue(mapElement(stringValue("key2"), bytesValue("bytes2"))), + stringValue("test3"), + bytesValue("bytes3"), + arrayValue(stringValue("foo3"), stringValue("bar3")), + mapValue(mapElement(stringValue("key3"), bytesValue("bytes3"))) + }; + merger.push(partialResultSetWithoutToken(Arrays.copyOf(values, 5))); + merger.push(partialResultSetWithToken(Arrays.copyOfRange(values, 5, 12))); + assertThat(merger.pop()) + .isEqualTo(ProtoSqlRow.create(metadata, ImmutableList.copyOf(Arrays.copyOf(values, 4)))); + assertThat(merger.pop()) + .isEqualTo( + ProtoSqlRow.create(metadata, ImmutableList.copyOf(Arrays.copyOfRange(values, 4, 8)))); + assertThat(merger.pop()) + .isEqualTo( + ProtoSqlRow.create(metadata, ImmutableList.copyOf(Arrays.copyOfRange(values, 8, 12)))); + } + + @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_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"))); + + assertThat(merger).hasPartialFrame(true); + assertThat(merger).hasFullFrame(true); + assertThat(merger.pop()) + .isEqualTo( + ProtoSqlRow.create( + metadata, ImmutableList.of(stringValue("test"), bytesValue("test")))); + } + + @Test + public void sqlRowMerger_handlesTokensWithNoData() { + 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"))); + + assertThat(merger).hasPartialFrame(false); + assertThat(merger).hasFullFrame(false); + } + + @Test + public void sqlRowMerger_handlesLeadingTokens() { + 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"))); + + assertThat(merger).hasPartialFrame(true); + assertThat(merger).hasFullFrame(true); + assertThat(merger.pop()) + .isEqualTo( + ProtoSqlRow.create( + metadata, ImmutableList.of(stringValue("test"), bytesValue("test")))); + } + + @Test + public void addValue_failsOnMetadataResponse() { + com.google.bigtable.v2.ResultSetMetadata metadataProto = + metadata(columnMetadata("str", stringType())); + SqlRowMerger merger = new SqlRowMerger(toSupplier(metadataProto)); + + ExecuteQueryResponse deprecatedMetadataResponse = + ExecuteQueryResponse.newBuilder().setMetadata(metadataProto).build(); + assertThrows(IllegalStateException.class, () -> merger.push(deprecatedMetadataResponse)); + } + + @Test + public void pop_failsWhenQueueIsEmpty() { + 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 new file mode 100644 index 0000000000..fd6f0e2302 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergingCallableTest.java @@ -0,0 +1,143 @@ +/* + * 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.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; +import static org.junit.Assert.assertThrows; + +import com.google.api.core.SettableApiFuture; +import com.google.api.gax.rpc.ServerStream; +import com.google.bigtable.v2.ExecuteQueryResponse; +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; +import org.junit.runners.JUnit4; + +/** + * We have much more extensive testing of the row merging in {@link + * com.google.cloud.bigtable.data.v2.stub.sql.SqlRowMergerTest}. The Callable is a simple wrapper + * around this, so we don't need to duplicate all of the tests. + */ +@RunWith(JUnit4.class) +public class SqlRowMergingCallableTest { + + @Test + public void testMerging() throws ExecutionException, InterruptedException { + ServerStreamingStashCallable inner = + new ServerStreamingStashCallable<>( + Lists.newArrayList( + 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(callContext(boundStatement, mdFuture)); + List resultsList = results.stream().collect(Collectors.toList()); + assertThat(resultsList) + .containsExactly( + ProtoSqlRow.create( + metadata, + Arrays.asList( + stringValue("foo"), + int64Value(1), + arrayValue(stringValue("foo"), stringValue("bar")))), + ProtoSqlRow.create( + metadata, Arrays.asList(stringValue("test"), int64Value(10), arrayValue()))); + } + + @Test + 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(ExecuteQueryResponse.getDefaultInstance())); + + SqlRowMergingCallable rowMergingCallable = new SqlRowMergingCallable(inner); + 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..28d5a43738 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolSettingsTest.java @@ -0,0 +1,103 @@ +/* + * 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 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; + +@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 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/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/test_helpers/env/AbstractTestEnv.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/AbstractTestEnv.java index fd363099d9..5e6244efbe 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 @@ -51,8 +51,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) 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..0d72c66c45 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 @@ -27,7 +27,6 @@ import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.BigtableDataSettings; 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 +42,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 +61,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 +79,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"; @@ -92,12 +92,12 @@ public boolean apply(InetSocketAddress input) { private final String projectId; private final String instanceId; private final String tableId; - private final String tracingCookie; 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,9 +107,11 @@ 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), + getOptionalProperty(APP_PROFILE_PROPERTY_NAME), getRequiredProperty(TABLE_PROPERTY_NAME), getOptionalProperty(TRACING_COOKIE_PROPERTY_NAME)); } @@ -117,15 +119,17 @@ static CloudEnv fromSystemProperties() { private CloudEnv( @Nullable String dataEndpoint, @Nullable String adminEndpoint, + @Nullable String jwtAudienceOverride, @Nullable String kmsKeyName, String projectId, String instanceId, + @Nullable String appProfileId, String 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 +137,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()); @@ -193,6 +203,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 +224,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 +272,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.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 +336,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; 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..0c6262bd9b 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,7 @@ 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.stub.metrics.NoopMetricsProvider; import com.google.cloud.bigtable.emulator.v2.Emulator; import com.google.common.base.Strings; import java.io.IOException; @@ -62,6 +63,7 @@ void start() throws Exception { .setProjectId("fake-project") .setInstanceId("fake-instance") .setRefreshingChannel(false) + .setMetricsProvider(NoopMetricsProvider.INSTANCE) .build(); dataClient = BigtableDataClient.create(dataSettings); @@ -119,11 +121,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; 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..6e173d6d78 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()); 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 3b2ebb151c..47d6b6ddf9 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,29 +24,23 @@ 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.Table; import com.google.cloud.bigtable.admin.v2.models.UpdateAuthorizedViewRequest; -import com.google.common.base.Joiner; -import com.google.common.base.Preconditions; -import com.google.common.base.Strings; +import com.google.cloud.bigtable.admin.v2.models.UpdateTableRequest; import com.google.common.collect.ImmutableSet; import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; +import java.time.Instant; +import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.concurrent.ExecutionException; -import java.util.logging.FileHandler; import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.Logger; -import java.util.logging.SimpleFormatter; 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. @@ -107,8 +101,6 @@ protected void before(Description description) throws Throwable { .that(System.getenv()) .doesNotContainKey(BIGTABLE_EMULATOR_HOST_ENV_VAR); - configureLogging(description); - switch (env) { case "emulator": testEnv = EmulatorEnv.createBundled(); @@ -119,39 +111,13 @@ 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(); } - private void configureLogging(Description description) throws IOException { - if (!BIGTABLE_ENABLE_VERBOSE_GRPC_LOGS) { - return; - } - Preconditions.checkState( - !Strings.isNullOrEmpty(BIGTABLE_GRPC_LOG_DIR), - "The property " - + BIGTABLE_GRPC_LOG_DIR - + " must be set when verbose grpc logs are enabled"); - - Files.createDirectories(Paths.get(BIGTABLE_GRPC_LOG_DIR)); - - String basename = - Joiner.on("-").useForNull("").join(description.getClassName(), description.getMethodName()); - Path logPath = Paths.get(BIGTABLE_GRPC_LOG_DIR, basename + ".log"); - - grpcLogHandler = new FileHandler(logPath.toString()); - grpcLogHandler.setFormatter(new SimpleFormatter()); - grpcLogHandler.setLevel(Level.ALL); - - for (String grpcLoggerName : GRPC_LOGGER_NAMES) { - Logger logger = Logger.getLogger(grpcLoggerName); - logger.setLevel(Level.ALL); - logger.addHandler(grpcLogHandler); - } - } - private void after() { try { cleanUpStale(); @@ -215,8 +181,19 @@ private void cleanupStaleTables(String stalePrefix) { } 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() diff --git a/google-cloud-bigtable/src/test/resources/logging-verbose.properties b/google-cloud-bigtable/src/test/resources/logging-verbose.properties new file mode 100644 index 0000000000..58e1b79ef6 --- /dev/null +++ b/google-cloud-bigtable/src/test/resources/logging-verbose.properties @@ -0,0 +1,11 @@ +# Verbose logging configuration used by enable-verbose-grpc-logs profile. +handlers= java.util.logging.ConsoleHandler +.level= FINEST + +# hide "Connecting to the Bigtable emulator at localhost:XXXX" lines +com.google.cloud.bigtable.data.v2.BigtableDataSettings.level=WARNING +java.util.logging.ConsoleHandler.level = FINEST + +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter +# [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 9da2fe4900..e181b45a01 100644 --- a/google-cloud-bigtable/src/test/resources/logging.properties +++ b/google-cloud-bigtable/src/test/resources/logging.properties @@ -1,17 +1,12 @@ handlers= java.util.logging.ConsoleHandler .level= INFO +# hide "Connecting to the Bigtable emulator at localhost:XXXX" lines +com.google.cloud.bigtable.data.v2.BigtableDataSettings.level=WARNING java.util.logging.ConsoleHandler.level = INFO -java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter - -# Example to customize the SimpleFormatter output format -# to print one-line log message like this: -# : [] -# -#java.util.logging.SimpleFormatter.format=%4$s: %5$s [%1$tc]%n +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 + -# hide "Connecting to the Bigtable emulator at localhost:XXXX" lines -com.google.cloud.bigtable.data.v2.BigtableDataSettings.level=WARNING 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 4d513e2285..1c37843e27 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.40.1-SNAPSHOT + 2.65.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.40.1-SNAPSHOT + 2.65.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.40.1-SNAPSHOT + 2.65.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..c3602811f0 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 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. @@ -970,49 +970,1044 @@ private BigtableInstanceAdminGrpc() {} return getListHotTabletsMethod; } - /** 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 = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BigtableInstanceAdminStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BigtableInstanceAdminStub(channel, callOptions); - } - }; - return BigtableInstanceAdminStub.newStub(factory, channel); + 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; } - /** - * 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); + 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 = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BigtableInstanceAdminStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BigtableInstanceAdminStub(channel, callOptions); + } + }; + 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 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); + /** + * 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 { + + @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 +2015,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 +2039,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 +2055,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 +2071,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 +2090,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 +2107,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 +2123,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 +2144,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,234 +2160,406 @@ 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); + } + + /** + * + * + *
    +     * 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); + } + + /** + * + * + *
    +     * 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.
    +     * 
    + */ + 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); + } + + /** + * + * + *
    +     * 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.
    +     * 
    + */ + 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); + } + + /** + * + * + *
    +     * 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); + } + + /** + * + * + *
    +     * 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); + } + + /** + * + * + *
    +     * 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); + } + + /** + * + * + *
    +     * 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); + } + + /** + * + * + *
    +     * 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); + } + + /** + * + * + *
    +     * 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); } /** * * *
    -     * Lists information about clusters in an instance.
    +     * 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 listClusters( - com.google.bigtable.admin.v2.ListClustersRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListClustersMethod(), responseObserver); + 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); } /** * * *
    -     * 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.
    +     * Sets the access control policy on an instance resource. Replaces any
    +     * existing policy.
          * 
    */ - default void updateCluster( - com.google.bigtable.admin.v2.Cluster request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateClusterMethod(), responseObserver); + 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); } /** * * *
    -     * 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.
    +     * Returns permissions that the caller has on the specified instance resource.
          * 
    */ - default void partialUpdateCluster( - com.google.bigtable.admin.v2.PartialUpdateClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getPartialUpdateClusterMethod(), responseObserver); + 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); } /** * * *
    -     * Deletes a cluster from an instance.
    +     * Lists hot tablets in a cluster, within the time range provided. Hot
    +     * tablets are ordered based on CPU usage.
          * 
    */ - default void deleteCluster( - com.google.bigtable.admin.v2.DeleteClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteClusterMethod(), responseObserver); + 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); } /** * * *
    -     * Creates an app profile within an instance.
    +     * Creates a logical view 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); + 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); } /** * * *
    -     * Gets information about an app profile.
    +     * Gets information about a logical view.
          * 
    */ - default void getAppProfile( - com.google.bigtable.admin.v2.GetAppProfileRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetAppProfileMethod(), responseObserver); + 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 app profiles in an instance.
    +     * Lists information about logical views in an instance.
          * 
    */ - default void listAppProfiles( - com.google.bigtable.admin.v2.ListAppProfilesRequest request, - io.grpc.stub.StreamObserver + public void listLogicalViews( + com.google.bigtable.admin.v2.ListLogicalViewsRequest request, + io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListAppProfilesMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListLogicalViewsMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
    -     * Updates an app profile within an instance.
    +     * Updates a logical view within an instance.
          * 
    */ - default void updateAppProfile( - com.google.bigtable.admin.v2.UpdateAppProfileRequest request, + public void updateLogicalView( + com.google.bigtable.admin.v2.UpdateLogicalViewRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateAppProfileMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateLogicalViewMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
    -     * Deletes an app profile from an instance.
    +     * Deletes a logical view from an instance.
          * 
    */ - default void deleteAppProfile( - com.google.bigtable.admin.v2.DeleteAppProfileRequest request, + public void deleteLogicalView( + com.google.bigtable.admin.v2.DeleteLogicalViewRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteAppProfileMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteLogicalViewMethod(), getCallOptions()), + request, + 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.
    +     * Creates a materialized view within an instance.
          * 
    */ - default void getIamPolicy( - com.google.iam.v1.GetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetIamPolicyMethod(), responseObserver); + 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); } /** * * *
    -     * Sets the access control policy on an instance resource. Replaces any
    -     * existing policy.
    +     * Gets information about a materialized view.
          * 
    */ - default void setIamPolicy( - com.google.iam.v1.SetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getSetIamPolicyMethod(), responseObserver); + 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); } /** * * *
    -     * Returns permissions that the caller has on the specified instance resource.
    +     * Lists information about materialized views in an instance.
          * 
    */ - default void testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request, - io.grpc.stub.StreamObserver + public void listMaterializedViews( + com.google.bigtable.admin.v2.ListMaterializedViewsRequest request, + io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getTestIamPermissionsMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMaterializedViewsMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
    -     * Lists hot tablets in a cluster, within the time range provided. Hot
    -     * tablets are ordered based on CPU usage.
    +     * Updates a materialized view within an instance.
          * 
    */ - default void listHotTablets( - com.google.bigtable.admin.v2.ListHotTabletsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListHotTabletsMethod(), responseObserver); + 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); } - } - - /** - * 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 { - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return BigtableInstanceAdminGrpc.bindService(this); + /** + * + * + *
    +     * 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 +2567,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); } /** @@ -1400,13 +2592,10 @@ protected BigtableInstanceAdminStub build( * 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); + public com.google.longrunning.Operation createInstance( + com.google.bigtable.admin.v2.CreateInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateInstanceMethod(), getCallOptions(), request); } /** @@ -1416,13 +2605,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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInstanceMethod(), getCallOptions(), request); } /** @@ -1432,14 +2618,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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInstancesMethod(), getCallOptions(), request); } /** @@ -1451,13 +2633,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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateInstanceMethod(), getCallOptions(), request); } /** @@ -1468,13 +2647,10 @@ 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPartialUpdateInstanceMethod(), getCallOptions(), request); } /** @@ -1484,13 +2660,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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); } /** @@ -1505,13 +2678,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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateClusterMethod(), getCallOptions(), request); } /** @@ -1521,11 +2691,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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetClusterMethod(), getCallOptions(), request); } /** @@ -1535,14 +2704,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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListClustersMethod(), getCallOptions(), request); } /** @@ -1555,13 +2720,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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateClusterMethod(), getCallOptions(), request); } /** @@ -1580,13 +2742,10 @@ 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPartialUpdateClusterMethod(), getCallOptions(), request); } /** @@ -1596,13 +2755,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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteClusterMethod(), getCallOptions(), request); } /** @@ -1612,13 +2768,10 @@ 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAppProfileMethod(), getCallOptions(), request); } /** @@ -1644,14 +2794,10 @@ 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAppProfilesMethod(), getCallOptions(), request); } /** @@ -1661,13 +2807,10 @@ 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAppProfileMethod(), getCallOptions(), request); } /** @@ -1677,13 +2820,10 @@ 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAppProfileMethod(), getCallOptions(), request); } /** @@ -1694,13 +2834,9 @@ 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); } /** @@ -1711,13 +2847,9 @@ 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); } /** @@ -1727,37 +2859,159 @@ 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + 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); } /** * * *
    -     * 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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 +3330,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 +3792,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 +3949,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 +4091,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 +4293,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 +4428,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 7620d7e496..99ae3a8858 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 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. @@ -1374,6 +1374,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 +1618,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 */ @@ -1834,7 +2078,7 @@ default void listBackups( * 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.RestoreTableMetadata]. The + * [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The * [response][google.longrunning.Operation.response] type is * [Table][google.bigtable.admin.v2.Table], if successful. *
    @@ -1864,7 +2108,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 +2124,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 +2139,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 +2150,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); + } } /** @@ -2402,7 +2717,7 @@ public void listBackups( * 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.RestoreTableMetadata]. The + * [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The * [response][google.longrunning.Operation.response] type is * [Table][google.bigtable.admin.v2.Table], if successful. * @@ -2435,7 +2750,7 @@ public 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.
          * 
    @@ -2453,7 +2768,7 @@ public 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.
          * 
    */ @@ -2470,7 +2785,7 @@ public 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.
          * 
    */ @@ -2483,6 +2798,87 @@ public void testIamPermissions( 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); + } } /** @@ -2494,17 +2890,17 @@ public void testIamPermissions( * the tables. * */ - public static final class BigtableTableAdminBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private BigtableTableAdminBlockingStub( + 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 BigtableTableAdminBlockingStub build( + protected BigtableTableAdminBlockingV2Stub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BigtableTableAdminBlockingStub(channel, callOptions); + return new BigtableTableAdminBlockingV2Stub(channel, callOptions); } /** @@ -2887,7 +3283,7 @@ public com.google.bigtable.admin.v2.ListBackupsResponse listBackups( * 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.RestoreTableMetadata]. The + * [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The * [response][google.longrunning.Operation.response] type is * [Table][google.bigtable.admin.v2.Table], if successful. * @@ -2916,7 +3312,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 +3326,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 +3339,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,10 +3348,609 @@ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); } - } - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service BigtableTableAdmin. + /** + * + * + *
    +     * 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); + } + } + + /** + * A stub to allow clients to do limited 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 BigtableTableAdminBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private BigtableTableAdminBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BigtableTableAdminBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BigtableTableAdminBlockingStub(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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTableMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Updates a specified table.
    +     * 
    + */ + public com.google.longrunning.Operation updateTable( + com.google.bigtable.admin.v2.UpdateTableRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUndeleteTableMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Creates a new AuthorizedView in a table.
    +     * 
    + */ + public com.google.longrunning.Operation createAuthorizedView( + com.google.bigtable.admin.v2.CreateAuthorizedViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAuthorizedViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Updates an AuthorizedView in a table.
    +     * 
    + */ + public com.google.longrunning.Operation updateAuthorizedView( + com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAuthorizedViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Permanently deletes a specified AuthorizedView.
    +     * 
    + */ + public com.google.protobuf.Empty deleteAuthorizedView( + com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSnapshotMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * 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 com.google.longrunning.Operation createBackup( + com.google.bigtable.admin.v2.CreateBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Gets metadata on a pending or completed Cloud Bigtable Backup.
    +     * 
    + */ + public com.google.bigtable.admin.v2.Backup getBackup( + com.google.bigtable.admin.v2.GetBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Updates a pending or completed Cloud Bigtable Backup.
    +     * 
    + */ + public com.google.bigtable.admin.v2.Backup updateBackup( + com.google.bigtable.admin.v2.UpdateBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Deletes a pending or completed Cloud Bigtable backup.
    +     * 
    + */ + public com.google.protobuf.Empty deleteBackup( + com.google.bigtable.admin.v2.DeleteBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Lists Cloud Bigtable backups. Returns both completed and pending
    +     * backups.
    +     * 
    + */ + public com.google.bigtable.admin.v2.ListBackupsResponse listBackups( + com.google.bigtable.admin.v2.ListBackupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBackupsMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * 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 com.google.longrunning.Operation restoreTable( + com.google.bigtable.admin.v2.RestoreTableRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRestoreTableMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Copy a Cloud Bigtable backup to a new backup in the destination cluster
    +     * located in the destination instance and project.
    +     * 
    + */ + public com.google.longrunning.Operation copyBackup( + com.google.bigtable.admin.v2.CopyBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCopyBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * 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 com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Sets the access control policy on a Bigtable resource.
    +     * Replaces any existing policy.
    +     * 
    + */ + public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Returns permissions that the caller has on the specified Bigtable
    +     * resource.
    +     * 
    + */ + public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request) { + 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); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service BigtableTableAdmin. * *
        * Service for creating, configuring, and deleting Cloud Bigtable tables.
    @@ -3364,7 +4359,7 @@ protected BigtableTableAdminFutureStub build(
          * 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.RestoreTableMetadata].  The
    +     * [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata].  The
          * [response][google.longrunning.Operation.response] type is
          * [Table][google.bigtable.admin.v2.Table], if successful.
          * 
    @@ -3393,7 +4388,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 +4403,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 +4417,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 +4427,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 +4526,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 +4710,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 +4942,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 +5055,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 9f4bd315b7..142d0f217e 100644 --- a/grpc-google-cloud-bigtable-v2/clirr-ignored-differences.xml +++ b/grpc-google-cloud-bigtable-v2/clirr-ignored-differences.xml @@ -1,10 +1,10 @@ + - - 6001 - com/google/bigtable/v2/*Grpc - METHOD_* + 7012 + com/google/bigtable/v2/BigtableGrpc$AsyncService + *prepareQuery(* diff --git a/grpc-google-cloud-bigtable-v2/pom.xml b/grpc-google-cloud-bigtable-v2/pom.xml index 64ae507bac..41598723dd 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.40.1-SNAPSHOT + 2.65.1-SNAPSHOT grpc-google-cloud-bigtable-v2 GRPC library for grpc-google-cloud-bigtable-v2 com.google.cloud google-cloud-bigtable-parent - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.40.1-SNAPSHOT + 2.65.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 70e6a14690..b348a2aed4 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 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. @@ -432,6 +432,88 @@ 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; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExecuteQuery", + requestType = com.google.bigtable.v2.ExecuteQueryRequest.class, + responseType = com.google.bigtable.v2.ExecuteQueryResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.bigtable.v2.ExecuteQueryRequest, com.google.bigtable.v2.ExecuteQueryResponse> + getExecuteQueryMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.v2.ExecuteQueryRequest, com.google.bigtable.v2.ExecuteQueryResponse> + getExecuteQueryMethod; + if ((getExecuteQueryMethod = BigtableGrpc.getExecuteQueryMethod) == null) { + synchronized (BigtableGrpc.class) { + if ((getExecuteQueryMethod = BigtableGrpc.getExecuteQueryMethod) == null) { + BigtableGrpc.getExecuteQueryMethod = + getExecuteQueryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExecuteQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.ExecuteQueryRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.ExecuteQueryResponse.getDefaultInstance())) + .setSchemaDescriptor(new BigtableMethodDescriptorSupplier("ExecuteQuery")) + .build(); + } + } + } + return getExecuteQueryMethod; + } + /** 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 = @@ -444,6 +526,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 */ @@ -598,10 +693,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( @@ -617,10 +712,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( @@ -630,6 +725,34 @@ default void readChangeStream( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getReadChangeStreamMethod(), responseObserver); } + + /** + * + * + *
    +     * 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( + com.google.bigtable.v2.ExecuteQueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExecuteQueryMethod(), responseObserver); + } } /** @@ -792,10 +915,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( @@ -813,10 +936,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( @@ -828,6 +951,38 @@ public void readChangeStream( request, responseObserver); } + + /** + * + * + *
    +     * 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( + com.google.bigtable.v2.ExecuteQueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getExecuteQueryMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -837,6 +992,201 @@ public void readChangeStream( * 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + 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); + } + } + + /** + * 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) { @@ -958,10 +1308,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 @@ -978,10 +1328,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( @@ -989,6 +1339,32 @@ public java.util.Iterator readC return io.grpc.stub.ClientCalls.blockingServerStreamingCall( 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPrepareQueryMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Executes a SQL query against a particular Bigtable instance.
    +     * 
    + */ + public java.util.Iterator executeQuery( + com.google.bigtable.v2.ExecuteQueryRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getExecuteQueryMethod(), getCallOptions(), request); + } } /** @@ -1070,6 +1446,20 @@ 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); + } } private static final int METHODID_READ_ROWS = 0; @@ -1081,6 +1471,8 @@ 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_PREPARE_QUERY = 9; + private static final int METHODID_EXECUTE_QUERY = 10; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1154,6 +1546,18 @@ 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; default: throw new AssertionError(); } @@ -1231,6 +1635,18 @@ 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))) .build(); } @@ -1289,6 +1705,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getReadModifyWriteRowMethod()) .addMethod(getGenerateInitialChangeStreamPartitionsMethod()) .addMethod(getReadChangeStreamMethod()) + .addMethod(getPrepareQueryMethod()) + .addMethod(getExecuteQueryMethod()) .build(); } } diff --git a/pom.xml b/pom.xml index 4f1c8a8f83..830313cc2a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ google-cloud-bigtable-parent pom - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT Google Cloud Bigtable Parent https://github.com/googleapis/java-bigtable @@ -14,7 +14,7 @@ com.google.cloud sdk-platform-java-config - 3.32.0 + 3.51.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.40.1-SNAPSHOT + 2.65.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT com.google.cloud google-cloud-bigtable - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT @@ -184,13 +187,12 @@ com.google.truth truth - 1.4.3 + 1.4.4 com.google.truth.extensions truth-proto-extension - 1.4.3 - test + 1.4.4 @@ -206,8 +208,10 @@ org.mockito - mockito-core + mockito-bom 4.11.0 + pom + import @@ -226,7 +230,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.7.0 + 3.8.0 aggregate diff --git a/proto-google-cloud-bigtable-admin-v2/clirr-ignored-differences.xml b/proto-google-cloud-bigtable-admin-v2/clirr-ignored-differences.xml index 696c323a99..6ad718d75f 100644 --- a/proto-google-cloud-bigtable-admin-v2/clirr-ignored-differences.xml +++ b/proto-google-cloud-bigtable-admin-v2/clirr-ignored-differences.xml @@ -21,4 +21,66 @@ com/google/bigtable/admin/v2/*OrBuilder boolean has*(*) + + + + 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 5e3ff55843..892c1c3e4a 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.40.1-SNAPSHOT + 2.65.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.40.1-SNAPSHOT + 2.65.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.40.1-SNAPSHOT + 2.65.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..5f8b3a057a 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/instance.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class AppProfile extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile) AppProfileOrBuilder { private static final long serialVersionUID = 0L; + // Use AppProfile.newBuilder() to construct. private AppProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -107,10 +108,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; @@ -217,6 +221,7 @@ public interface MultiClusterRoutingUseAnyOrBuilder * @return A list containing the clusterIds. */ java.util.List getClusterIdsList(); + /** * * @@ -230,6 +235,7 @@ public interface MultiClusterRoutingUseAnyOrBuilder * @return The count of clusterIds. */ int getClusterIdsCount(); + /** * * @@ -244,6 +250,7 @@ public interface MultiClusterRoutingUseAnyOrBuilder * @return The clusterIds at the given index. */ java.lang.String getClusterIds(int index); + /** * * @@ -258,7 +265,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(); } + /** * * @@ -277,6 +335,7 @@ public static final class MultiClusterRoutingUseAny extends com.google.protobuf. // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) MultiClusterRoutingUseAnyOrBuilder { private static final long serialVersionUID = 0L; + // Use MultiClusterRoutingUseAny.newBuilder() to construct. private MultiClusterRoutingUseAny(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -307,11 +366,534 @@ 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.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + RowAffinityOrBuilder { + private static final long serialVersionUID = 0L; + + // Use RowAffinity.newBuilder() to construct. + private RowAffinity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RowAffinity() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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 +909,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public com.google.protobuf.ProtocolStringList getClusterIdsList() { return clusterIds_; } + /** * * @@ -342,6 +925,7 @@ public com.google.protobuf.ProtocolStringList getClusterIdsList() { public int getClusterIdsCount() { return clusterIds_.size(); } + /** * * @@ -358,6 +942,7 @@ public int getClusterIdsCount() { public java.lang.String getClusterIds(int index) { return clusterIds_.get(index); } + /** * * @@ -375,6 +960,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 @@ -392,6 +1046,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < clusterIds_.size(); i++) { com.google.protobuf.GeneratedMessageV3.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 +1069,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 +1093,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 +1116,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; @@ -544,6 +1227,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -590,6 +1274,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 +1311,7 @@ public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny buildPa if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -635,6 +1325,15 @@ private void buildPartial0( } } + 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 public Builder clone() { return super.clone(); @@ -696,6 +1395,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 +1439,12 @@ public Builder mergeFrom( clusterIds_.add(s); break; } // case 10 + case 26: + { + input.readMessage(getRowAffinityFieldBuilder().getBuilder(), extensionRegistry); + affinityCase_ = 3; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -746,6 +1462,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 +1487,7 @@ private void ensureClusterIdsIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -773,6 +1504,147 @@ public com.google.protobuf.ProtocolStringList getClusterIdsList() { clusterIds_.makeImmutable(); return clusterIds_; } + + /** + * + * + *
    +       * 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; + * + * @return The count of clusterIds. + */ + public int getClusterIdsCount() { + return clusterIds_.size(); + } + + /** + * + * + *
    +       * 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; + * + * @param index The index of the element to return. + * @return The clusterIds at the given index. + */ + public java.lang.String getClusterIds(int index) { + return clusterIds_.get(index); + } + + /** + * + * + *
    +       * 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; + * + * @param index The index of the value to return. + * @return The bytes of the clusterIds at the given index. + */ + public com.google.protobuf.ByteString getClusterIdsBytes(int index) { + return clusterIds_.getByteString(index); + } + + /** + * + * + *
    +       * 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; + * + * @param index The index to set the value at. + * @param value The clusterIds to set. + * @return This builder for chaining. + */ + public Builder setClusterIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClusterIdsIsMutable(); + clusterIds_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * 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; + * + * @param value The clusterIds to add. + * @return This builder for chaining. + */ + public Builder addClusterIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClusterIdsIsMutable(); + clusterIds_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * 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; + * + * @param values The clusterIds to add. + * @return This builder for chaining. + */ + public Builder addAllClusterIds(java.lang.Iterable values) { + ensureClusterIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, clusterIds_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * 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; + * + * @return This builder for chaining. + */ + public Builder clearClusterIds() { + clusterIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** * * @@ -783,152 +1655,287 @@ public com.google.protobuf.ProtocolStringList getClusterIdsList() { * * repeated string cluster_ids = 1; * - * @return The count of clusterIds. + * @param value The bytes of the clusterIds to add. + * @return This builder for chaining. + */ + public Builder addClusterIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureClusterIdsIsMutable(); + clusterIds_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + 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. */ - public int getClusterIdsCount() { - return clusterIds_.size(); + @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(); + } } + /** * * *
    -       * 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.
    +       * Row affinity sticky routing based on the row key of the request.
    +       * Requests that span multiple rows are routed non-deterministically.
            * 
    * - * repeated string cluster_ids = 1; - * - * @param index The index of the element to return. - * @return The clusterIds at the given index. + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * */ - public java.lang.String getClusterIds(int index) { - return clusterIds_.get(index); + 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; } + /** * * *
    -       * 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.
    +       * Row affinity sticky routing based on the row key of the request.
    +       * Requests that span multiple rows are routed non-deterministically.
            * 
    * - * repeated string cluster_ids = 1; - * - * @param index The index of the value to return. - * @return The bytes of the clusterIds at the given index. + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * */ - public com.google.protobuf.ByteString getClusterIdsBytes(int index) { - return clusterIds_.getByteString(index); + 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; } + /** * * *
    -       * 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.
    +       * Row affinity sticky routing based on the row key of the request.
    +       * Requests that span multiple rows are routed non-deterministically.
            * 
    * - * repeated string cluster_ids = 1; - * - * @param index The index to set the value at. - * @param value The clusterIds to set. - * @return This builder for chaining. + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * */ - public Builder setClusterIds(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + 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); + } } - ensureClusterIdsIsMutable(); - clusterIds_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); + affinityCase_ = 3; return this; } + /** * * *
    -       * 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.
    +       * Row affinity sticky routing based on the row key of the request.
    +       * Requests that span multiple rows are routed non-deterministically.
            * 
    * - * repeated string cluster_ids = 1; - * - * @param value The clusterIds to add. - * @return This builder for chaining. + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * */ - public Builder addClusterIds(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearRowAffinity() { + if (rowAffinityBuilder_ == null) { + if (affinityCase_ == 3) { + affinityCase_ = 0; + affinity_ = null; + onChanged(); + } + } else { + if (affinityCase_ == 3) { + affinityCase_ = 0; + affinity_ = null; + } + rowAffinityBuilder_.clear(); } - ensureClusterIdsIsMutable(); - clusterIds_.add(value); - bitField0_ |= 0x00000001; - onChanged(); return this; } + /** * * *
    -       * 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.
    +       * Row affinity sticky routing based on the row key of the request.
    +       * Requests that span multiple rows are routed non-deterministically.
            * 
    * - * repeated string cluster_ids = 1; - * - * @param values The clusterIds to add. - * @return This builder for chaining. + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * */ - public Builder addAllClusterIds(java.lang.Iterable values) { - ensureClusterIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, clusterIds_); - bitField0_ |= 0x00000001; - onChanged(); - return this; + public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.Builder + getRowAffinityBuilder() { + return getRowAffinityFieldBuilder().getBuilder(); } + /** * * *
    -       * 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.
    +       * Row affinity sticky routing based on the row key of the request.
    +       * Requests that span multiple rows are routed non-deterministically.
            * 
    * - * repeated string cluster_ids = 1; - * - * @return This builder for chaining. + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * */ - public Builder clearClusterIds() { - clusterIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - ; - onChanged(); - return this; + @java.lang.Override + 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(); + } } + /** * * *
    -       * 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.
    +       * Row affinity sticky routing based on the row key of the request.
    +       * Requests that span multiple rows are routed non-deterministically.
            * 
    * - * repeated string cluster_ids = 1; - * - * @param value The bytes of the clusterIds to add. - * @return This builder for chaining. + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * */ - public Builder addClusterIdsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilderV3< + 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> + getRowAffinityFieldBuilder() { + if (rowAffinityBuilder_ == null) { + if (!(affinityCase_ == 3)) { + affinity_ = + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .getDefaultInstance(); + } + rowAffinityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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; } - checkByteStringIsUtf8(value); - ensureClusterIdsIsMutable(); - clusterIds_.add(value); - bitField0_ |= 0x00000001; + affinityCase_ = 3; onChanged(); - return this; + return rowAffinityBuilder_; } @java.lang.Override @@ -1015,6 +2022,7 @@ public interface SingleClusterRoutingOrBuilder * @return The clusterId. */ java.lang.String getClusterId(); + /** * * @@ -1043,6 +2051,7 @@ public interface SingleClusterRoutingOrBuilder */ boolean getAllowTransactionalWrites(); } + /** * * @@ -1059,6 +2068,7 @@ public static final class SingleClusterRouting extends com.google.protobuf.Gener // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile.SingleClusterRouting) SingleClusterRoutingOrBuilder { private static final long serialVersionUID = 0L; + // Use SingleClusterRouting.newBuilder() to construct. private SingleClusterRouting(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -1093,6 +2103,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object clusterId_ = ""; + /** * * @@ -1116,6 +2127,7 @@ public java.lang.String getClusterId() { return s; } } + /** * * @@ -1142,6 +2154,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { public static final int ALLOW_TRANSACTIONAL_WRITES_FIELD_NUMBER = 2; private boolean allowTransactionalWrites_ = false; + /** * * @@ -1330,6 +2343,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1535,6 +2549,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object clusterId_ = ""; + /** * * @@ -1557,6 +2572,7 @@ public java.lang.String getClusterId() { return (java.lang.String) ref; } } + /** * * @@ -1579,6 +2595,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1600,6 +2617,7 @@ public Builder setClusterId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1617,6 +2635,7 @@ public Builder clearClusterId() { onChanged(); return this; } + /** * * @@ -1641,6 +2660,7 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { } private boolean allowTransactionalWrites_; + /** * * @@ -1658,6 +2678,7 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { public boolean getAllowTransactionalWrites() { return allowTransactionalWrites_; } + /** * * @@ -1679,6 +2700,7 @@ public Builder setAllowTransactionalWrites(boolean value) { onChanged(); return this; } + /** * * @@ -1783,6 +2805,7 @@ public interface StandardIsolationOrBuilder * @return The enum numeric value on the wire for priority. */ int getPriorityValue(); + /** * * @@ -1796,6 +2819,7 @@ public interface StandardIsolationOrBuilder */ com.google.bigtable.admin.v2.AppProfile.Priority getPriority(); } + /** * * @@ -1811,6 +2835,7 @@ public static final class StandardIsolation extends com.google.protobuf.Generate // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile.StandardIsolation) StandardIsolationOrBuilder { private static final long serialVersionUID = 0L; + // Use StandardIsolation.newBuilder() to construct. private StandardIsolation(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -1843,6 +2868,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int PRIORITY_FIELD_NUMBER = 1; private int priority_ = 0; + /** * * @@ -1858,6 +2884,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public int getPriorityValue() { return priority_; } + /** * * @@ -2041,6 +3068,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -2227,6 +3255,7 @@ public Builder mergeFrom( private int bitField0_; private int priority_ = 0; + /** * * @@ -2242,6 +3271,7 @@ public Builder mergeFrom( public int getPriorityValue() { return priority_; } + /** * * @@ -2260,6 +3290,7 @@ public Builder setPriorityValue(int value) { onChanged(); return this; } + /** * * @@ -2279,6 +3310,7 @@ public com.google.bigtable.admin.v2.AppProfile.Priority getPriority() { ? com.google.bigtable.admin.v2.AppProfile.Priority.UNRECOGNIZED : result; } + /** * * @@ -2300,6 +3332,7 @@ public Builder setPriority(com.google.bigtable.admin.v2.AppProfile.Priority valu onChanged(); return this; } + /** * * @@ -2401,6 +3434,7 @@ public interface DataBoostIsolationReadOnlyOrBuilder * @return Whether the computeBillingOwner field is set. */ boolean hasComputeBillingOwner(); + /** * * @@ -2415,6 +3449,7 @@ public interface DataBoostIsolationReadOnlyOrBuilder * @return The enum numeric value on the wire for computeBillingOwner. */ int getComputeBillingOwnerValue(); + /** * * @@ -2431,22 +3466,16 @@ 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} @@ -2457,6 +3486,7 @@ public static final class DataBoostIsolationReadOnly // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly) DataBoostIsolationReadOnlyOrBuilder { private static final long serialVersionUID = 0L; + // Use DataBoostIsolationReadOnly.newBuilder() to construct. private DataBoostIsolationReadOnly(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -2534,6 +3564,7 @@ public enum ComputeBillingOwner implements com.google.protobuf.ProtocolMessageEn * COMPUTE_BILLING_OWNER_UNSPECIFIED = 0; */ public static final int COMPUTE_BILLING_OWNER_UNSPECIFIED_VALUE = 0; + /** * * @@ -2635,6 +3666,7 @@ private ComputeBillingOwner(int value) { private int bitField0_; public static final int COMPUTE_BILLING_OWNER_FIELD_NUMBER = 1; private int computeBillingOwner_ = 0; + /** * * @@ -2652,6 +3684,7 @@ private ComputeBillingOwner(int value) { public boolean hasComputeBillingOwner() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2669,6 +3702,7 @@ public boolean hasComputeBillingOwner() { public int getComputeBillingOwnerValue() { return computeBillingOwner_; } + /** * * @@ -2862,22 +3896,16 @@ protected Builder newBuilderForType( 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} @@ -3068,6 +4096,7 @@ public Builder mergeFrom( private int bitField0_; private int computeBillingOwner_ = 0; + /** * * @@ -3085,6 +4114,7 @@ public Builder mergeFrom( public boolean hasComputeBillingOwner() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -3102,6 +4132,7 @@ public boolean hasComputeBillingOwner() { public int getComputeBillingOwnerValue() { return computeBillingOwner_; } + /** * * @@ -3122,6 +4153,7 @@ public Builder setComputeBillingOwnerValue(int value) { onChanged(); return this; } + /** * * @@ -3147,6 +4179,7 @@ public Builder setComputeBillingOwnerValue(int value) { .UNRECOGNIZED : result; } + /** * * @@ -3172,6 +4205,7 @@ public Builder setComputeBillingOwner( onChanged(); return this; } + /** * * @@ -3276,6 +4310,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 +4362,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 +4401,7 @@ public IsolationCase getIsolationCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -3389,6 +4426,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -3418,6 +4456,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object etag_ = ""; + /** * * @@ -3448,6 +4487,7 @@ public java.lang.String getEtag() { return s; } } + /** * * @@ -3483,6 +4523,7 @@ public com.google.protobuf.ByteString getEtagBytes() { @SuppressWarnings("serial") private volatile java.lang.Object description_ = ""; + /** * * @@ -3506,6 +4547,7 @@ public java.lang.String getDescription() { return s; } } + /** * * @@ -3531,6 +4573,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { } public static final int MULTI_CLUSTER_ROUTING_USE_ANY_FIELD_NUMBER = 5; + /** * * @@ -3548,6 +4591,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { public boolean hasMultiClusterRoutingUseAny() { return routingPolicyCase_ == 5; } + /** * * @@ -3569,6 +4613,7 @@ public boolean hasMultiClusterRoutingUseAny() { } return com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.getDefaultInstance(); } + /** * * @@ -3590,6 +4635,7 @@ public boolean hasMultiClusterRoutingUseAny() { } public static final int SINGLE_CLUSTER_ROUTING_FIELD_NUMBER = 6; + /** * * @@ -3606,6 +4652,7 @@ public boolean hasMultiClusterRoutingUseAny() { public boolean hasSingleClusterRouting() { return routingPolicyCase_ == 6; } + /** * * @@ -3625,6 +4672,7 @@ public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting getSingleClu } return com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance(); } + /** * * @@ -3645,6 +4693,7 @@ public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting getSingleClu } public static final int PRIORITY_FIELD_NUMBER = 7; + /** * * @@ -3658,13 +4707,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 +4728,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 +4738,7 @@ public int getPriorityValue() { } return 0; } + /** * * @@ -3701,7 +4752,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 +4769,7 @@ public com.google.bigtable.admin.v2.AppProfile.Priority getPriority() { } public static final int STANDARD_ISOLATION_FIELD_NUMBER = 11; + /** * * @@ -3734,6 +4786,7 @@ public com.google.bigtable.admin.v2.AppProfile.Priority getPriority() { public boolean hasStandardIsolation() { return isolationCase_ == 11; } + /** * * @@ -3753,6 +4806,7 @@ public com.google.bigtable.admin.v2.AppProfile.StandardIsolation getStandardIsol } return com.google.bigtable.admin.v2.AppProfile.StandardIsolation.getDefaultInstance(); } + /** * * @@ -3773,6 +4827,7 @@ public com.google.bigtable.admin.v2.AppProfile.StandardIsolation getStandardIsol } public static final int DATA_BOOST_ISOLATION_READ_ONLY_FIELD_NUMBER = 10; + /** * * @@ -3791,6 +4846,7 @@ public com.google.bigtable.admin.v2.AppProfile.StandardIsolation getStandardIsol public boolean hasDataBoostIsolationReadOnly() { return isolationCase_ == 10; } + /** * * @@ -3813,6 +4869,7 @@ public boolean hasDataBoostIsolationReadOnly() { } return com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.getDefaultInstance(); } + /** * * @@ -4110,6 +5167,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -4460,6 +5518,7 @@ public Builder clearIsolation() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -4483,6 +5542,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -4506,6 +5566,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4528,6 +5589,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4546,6 +5608,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -4571,6 +5634,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object etag_ = ""; + /** * * @@ -4600,6 +5664,7 @@ public java.lang.String getEtag() { return (java.lang.String) ref; } } + /** * * @@ -4629,6 +5694,7 @@ public com.google.protobuf.ByteString getEtagBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4657,6 +5723,7 @@ public Builder setEtag(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4681,6 +5748,7 @@ public Builder clearEtag() { onChanged(); return this; } + /** * * @@ -4712,6 +5780,7 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { } private java.lang.Object description_ = ""; + /** * * @@ -4734,6 +5803,7 @@ public java.lang.String getDescription() { return (java.lang.String) ref; } } + /** * * @@ -4756,6 +5826,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4777,6 +5848,7 @@ public Builder setDescription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4794,6 +5866,7 @@ public Builder clearDescription() { onChanged(); return this; } + /** * * @@ -4822,6 +5895,7 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAnyOrBuilder> multiClusterRoutingUseAnyBuilder_; + /** * * @@ -4839,6 +5913,7 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { public boolean hasMultiClusterRoutingUseAny() { return routingPolicyCase_ == 5; } + /** * * @@ -4869,6 +5944,7 @@ public boolean hasMultiClusterRoutingUseAny() { .getDefaultInstance(); } } + /** * * @@ -4894,6 +5970,7 @@ public Builder setMultiClusterRoutingUseAny( routingPolicyCase_ = 5; return this; } + /** * * @@ -4916,6 +5993,7 @@ public Builder setMultiClusterRoutingUseAny( routingPolicyCase_ = 5; return this; } + /** * * @@ -4954,6 +6032,7 @@ public Builder mergeMultiClusterRoutingUseAny( routingPolicyCase_ = 5; return this; } + /** * * @@ -4981,6 +6060,7 @@ public Builder clearMultiClusterRoutingUseAny() { } return this; } + /** * * @@ -4996,6 +6076,7 @@ public Builder clearMultiClusterRoutingUseAny() { getMultiClusterRoutingUseAnyBuilder() { return getMultiClusterRoutingUseAnyFieldBuilder().getBuilder(); } + /** * * @@ -5020,6 +6101,7 @@ public Builder clearMultiClusterRoutingUseAny() { .getDefaultInstance(); } } + /** * * @@ -5062,6 +6144,7 @@ public Builder clearMultiClusterRoutingUseAny() { com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.Builder, com.google.bigtable.admin.v2.AppProfile.SingleClusterRoutingOrBuilder> singleClusterRoutingBuilder_; + /** * * @@ -5078,6 +6161,7 @@ public Builder clearMultiClusterRoutingUseAny() { public boolean hasSingleClusterRouting() { return routingPolicyCase_ == 6; } + /** * * @@ -5104,6 +6188,7 @@ public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting getSingleClu return com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance(); } } + /** * * @@ -5128,6 +6213,7 @@ public Builder setSingleClusterRouting( routingPolicyCase_ = 6; return this; } + /** * * @@ -5149,6 +6235,7 @@ public Builder setSingleClusterRouting( routingPolicyCase_ = 6; return this; } + /** * * @@ -5185,6 +6272,7 @@ public Builder mergeSingleClusterRouting( routingPolicyCase_ = 6; return this; } + /** * * @@ -5211,6 +6299,7 @@ public Builder clearSingleClusterRouting() { } return this; } + /** * * @@ -5225,6 +6314,7 @@ public Builder clearSingleClusterRouting() { getSingleClusterRoutingBuilder() { return getSingleClusterRoutingFieldBuilder().getBuilder(); } + /** * * @@ -5247,6 +6337,7 @@ public Builder clearSingleClusterRouting() { return com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance(); } } + /** * * @@ -5295,7 +6386,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 +6394,7 @@ public Builder clearSingleClusterRouting() { public boolean hasPriority() { return isolationCase_ == 7; } + /** * * @@ -5316,7 +6408,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 +6419,7 @@ public int getPriorityValue() { } return 0; } + /** * * @@ -5340,7 +6433,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 +6444,7 @@ public Builder setPriorityValue(int value) { onChanged(); return this; } + /** * * @@ -5364,7 +6458,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 +6474,7 @@ public com.google.bigtable.admin.v2.AppProfile.Priority getPriority() { } return com.google.bigtable.admin.v2.AppProfile.Priority.PRIORITY_UNSPECIFIED; } + /** * * @@ -5393,7 +6488,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 +6502,7 @@ public Builder setPriority(com.google.bigtable.admin.v2.AppProfile.Priority valu onChanged(); return this; } + /** * * @@ -5420,7 +6516,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 @@ -5438,6 +6534,7 @@ public Builder clearPriority() { com.google.bigtable.admin.v2.AppProfile.StandardIsolation.Builder, com.google.bigtable.admin.v2.AppProfile.StandardIsolationOrBuilder> standardIsolationBuilder_; + /** * * @@ -5454,6 +6551,7 @@ public Builder clearPriority() { public boolean hasStandardIsolation() { return isolationCase_ == 11; } + /** * * @@ -5480,6 +6578,7 @@ public com.google.bigtable.admin.v2.AppProfile.StandardIsolation getStandardIsol return com.google.bigtable.admin.v2.AppProfile.StandardIsolation.getDefaultInstance(); } } + /** * * @@ -5504,6 +6603,7 @@ public Builder setStandardIsolation( isolationCase_ = 11; return this; } + /** * * @@ -5525,6 +6625,7 @@ public Builder setStandardIsolation( isolationCase_ = 11; return this; } + /** * * @@ -5560,6 +6661,7 @@ public Builder mergeStandardIsolation( isolationCase_ = 11; return this; } + /** * * @@ -5586,6 +6688,7 @@ public Builder clearStandardIsolation() { } return this; } + /** * * @@ -5600,6 +6703,7 @@ public Builder clearStandardIsolation() { getStandardIsolationBuilder() { return getStandardIsolationFieldBuilder().getBuilder(); } + /** * * @@ -5622,6 +6726,7 @@ public Builder clearStandardIsolation() { return com.google.bigtable.admin.v2.AppProfile.StandardIsolation.getDefaultInstance(); } } + /** * * @@ -5662,6 +6767,7 @@ public Builder clearStandardIsolation() { com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.Builder, com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnlyOrBuilder> dataBoostIsolationReadOnlyBuilder_; + /** * * @@ -5680,6 +6786,7 @@ public Builder clearStandardIsolation() { public boolean hasDataBoostIsolationReadOnly() { return isolationCase_ == 10; } + /** * * @@ -5711,6 +6818,7 @@ public boolean hasDataBoostIsolationReadOnly() { .getDefaultInstance(); } } + /** * * @@ -5737,6 +6845,7 @@ public Builder setDataBoostIsolationReadOnly( isolationCase_ = 10; return this; } + /** * * @@ -5761,6 +6870,7 @@ public Builder setDataBoostIsolationReadOnly( isolationCase_ = 10; return this; } + /** * * @@ -5800,6 +6910,7 @@ public Builder mergeDataBoostIsolationReadOnly( isolationCase_ = 10; return this; } + /** * * @@ -5828,6 +6939,7 @@ public Builder clearDataBoostIsolationReadOnly() { } return this; } + /** * * @@ -5844,6 +6956,7 @@ public Builder clearDataBoostIsolationReadOnly() { getDataBoostIsolationReadOnlyBuilder() { return getDataBoostIsolationReadOnlyFieldBuilder().getBuilder(); } + /** * * @@ -5869,6 +6982,7 @@ public Builder clearDataBoostIsolationReadOnly() { .getDefaultInstance(); } } + /** * * 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..f4e5d242d5 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 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. 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..66bd6fcd50 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/instance.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface AppProfileOrBuilder @@ -37,6 +37,7 @@ public interface AppProfileOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -70,6 +71,7 @@ public interface AppProfileOrBuilder * @return The etag. */ java.lang.String getEtag(); + /** * * @@ -102,6 +104,7 @@ public interface AppProfileOrBuilder * @return The description. */ java.lang.String getDescription(); + /** * * @@ -129,6 +132,7 @@ public interface AppProfileOrBuilder * @return Whether the multiClusterRoutingUseAny field is set. */ boolean hasMultiClusterRoutingUseAny(); + /** * * @@ -143,6 +147,7 @@ public interface AppProfileOrBuilder * @return The multiClusterRoutingUseAny. */ com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny getMultiClusterRoutingUseAny(); + /** * * @@ -170,6 +175,7 @@ public interface AppProfileOrBuilder * @return Whether the singleClusterRouting field is set. */ boolean hasSingleClusterRouting(); + /** * * @@ -183,6 +189,7 @@ public interface AppProfileOrBuilder * @return The singleClusterRouting. */ com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting getSingleClusterRouting(); + /** * * @@ -209,11 +216,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 +235,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 +254,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 +273,7 @@ public interface AppProfileOrBuilder * @return Whether the standardIsolation field is set. */ boolean hasStandardIsolation(); + /** * * @@ -277,6 +287,7 @@ public interface AppProfileOrBuilder * @return The standardIsolation. */ com.google.bigtable.admin.v2.AppProfile.StandardIsolation getStandardIsolation(); + /** * * @@ -305,6 +316,7 @@ public interface AppProfileOrBuilder * @return Whether the dataBoostIsolationReadOnly field is set. */ boolean hasDataBoostIsolationReadOnly(); + /** * * @@ -321,6 +333,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..3490524a28 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -35,6 +35,7 @@ public final class AuthorizedView extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AuthorizedView) AuthorizedViewOrBuilder { private static final long serialVersionUID = 0L; + // Use AuthorizedView.newBuilder() to construct. private AuthorizedView(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -130,6 +131,7 @@ public enum ResponseView implements com.google.protobuf.ProtocolMessageEnum { * RESPONSE_VIEW_UNSPECIFIED = 0; */ public static final int RESPONSE_VIEW_UNSPECIFIED_VALUE = 0; + /** * * @@ -140,6 +142,7 @@ public enum ResponseView implements com.google.protobuf.ProtocolMessageEnum { * NAME_ONLY = 1; */ public static final int NAME_ONLY_VALUE = 1; + /** * * @@ -151,6 +154,7 @@ public enum ResponseView implements com.google.protobuf.ProtocolMessageEnum { * BASIC = 2; */ public static final int BASIC_VALUE = 2; + /** * * @@ -264,6 +268,7 @@ public interface FamilySubsetsOrBuilder * @return A list containing the qualifiers. */ java.util.List getQualifiersList(); + /** * * @@ -276,6 +281,7 @@ public interface FamilySubsetsOrBuilder * @return The count of qualifiers. */ int getQualifiersCount(); + /** * * @@ -306,6 +312,7 @@ public interface FamilySubsetsOrBuilder * @return A list containing the qualifierPrefixes. */ java.util.List getQualifierPrefixesList(); + /** * * @@ -322,6 +329,7 @@ public interface FamilySubsetsOrBuilder * @return The count of qualifierPrefixes. */ int getQualifierPrefixesCount(); + /** * * @@ -340,6 +348,7 @@ public interface FamilySubsetsOrBuilder */ com.google.protobuf.ByteString getQualifierPrefixes(int index); } + /** * * @@ -354,6 +363,7 @@ public static final class FamilySubsets extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AuthorizedView.FamilySubsets) FamilySubsetsOrBuilder { private static final long serialVersionUID = 0L; + // Use FamilySubsets.newBuilder() to construct. private FamilySubsets(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -390,6 +400,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 +416,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getQualifiersList() { return qualifiers_; } + /** * * @@ -419,6 +431,7 @@ public java.util.List getQualifiersList() { public int getQualifiersCount() { return qualifiers_.size(); } + /** * * @@ -440,6 +453,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 +473,7 @@ public com.google.protobuf.ByteString getQualifiers(int index) { public java.util.List getQualifierPrefixesList() { return qualifierPrefixes_; } + /** * * @@ -477,6 +492,7 @@ public java.util.List getQualifierPrefixesList() public int getQualifierPrefixesCount() { return qualifierPrefixes_.size(); } + /** * * @@ -684,6 +700,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -910,6 +927,7 @@ private void ensureQualifiersIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -925,6 +943,7 @@ public java.util.List getQualifiersList() { qualifiers_.makeImmutable(); return qualifiers_; } + /** * * @@ -939,6 +958,7 @@ public java.util.List getQualifiersList() { public int getQualifiersCount() { return qualifiers_.size(); } + /** * * @@ -954,6 +974,7 @@ public int getQualifiersCount() { public com.google.protobuf.ByteString getQualifiers(int index) { return qualifiers_.get(index); } + /** * * @@ -977,6 +998,7 @@ public Builder setQualifiers(int index, com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -999,6 +1021,7 @@ public Builder addQualifiers(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1019,6 +1042,7 @@ public Builder addAllQualifiers( onChanged(); return this; } + /** * * @@ -1046,6 +1070,7 @@ private void ensureQualifierPrefixesIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -1065,6 +1090,7 @@ public java.util.List getQualifierPrefixesList() qualifierPrefixes_.makeImmutable(); return qualifierPrefixes_; } + /** * * @@ -1083,6 +1109,7 @@ public java.util.List getQualifierPrefixesList() public int getQualifierPrefixesCount() { return qualifierPrefixes_.size(); } + /** * * @@ -1102,6 +1129,7 @@ public int getQualifierPrefixesCount() { public com.google.protobuf.ByteString getQualifierPrefixes(int index) { return qualifierPrefixes_.get(index); } + /** * * @@ -1129,6 +1157,7 @@ public Builder setQualifierPrefixes(int index, com.google.protobuf.ByteString va onChanged(); return this; } + /** * * @@ -1155,6 +1184,7 @@ public Builder addQualifierPrefixes(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1179,6 +1209,7 @@ public Builder addAllQualifierPrefixes( onChanged(); return this; } + /** * * @@ -1283,6 +1314,7 @@ public interface SubsetViewOrBuilder * @return A list containing the rowPrefixes. */ java.util.List getRowPrefixesList(); + /** * * @@ -1296,6 +1328,7 @@ public interface SubsetViewOrBuilder * @return The count of rowPrefixes. */ int getRowPrefixesCount(); + /** * * @@ -1324,6 +1357,7 @@ public interface SubsetViewOrBuilder *
    */ int getFamilySubsetsCount(); + /** * * @@ -1337,10 +1371,12 @@ public interface SubsetViewOrBuilder *
    */ boolean containsFamilySubsets(java.lang.String key); + /** Use {@link #getFamilySubsetsMap()} instead. */ @java.lang.Deprecated java.util.Map getFamilySubsets(); + /** * * @@ -1355,6 +1391,7 @@ public interface SubsetViewOrBuilder */ java.util.Map getFamilySubsetsMap(); + /** * * @@ -1372,6 +1409,7 @@ com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets getFamilySubsetsOrDefa java.lang.String key, /* nullable */ com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets defaultValue); + /** * * @@ -1387,6 +1425,7 @@ com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets getFamilySubsetsOrDefa com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets getFamilySubsetsOrThrow( java.lang.String key); } + /** * * @@ -1401,6 +1440,7 @@ public static final class SubsetView extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AuthorizedView.SubsetView) SubsetViewOrBuilder { private static final long serialVersionUID = 0L; + // Use SubsetView.newBuilder() to construct. private SubsetView(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -1448,6 +1488,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl @SuppressWarnings("serial") private com.google.protobuf.Internal.ProtobufList rowPrefixes_ = emptyList(com.google.protobuf.ByteString.class); + /** * * @@ -1464,6 +1505,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl public java.util.List getRowPrefixesList() { return rowPrefixes_; } + /** * * @@ -1479,6 +1521,7 @@ public java.util.List getRowPrefixesList() { public int getRowPrefixesCount() { return rowPrefixes_.size(); } + /** * * @@ -1532,6 +1575,7 @@ private static final class FamilySubsetsDefaultEntryHolder { public int getFamilySubsetsCount() { return internalGetFamilySubsets().getMap().size(); } + /** * * @@ -1551,6 +1595,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 +1604,7 @@ public boolean containsFamilySubsets(java.lang.String key) { getFamilySubsets() { return getFamilySubsetsMap(); } + /** * * @@ -1577,6 +1623,7 @@ public boolean containsFamilySubsets(java.lang.String key) { getFamilySubsetsMap() { return internalGetFamilySubsets().getMap(); } + /** * * @@ -1602,6 +1649,7 @@ public boolean containsFamilySubsets(java.lang.String key) { map = internalGetFamilySubsets().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -1817,6 +1865,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -2064,6 +2113,7 @@ private void ensureRowPrefixesIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -2080,6 +2130,7 @@ public java.util.List getRowPrefixesList() { rowPrefixes_.makeImmutable(); return rowPrefixes_; } + /** * * @@ -2095,6 +2146,7 @@ public java.util.List getRowPrefixesList() { public int getRowPrefixesCount() { return rowPrefixes_.size(); } + /** * * @@ -2111,6 +2163,7 @@ public int getRowPrefixesCount() { public com.google.protobuf.ByteString getRowPrefixes(int index) { return rowPrefixes_.get(index); } + /** * * @@ -2135,6 +2188,7 @@ public Builder setRowPrefixes(int index, com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -2158,6 +2212,7 @@ public Builder addRowPrefixes(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -2179,6 +2234,7 @@ public Builder addAllRowPrefixes( onChanged(); return this; } + /** * * @@ -2218,7 +2274,8 @@ public com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets build( defaultEntry() { return FamilySubsetsDefaultEntryHolder.defaultEntry; } - }; + } + ; private static final FamilySubsetsConverter familySubsetsConverter = new FamilySubsetsConverter(); @@ -2259,6 +2316,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets build( public int getFamilySubsetsCount() { return internalGetFamilySubsets().ensureBuilderMap().size(); } + /** * * @@ -2278,6 +2336,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 +2345,7 @@ public boolean containsFamilySubsets(java.lang.String key) { getFamilySubsets() { return getFamilySubsetsMap(); } + /** * * @@ -2304,6 +2364,7 @@ public boolean containsFamilySubsets(java.lang.String key) { getFamilySubsetsMap() { return internalGetFamilySubsets().getImmutableMap(); } + /** * * @@ -2331,6 +2392,7 @@ public boolean containsFamilySubsets(java.lang.String key) { map = internalGetMutableFamilySubsets().ensureBuilderMap(); return map.containsKey(key) ? familySubsetsConverter.build(map.get(key)) : defaultValue; } + /** * * @@ -2364,6 +2426,7 @@ public Builder clearFamilySubsets() { internalGetMutableFamilySubsets().clear(); return this; } + /** * * @@ -2383,6 +2446,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 +2455,7 @@ public Builder removeFamilySubsets(java.lang.String key) { bitField0_ |= 0x00000002; return internalGetMutableFamilySubsets().ensureMessageMap(); } + /** * * @@ -2415,6 +2480,7 @@ public Builder putFamilySubsets( bitField0_ |= 0x00000002; return this; } + /** * * @@ -2441,6 +2507,7 @@ public Builder putAllFamilySubsets( bitField0_ |= 0x00000002; return this; } + /** * * @@ -2552,6 +2619,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 +2654,7 @@ public AuthorizedViewCase getAuthorizedViewCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -2611,6 +2680,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -2638,6 +2708,7 @@ public com.google.protobuf.ByteString getNameBytes() { } public static final int SUBSET_VIEW_FIELD_NUMBER = 2; + /** * * @@ -2653,6 +2724,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasSubsetView() { return authorizedViewCase_ == 2; } + /** * * @@ -2671,6 +2743,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.SubsetView getSubsetView() { } return com.google.bigtable.admin.v2.AuthorizedView.SubsetView.getDefaultInstance(); } + /** * * @@ -2692,6 +2765,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.SubsetViewOrBuilder getSubset @SuppressWarnings("serial") private volatile java.lang.Object etag_ = ""; + /** * * @@ -2717,6 +2791,7 @@ public java.lang.String getEtag() { return s; } } + /** * * @@ -2745,6 +2820,7 @@ public com.google.protobuf.ByteString getEtagBytes() { public static final int DELETION_PROTECTION_FIELD_NUMBER = 4; private boolean deletionProtection_ = false; + /** * * @@ -2965,6 +3041,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -3223,6 +3300,7 @@ public Builder clearAuthorizedView() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -3247,6 +3325,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -3271,6 +3350,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3294,6 +3374,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3313,6 +3394,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -3343,6 +3425,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { com.google.bigtable.admin.v2.AuthorizedView.SubsetView.Builder, com.google.bigtable.admin.v2.AuthorizedView.SubsetViewOrBuilder> subsetViewBuilder_; + /** * * @@ -3358,6 +3441,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasSubsetView() { return authorizedViewCase_ == 2; } + /** * * @@ -3383,6 +3467,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.SubsetView getSubsetView() { return com.google.bigtable.admin.v2.AuthorizedView.SubsetView.getDefaultInstance(); } } + /** * * @@ -3405,6 +3490,7 @@ public Builder setSubsetView(com.google.bigtable.admin.v2.AuthorizedView.SubsetV authorizedViewCase_ = 2; return this; } + /** * * @@ -3425,6 +3511,7 @@ public Builder setSubsetView( authorizedViewCase_ = 2; return this; } + /** * * @@ -3458,6 +3545,7 @@ public Builder mergeSubsetView(com.google.bigtable.admin.v2.AuthorizedView.Subse authorizedViewCase_ = 2; return this; } + /** * * @@ -3483,6 +3571,7 @@ public Builder clearSubsetView() { } return this; } + /** * * @@ -3495,6 +3584,7 @@ public Builder clearSubsetView() { public com.google.bigtable.admin.v2.AuthorizedView.SubsetView.Builder getSubsetViewBuilder() { return getSubsetViewFieldBuilder().getBuilder(); } + /** * * @@ -3516,6 +3606,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.SubsetView.Builder getSubsetV return com.google.bigtable.admin.v2.AuthorizedView.SubsetView.getDefaultInstance(); } } + /** * * @@ -3551,6 +3642,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.SubsetView.Builder getSubsetV } private java.lang.Object etag_ = ""; + /** * * @@ -3575,6 +3667,7 @@ public java.lang.String getEtag() { return (java.lang.String) ref; } } + /** * * @@ -3599,6 +3692,7 @@ public com.google.protobuf.ByteString getEtagBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3622,6 +3716,7 @@ public Builder setEtag(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3641,6 +3736,7 @@ public Builder clearEtag() { onChanged(); return this; } + /** * * @@ -3667,6 +3763,7 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { } private boolean deletionProtection_; + /** * * @@ -3684,6 +3781,7 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { public boolean getDeletionProtection() { return deletionProtection_; } + /** * * @@ -3705,6 +3803,7 @@ public Builder setDeletionProtection(boolean value) { onChanged(); return this; } + /** * * 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..a6d9fee9f4 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 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. 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..56ec3cbf42 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface AuthorizedViewOrBuilder @@ -38,6 +38,7 @@ public interface AuthorizedViewOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -65,6 +66,7 @@ public interface AuthorizedViewOrBuilder * @return Whether the subsetView field is set. */ boolean hasSubsetView(); + /** * * @@ -77,6 +79,7 @@ public interface AuthorizedViewOrBuilder * @return The subsetView. */ com.google.bigtable.admin.v2.AuthorizedView.SubsetView getSubsetView(); + /** * * @@ -102,6 +105,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..daea918341 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/instance.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class AutoscalingLimits extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AutoscalingLimits) AutoscalingLimitsOrBuilder { private static final long serialVersionUID = 0L; + // Use AutoscalingLimits.newBuilder() to construct. private AutoscalingLimits(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -63,6 +64,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 +83,7 @@ public int getMinServeNodes() { public static final int MAX_SERVE_NODES_FIELD_NUMBER = 2; private int maxServeNodes_ = 0; + /** * * @@ -265,6 +268,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -459,6 +463,7 @@ public Builder mergeFrom( private int bitField0_; private int minServeNodes_; + /** * * @@ -474,6 +479,7 @@ public Builder mergeFrom( public int getMinServeNodes() { return minServeNodes_; } + /** * * @@ -493,6 +499,7 @@ public Builder setMinServeNodes(int value) { onChanged(); return this; } + /** * * @@ -512,6 +519,7 @@ public Builder clearMinServeNodes() { } private int maxServeNodes_; + /** * * @@ -527,6 +535,7 @@ public Builder clearMinServeNodes() { public int getMaxServeNodes() { return maxServeNodes_; } + /** * * @@ -546,6 +555,7 @@ public Builder setMaxServeNodes(int value) { onChanged(); return this; } + /** * * 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..8f1b12669f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/instance.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface AutoscalingLimitsOrBuilder 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..cb3d4a8cd7 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/instance.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class AutoscalingTargets extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AutoscalingTargets) AutoscalingTargetsOrBuilder { private static final long serialVersionUID = 0L; + // Use AutoscalingTargets.newBuilder() to construct. private AutoscalingTargets(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -63,6 +64,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 +86,7 @@ public int getCpuUtilizationPercent() { public static final int STORAGE_UTILIZATION_GIB_PER_NODE_FIELD_NUMBER = 3; private int storageUtilizationGibPerNode_ = 0; + /** * * @@ -274,6 +277,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -469,6 +473,7 @@ public Builder mergeFrom( private int bitField0_; private int cpuUtilizationPercent_; + /** * * @@ -487,6 +492,7 @@ public Builder mergeFrom( public int getCpuUtilizationPercent() { return cpuUtilizationPercent_; } + /** * * @@ -509,6 +515,7 @@ public Builder setCpuUtilizationPercent(int value) { onChanged(); return this; } + /** * * @@ -531,6 +538,7 @@ public Builder clearCpuUtilizationPercent() { } private int storageUtilizationGibPerNode_; + /** * * @@ -551,6 +559,7 @@ public Builder clearCpuUtilizationPercent() { public int getStorageUtilizationGibPerNode() { return storageUtilizationGibPerNode_; } + /** * * @@ -575,6 +584,7 @@ public Builder setStorageUtilizationGibPerNode(int value) { onChanged(); return this; } + /** * * 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..16fe2ce81f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/instance.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface AutoscalingTargetsOrBuilder 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 21cf46c668..e26d823d4b 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class Backup extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Backup) BackupOrBuilder { private static final long serialVersionUID = 0L; + // Use Backup.newBuilder() to construct. private Backup(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -43,6 +44,7 @@ private Backup() { sourceTable_ = ""; sourceBackup_ = ""; state_ = 0; + backupType_ = 0; } @java.lang.Override @@ -120,6 +122,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -131,6 +134,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * CREATING = 1; */ public static final int CREATING_VALUE = 1; + /** * * @@ -225,11 +229,181 @@ private State(int value) { // @@protoc_insertion_point(enum_scope:google.bigtable.admin.v2.Backup.State) } + /** + * + * + *
    +   * The type of the backup.
    +   * 
    + * + * Protobuf enum {@code google.bigtable.admin.v2.Backup.BackupType} + */ + public enum BackupType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * Not specified.
    +     * 
    + * + * BACKUP_TYPE_UNSPECIFIED = 0; + */ + BACKUP_TYPE_UNSPECIFIED(0), + /** + * + * + *
    +     * 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 = 1; + */ + STANDARD(1), + /** + * + * + *
    +     * 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 = 2; + */ + HOT(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +     * Not specified.
    +     * 
    + * + * BACKUP_TYPE_UNSPECIFIED = 0; + */ + public static final int BACKUP_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +     * 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 = 1; + */ + public static final int STANDARD_VALUE = 1; + + /** + * + * + *
    +     * 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 = 2; + */ + public static final int HOT_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 BackupType 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 BackupType forNumber(int value) { + switch (value) { + case 0: + return BACKUP_TYPE_UNSPECIFIED; + case 1: + return STANDARD; + case 2: + return HOT; + 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 BackupType findValueByNumber(int number) { + return BackupType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.bigtable.admin.v2.Backup.getDescriptor().getEnumTypes().get(1); + } + + private static final BackupType[] VALUES = values(); + + public static BackupType 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 BackupType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.bigtable.admin.v2.Backup.BackupType) + } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -262,6 +436,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -299,6 +474,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object sourceTable_ = ""; + /** * * @@ -326,6 +502,7 @@ public java.lang.String getSourceTable() { return s; } } + /** * * @@ -358,13 +535,15 @@ public com.google.protobuf.ByteString getSourceTableBytes() { @SuppressWarnings("serial") private volatile java.lang.Object sourceBackup_ = ""; + /** * * *
        * Output only. Name of the backup from which this backup was copied. If a
        * backup is not created by copying a backup, this field will be empty. Values
    -   * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +   * are of the form:
    +   * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
        * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -383,13 +562,15 @@ public java.lang.String getSourceBackup() { return s; } } + /** * * *
        * Output only. Name of the backup from which this backup was copied. If a
        * backup is not created by copying a backup, this field will be empty. Values
    -   * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +   * are of the form:
    +   * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
        * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -411,15 +592,18 @@ public com.google.protobuf.ByteString getSourceBackupBytes() { public static final int EXPIRE_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp expireTime_; + /** * * *
    -   * Required. The expiration time of the backup, with microseconds
    -   * granularity that must be at least 6 hours and at most 90 days
    -   * from the time the request is received. Once the `expire_time`
    -   * has passed, Cloud Bigtable will delete the backup and free the
    -   * resources used by the backup.
    +   * Required. The expiration time of the backup.
    +   * When creating a backup or updating its `expire_time`, the value must be
    +   * greater than the backup creation time by:
    +   * - At least 6 hours
    +   * - At most 90 days
    +   *
    +   * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
        * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -431,15 +615,18 @@ public com.google.protobuf.ByteString getSourceBackupBytes() { public boolean hasExpireTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
    -   * Required. The expiration time of the backup, with microseconds
    -   * granularity that must be at least 6 hours and at most 90 days
    -   * from the time the request is received. Once the `expire_time`
    -   * has passed, Cloud Bigtable will delete the backup and free the
    -   * resources used by the backup.
    +   * Required. The expiration time of the backup.
    +   * When creating a backup or updating its `expire_time`, the value must be
    +   * greater than the backup creation time by:
    +   * - At least 6 hours
    +   * - At most 90 days
    +   *
    +   * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
        * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -451,15 +638,18 @@ public boolean hasExpireTime() { public com.google.protobuf.Timestamp getExpireTime() { return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; } + /** * * *
    -   * Required. The expiration time of the backup, with microseconds
    -   * granularity that must be at least 6 hours and at most 90 days
    -   * from the time the request is received. Once the `expire_time`
    -   * has passed, Cloud Bigtable will delete the backup and free the
    -   * resources used by the backup.
    +   * Required. The expiration time of the backup.
    +   * When creating a backup or updating its `expire_time`, the value must be
    +   * greater than the backup creation time by:
    +   * - At least 6 hours
    +   * - At most 90 days
    +   *
    +   * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
        * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -472,6 +662,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { public static final int START_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -492,6 +683,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { public boolean hasStartTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -512,6 +704,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -533,6 +726,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 5; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -550,6 +744,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -567,6 +762,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -585,6 +781,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public static final int SIZE_BYTES_FIELD_NUMBER = 6; private long sizeBytes_ = 0L; + /** * * @@ -603,6 +800,7 @@ public long getSizeBytes() { public static final int STATE_FIELD_NUMBER = 7; private int state_ = 0; + /** * * @@ -620,6 +818,7 @@ public long getSizeBytes() { public int getStateValue() { return state_; } + /** * * @@ -642,6 +841,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_; + /** * * @@ -659,6 +859,7 @@ public com.google.bigtable.admin.v2.Backup.State getState() { public boolean hasEncryptionInfo() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -678,6 +879,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo getEncryptionInfo() { ? com.google.bigtable.admin.v2.EncryptionInfo.getDefaultInstance() : encryptionInfo_; } + /** * * @@ -696,6 +898,117 @@ public com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrB : encryptionInfo_; } + public static final int BACKUP_TYPE_FIELD_NUMBER = 11; + private int backupType_ = 0; + + /** + * + * + *
    +   * Indicates the backup type of the backup.
    +   * 
    + * + * .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; + * + * @return The enum numeric value on the wire for backupType. + */ + @java.lang.Override + public int getBackupTypeValue() { + return backupType_; + } + + /** + * + * + *
    +   * Indicates the backup type of the backup.
    +   * 
    + * + * .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; + * + * @return The backupType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Backup.BackupType getBackupType() { + com.google.bigtable.admin.v2.Backup.BackupType result = + com.google.bigtable.admin.v2.Backup.BackupType.forNumber(backupType_); + return result == null ? com.google.bigtable.admin.v2.Backup.BackupType.UNRECOGNIZED : result; + } + + public static final int HOT_TO_STANDARD_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp hotToStandardTime_; + + /** + * + * + *
    +   * The time at which the hot backup will be converted to a standard backup.
    +   * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +   * hot backup to a standard backup. This value must be greater than the backup
    +   * creation time by:
    +   * - At least 24 hours
    +   *
    +   * This field only applies for hot backups. When creating or updating a
    +   * standard backup, attempting to set this field will fail the request.
    +   * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + * + * @return Whether the hotToStandardTime field is set. + */ + @java.lang.Override + public boolean hasHotToStandardTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
    +   * The time at which the hot backup will be converted to a standard backup.
    +   * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +   * hot backup to a standard backup. This value must be greater than the backup
    +   * creation time by:
    +   * - At least 24 hours
    +   *
    +   * This field only applies for hot backups. When creating or updating a
    +   * standard backup, attempting to set this field will fail the request.
    +   * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + * + * @return The hotToStandardTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getHotToStandardTime() { + return hotToStandardTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : hotToStandardTime_; + } + + /** + * + * + *
    +   * The time at which the hot backup will be converted to a standard backup.
    +   * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +   * hot backup to a standard backup. This value must be greater than the backup
    +   * creation time by:
    +   * - At least 24 hours
    +   *
    +   * This field only applies for hot backups. When creating or updating a
    +   * standard backup, attempting to set this field will fail the request.
    +   * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getHotToStandardTimeOrBuilder() { + return hotToStandardTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : hotToStandardTime_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -737,6 +1050,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, sourceBackup_); } + if (backupType_ + != com.google.bigtable.admin.v2.Backup.BackupType.BACKUP_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(11, backupType_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(12, getHotToStandardTime()); + } getUnknownFields().writeTo(output); } @@ -773,6 +1093,13 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, sourceBackup_); } + if (backupType_ + != com.google.bigtable.admin.v2.Backup.BackupType.BACKUP_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, backupType_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getHotToStandardTime()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -809,6 +1136,11 @@ public boolean equals(final java.lang.Object obj) { if (hasEncryptionInfo()) { if (!getEncryptionInfo().equals(other.getEncryptionInfo())) return false; } + if (backupType_ != other.backupType_) return false; + if (hasHotToStandardTime() != other.hasHotToStandardTime()) return false; + if (hasHotToStandardTime()) { + if (!getHotToStandardTime().equals(other.getHotToStandardTime())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -846,6 +1178,12 @@ public int hashCode() { hash = (37 * hash) + ENCRYPTION_INFO_FIELD_NUMBER; hash = (53 * hash) + getEncryptionInfo().hashCode(); } + hash = (37 * hash) + BACKUP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + backupType_; + if (hasHotToStandardTime()) { + hash = (37 * hash) + HOT_TO_STANDARD_TIME_FIELD_NUMBER; + hash = (53 * hash) + getHotToStandardTime().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -945,6 +1283,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -989,6 +1328,7 @@ private void maybeForceBuilderInitialization() { getStartTimeFieldBuilder(); getEndTimeFieldBuilder(); getEncryptionInfoFieldBuilder(); + getHotToStandardTimeFieldBuilder(); } } @@ -1021,6 +1361,12 @@ public Builder clear() { encryptionInfoBuilder_.dispose(); encryptionInfoBuilder_ = null; } + backupType_ = 0; + hotToStandardTime_ = null; + if (hotToStandardTimeBuilder_ != null) { + hotToStandardTimeBuilder_.dispose(); + hotToStandardTimeBuilder_ = null; + } return this; } @@ -1089,6 +1435,16 @@ private void buildPartial0(com.google.bigtable.admin.v2.Backup result) { encryptionInfoBuilder_ == null ? encryptionInfo_ : encryptionInfoBuilder_.build(); to_bitField0_ |= 0x00000008; } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.backupType_ = backupType_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.hotToStandardTime_ = + hotToStandardTimeBuilder_ == null + ? hotToStandardTime_ + : hotToStandardTimeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } result.bitField0_ |= to_bitField0_; } @@ -1170,6 +1526,12 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Backup other) { if (other.hasEncryptionInfo()) { mergeEncryptionInfo(other.getEncryptionInfo()); } + if (other.backupType_ != 0) { + setBackupTypeValue(other.getBackupTypeValue()); + } + if (other.hasHotToStandardTime()) { + mergeHotToStandardTime(other.getHotToStandardTime()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1250,6 +1612,19 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 82 + case 88: + { + backupType_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 88 + case 98: + { + input.readMessage( + getHotToStandardTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 98 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1270,6 +1645,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -1301,6 +1677,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -1332,6 +1709,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1362,6 +1740,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1388,6 +1767,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -1421,6 +1801,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object sourceTable_ = ""; + /** * * @@ -1447,6 +1828,7 @@ public java.lang.String getSourceTable() { return (java.lang.String) ref; } } + /** * * @@ -1473,6 +1855,7 @@ public com.google.protobuf.ByteString getSourceTableBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1498,6 +1881,7 @@ public Builder setSourceTable(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1519,6 +1903,7 @@ public Builder clearSourceTable() { onChanged(); return this; } + /** * * @@ -1547,13 +1932,15 @@ public Builder setSourceTableBytes(com.google.protobuf.ByteString value) { } private java.lang.Object sourceBackup_ = ""; + /** * * *
          * Output only. Name of the backup from which this backup was copied. If a
          * backup is not created by copying a backup, this field will be empty. Values
    -     * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +     * are of the form:
    +     * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
          * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1571,13 +1958,15 @@ public java.lang.String getSourceBackup() { return (java.lang.String) ref; } } + /** * * *
          * Output only. Name of the backup from which this backup was copied. If a
          * backup is not created by copying a backup, this field will be empty. Values
    -     * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +     * are of the form:
    +     * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
          * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1595,13 +1984,15 @@ public com.google.protobuf.ByteString getSourceBackupBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * *
          * Output only. Name of the backup from which this backup was copied. If a
          * backup is not created by copying a backup, this field will be empty. Values
    -     * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +     * are of the form:
    +     * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
          * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1618,13 +2009,15 @@ public Builder setSourceBackup(java.lang.String value) { onChanged(); return this; } + /** * * *
          * Output only. Name of the backup from which this backup was copied. If a
          * backup is not created by copying a backup, this field will be empty. Values
    -     * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +     * are of the form:
    +     * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
          * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1637,13 +2030,15 @@ public Builder clearSourceBackup() { onChanged(); return this; } + /** * * *
          * Output only. Name of the backup from which this backup was copied. If a
          * backup is not created by copying a backup, this field will be empty. Values
    -     * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +     * are of the form:
    +     * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
          * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1668,15 +2063,18 @@ public Builder setSourceBackupBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expireTimeBuilder_; + /** * * *
    -     * Required. The expiration time of the backup, with microseconds
    -     * granularity that must be at least 6 hours and at most 90 days
    -     * from the time the request is received. Once the `expire_time`
    -     * has passed, Cloud Bigtable will delete the backup and free the
    -     * resources used by the backup.
    +     * Required. The expiration time of the backup.
    +     * When creating a backup or updating its `expire_time`, the value must be
    +     * greater than the backup creation time by:
    +     * - At least 6 hours
    +     * - At most 90 days
    +     *
    +     * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
          * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1687,15 +2085,18 @@ public Builder setSourceBackupBytes(com.google.protobuf.ByteString value) { public boolean hasExpireTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * *
    -     * Required. The expiration time of the backup, with microseconds
    -     * granularity that must be at least 6 hours and at most 90 days
    -     * from the time the request is received. Once the `expire_time`
    -     * has passed, Cloud Bigtable will delete the backup and free the
    -     * resources used by the backup.
    +     * Required. The expiration time of the backup.
    +     * When creating a backup or updating its `expire_time`, the value must be
    +     * greater than the backup creation time by:
    +     * - At least 6 hours
    +     * - At most 90 days
    +     *
    +     * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
          * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1712,15 +2113,18 @@ public com.google.protobuf.Timestamp getExpireTime() { return expireTimeBuilder_.getMessage(); } } + /** * * *
    -     * Required. The expiration time of the backup, with microseconds
    -     * granularity that must be at least 6 hours and at most 90 days
    -     * from the time the request is received. Once the `expire_time`
    -     * has passed, Cloud Bigtable will delete the backup and free the
    -     * resources used by the backup.
    +     * Required. The expiration time of the backup.
    +     * When creating a backup or updating its `expire_time`, the value must be
    +     * greater than the backup creation time by:
    +     * - At least 6 hours
    +     * - At most 90 days
    +     *
    +     * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
          * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1739,15 +2143,18 @@ public Builder setExpireTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * *
    -     * Required. The expiration time of the backup, with microseconds
    -     * granularity that must be at least 6 hours and at most 90 days
    -     * from the time the request is received. Once the `expire_time`
    -     * has passed, Cloud Bigtable will delete the backup and free the
    -     * resources used by the backup.
    +     * Required. The expiration time of the backup.
    +     * When creating a backup or updating its `expire_time`, the value must be
    +     * greater than the backup creation time by:
    +     * - At least 6 hours
    +     * - At most 90 days
    +     *
    +     * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
          * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1763,15 +2170,18 @@ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * *
    -     * Required. The expiration time of the backup, with microseconds
    -     * granularity that must be at least 6 hours and at most 90 days
    -     * from the time the request is received. Once the `expire_time`
    -     * has passed, Cloud Bigtable will delete the backup and free the
    -     * resources used by the backup.
    +     * Required. The expiration time of the backup.
    +     * When creating a backup or updating its `expire_time`, the value must be
    +     * greater than the backup creation time by:
    +     * - At least 6 hours
    +     * - At most 90 days
    +     *
    +     * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
          * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1795,15 +2205,18 @@ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * *
    -     * Required. The expiration time of the backup, with microseconds
    -     * granularity that must be at least 6 hours and at most 90 days
    -     * from the time the request is received. Once the `expire_time`
    -     * has passed, Cloud Bigtable will delete the backup and free the
    -     * resources used by the backup.
    +     * Required. The expiration time of the backup.
    +     * When creating a backup or updating its `expire_time`, the value must be
    +     * greater than the backup creation time by:
    +     * - At least 6 hours
    +     * - At most 90 days
    +     *
    +     * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
          * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1819,15 +2232,18 @@ public Builder clearExpireTime() { onChanged(); return this; } + /** * * *
    -     * Required. The expiration time of the backup, with microseconds
    -     * granularity that must be at least 6 hours and at most 90 days
    -     * from the time the request is received. Once the `expire_time`
    -     * has passed, Cloud Bigtable will delete the backup and free the
    -     * resources used by the backup.
    +     * Required. The expiration time of the backup.
    +     * When creating a backup or updating its `expire_time`, the value must be
    +     * greater than the backup creation time by:
    +     * - At least 6 hours
    +     * - At most 90 days
    +     *
    +     * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
          * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1838,15 +2254,18 @@ public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { onChanged(); return getExpireTimeFieldBuilder().getBuilder(); } + /** * * *
    -     * Required. The expiration time of the backup, with microseconds
    -     * granularity that must be at least 6 hours and at most 90 days
    -     * from the time the request is received. Once the `expire_time`
    -     * has passed, Cloud Bigtable will delete the backup and free the
    -     * resources used by the backup.
    +     * Required. The expiration time of the backup.
    +     * When creating a backup or updating its `expire_time`, the value must be
    +     * greater than the backup creation time by:
    +     * - At least 6 hours
    +     * - At most 90 days
    +     *
    +     * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
          * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1861,15 +2280,18 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { : expireTime_; } } + /** * * *
    -     * Required. The expiration time of the backup, with microseconds
    -     * granularity that must be at least 6 hours and at most 90 days
    -     * from the time the request is received. Once the `expire_time`
    -     * has passed, Cloud Bigtable will delete the backup and free the
    -     * resources used by the backup.
    +     * Required. The expiration time of the backup.
    +     * When creating a backup or updating its `expire_time`, the value must be
    +     * greater than the backup creation time by:
    +     * - At least 6 hours
    +     * - At most 90 days
    +     *
    +     * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
          * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1898,6 +2320,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -1917,6 +2340,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { public boolean hasStartTime() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1940,6 +2364,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -1967,6 +2392,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1991,6 +2417,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -2023,6 +2450,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2047,6 +2475,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -2066,6 +2495,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -2087,6 +2517,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -2124,6 +2555,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -2140,6 +2572,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -2160,6 +2593,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -2184,6 +2618,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -2205,6 +2640,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -2234,6 +2670,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2255,6 +2692,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -2271,6 +2709,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -2289,6 +2728,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -2318,6 +2758,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private long sizeBytes_; + /** * * @@ -2333,6 +2774,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public long getSizeBytes() { return sizeBytes_; } + /** * * @@ -2352,6 +2794,7 @@ public Builder setSizeBytes(long value) { onChanged(); return this; } + /** * * @@ -2371,6 +2814,7 @@ public Builder clearSizeBytes() { } private int state_ = 0; + /** * * @@ -2388,6 +2832,7 @@ public Builder clearSizeBytes() { public int getStateValue() { return state_; } + /** * * @@ -2408,6 +2853,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -2427,6 +2873,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; } + /** * * @@ -2450,6 +2897,7 @@ public Builder setState(com.google.bigtable.admin.v2.Backup.State value) { onChanged(); return this; } + /** * * @@ -2476,6 +2924,7 @@ public Builder clearState() { com.google.bigtable.admin.v2.EncryptionInfo.Builder, com.google.bigtable.admin.v2.EncryptionInfoOrBuilder> encryptionInfoBuilder_; + /** * * @@ -2492,6 +2941,7 @@ public Builder clearState() { public boolean hasEncryptionInfo() { return ((bitField0_ & 0x00000100) != 0); } + /** * * @@ -2514,6 +2964,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo getEncryptionInfo() { return encryptionInfoBuilder_.getMessage(); } } + /** * * @@ -2538,6 +2989,7 @@ public Builder setEncryptionInfo(com.google.bigtable.admin.v2.EncryptionInfo val onChanged(); return this; } + /** * * @@ -2560,6 +3012,7 @@ public Builder setEncryptionInfo( onChanged(); return this; } + /** * * @@ -2590,6 +3043,7 @@ public Builder mergeEncryptionInfo(com.google.bigtable.admin.v2.EncryptionInfo v } return this; } + /** * * @@ -2611,6 +3065,7 @@ public Builder clearEncryptionInfo() { onChanged(); return this; } + /** * * @@ -2627,6 +3082,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo.Builder getEncryptionInfoBuil onChanged(); return getEncryptionInfoFieldBuilder().getBuilder(); } + /** * * @@ -2647,6 +3103,7 @@ public com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrB : encryptionInfo_; } } + /** * * @@ -2675,6 +3132,358 @@ public com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrB return encryptionInfoBuilder_; } + private int backupType_ = 0; + + /** + * + * + *
    +     * Indicates the backup type of the backup.
    +     * 
    + * + * .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; + * + * @return The enum numeric value on the wire for backupType. + */ + @java.lang.Override + public int getBackupTypeValue() { + return backupType_; + } + + /** + * + * + *
    +     * Indicates the backup type of the backup.
    +     * 
    + * + * .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; + * + * @param value The enum numeric value on the wire for backupType to set. + * @return This builder for chaining. + */ + public Builder setBackupTypeValue(int value) { + backupType_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Indicates the backup type of the backup.
    +     * 
    + * + * .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; + * + * @return The backupType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Backup.BackupType getBackupType() { + com.google.bigtable.admin.v2.Backup.BackupType result = + com.google.bigtable.admin.v2.Backup.BackupType.forNumber(backupType_); + return result == null ? com.google.bigtable.admin.v2.Backup.BackupType.UNRECOGNIZED : result; + } + + /** + * + * + *
    +     * Indicates the backup type of the backup.
    +     * 
    + * + * .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; + * + * @param value The backupType to set. + * @return This builder for chaining. + */ + public Builder setBackupType(com.google.bigtable.admin.v2.Backup.BackupType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + backupType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Indicates the backup type of the backup.
    +     * 
    + * + * .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; + * + * @return This builder for chaining. + */ + public Builder clearBackupType() { + bitField0_ = (bitField0_ & ~0x00000200); + backupType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp hotToStandardTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + hotToStandardTimeBuilder_; + + /** + * + * + *
    +     * The time at which the hot backup will be converted to a standard backup.
    +     * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +     * hot backup to a standard backup. This value must be greater than the backup
    +     * creation time by:
    +     * - At least 24 hours
    +     *
    +     * This field only applies for hot backups. When creating or updating a
    +     * standard backup, attempting to set this field will fail the request.
    +     * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + * + * @return Whether the hotToStandardTime field is set. + */ + public boolean hasHotToStandardTime() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
    +     * The time at which the hot backup will be converted to a standard backup.
    +     * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +     * hot backup to a standard backup. This value must be greater than the backup
    +     * creation time by:
    +     * - At least 24 hours
    +     *
    +     * This field only applies for hot backups. When creating or updating a
    +     * standard backup, attempting to set this field will fail the request.
    +     * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + * + * @return The hotToStandardTime. + */ + public com.google.protobuf.Timestamp getHotToStandardTime() { + if (hotToStandardTimeBuilder_ == null) { + return hotToStandardTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : hotToStandardTime_; + } else { + return hotToStandardTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * The time at which the hot backup will be converted to a standard backup.
    +     * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +     * hot backup to a standard backup. This value must be greater than the backup
    +     * creation time by:
    +     * - At least 24 hours
    +     *
    +     * This field only applies for hot backups. When creating or updating a
    +     * standard backup, attempting to set this field will fail the request.
    +     * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + */ + public Builder setHotToStandardTime(com.google.protobuf.Timestamp value) { + if (hotToStandardTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hotToStandardTime_ = value; + } else { + hotToStandardTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The time at which the hot backup will be converted to a standard backup.
    +     * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +     * hot backup to a standard backup. This value must be greater than the backup
    +     * creation time by:
    +     * - At least 24 hours
    +     *
    +     * This field only applies for hot backups. When creating or updating a
    +     * standard backup, attempting to set this field will fail the request.
    +     * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + */ + public Builder setHotToStandardTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (hotToStandardTimeBuilder_ == null) { + hotToStandardTime_ = builderForValue.build(); + } else { + hotToStandardTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The time at which the hot backup will be converted to a standard backup.
    +     * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +     * hot backup to a standard backup. This value must be greater than the backup
    +     * creation time by:
    +     * - At least 24 hours
    +     *
    +     * This field only applies for hot backups. When creating or updating a
    +     * standard backup, attempting to set this field will fail the request.
    +     * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + */ + public Builder mergeHotToStandardTime(com.google.protobuf.Timestamp value) { + if (hotToStandardTimeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && hotToStandardTime_ != null + && hotToStandardTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getHotToStandardTimeBuilder().mergeFrom(value); + } else { + hotToStandardTime_ = value; + } + } else { + hotToStandardTimeBuilder_.mergeFrom(value); + } + if (hotToStandardTime_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * The time at which the hot backup will be converted to a standard backup.
    +     * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +     * hot backup to a standard backup. This value must be greater than the backup
    +     * creation time by:
    +     * - At least 24 hours
    +     *
    +     * This field only applies for hot backups. When creating or updating a
    +     * standard backup, attempting to set this field will fail the request.
    +     * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + */ + public Builder clearHotToStandardTime() { + bitField0_ = (bitField0_ & ~0x00000400); + hotToStandardTime_ = null; + if (hotToStandardTimeBuilder_ != null) { + hotToStandardTimeBuilder_.dispose(); + hotToStandardTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * The time at which the hot backup will be converted to a standard backup.
    +     * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +     * hot backup to a standard backup. This value must be greater than the backup
    +     * creation time by:
    +     * - At least 24 hours
    +     *
    +     * This field only applies for hot backups. When creating or updating a
    +     * standard backup, attempting to set this field will fail the request.
    +     * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + */ + public com.google.protobuf.Timestamp.Builder getHotToStandardTimeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getHotToStandardTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * The time at which the hot backup will be converted to a standard backup.
    +     * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +     * hot backup to a standard backup. This value must be greater than the backup
    +     * creation time by:
    +     * - At least 24 hours
    +     *
    +     * This field only applies for hot backups. When creating or updating a
    +     * standard backup, attempting to set this field will fail the request.
    +     * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + */ + public com.google.protobuf.TimestampOrBuilder getHotToStandardTimeOrBuilder() { + if (hotToStandardTimeBuilder_ != null) { + return hotToStandardTimeBuilder_.getMessageOrBuilder(); + } else { + return hotToStandardTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : hotToStandardTime_; + } + } + + /** + * + * + *
    +     * The time at which the hot backup will be converted to a standard backup.
    +     * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +     * hot backup to a standard backup. This value must be greater than the backup
    +     * creation time by:
    +     * - At least 24 hours
    +     *
    +     * This field only applies for hot backups. When creating or updating a
    +     * standard backup, attempting to set this field will fail the request.
    +     * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getHotToStandardTimeFieldBuilder() { + if (hotToStandardTimeBuilder_ == null) { + hotToStandardTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getHotToStandardTime(), getParentForChildren(), isClean()); + hotToStandardTime_ = null; + } + return hotToStandardTimeBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); 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 18d0819ca9..49d85224e7 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class BackupInfo extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.BackupInfo) BackupInfoOrBuilder { private static final long serialVersionUID = 0L; + // Use BackupInfo.newBuilder() to construct. private BackupInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -70,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object backup_ = ""; + /** * * @@ -93,6 +95,7 @@ public java.lang.String getBackup() { return s; } } + /** * * @@ -119,6 +122,7 @@ public com.google.protobuf.ByteString getBackupBytes() { public static final int START_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -136,6 +140,7 @@ public com.google.protobuf.ByteString getBackupBytes() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -153,6 +158,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -171,6 +177,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -188,6 +195,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -205,6 +213,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -225,6 +234,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object sourceTable_ = ""; + /** * * @@ -248,6 +258,7 @@ public java.lang.String getSourceTable() { return s; } } + /** * * @@ -276,13 +287,15 @@ public com.google.protobuf.ByteString getSourceTableBytes() { @SuppressWarnings("serial") private volatile java.lang.Object sourceBackup_ = ""; + /** * * *
        * Output only. Name of the backup from which this backup was copied. If a
        * backup is not created by copying a backup, this field will be empty. Values
    -   * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +   * are of the form:
    +   * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
        * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -301,13 +314,15 @@ public java.lang.String getSourceBackup() { return s; } } + /** * * *
        * Output only. Name of the backup from which this backup was copied. If a
        * backup is not created by copying a backup, this field will be empty. Values
    -   * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +   * are of the form:
    +   * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
        * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -531,6 +546,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -792,6 +808,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object backup_ = ""; + /** * * @@ -814,6 +831,7 @@ public java.lang.String getBackup() { return (java.lang.String) ref; } } + /** * * @@ -836,6 +854,7 @@ public com.google.protobuf.ByteString getBackupBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -857,6 +876,7 @@ public Builder setBackup(java.lang.String value) { onChanged(); return this; } + /** * * @@ -874,6 +894,7 @@ public Builder clearBackup() { onChanged(); return this; } + /** * * @@ -903,6 +924,7 @@ public Builder setBackupBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -919,6 +941,7 @@ public Builder setBackupBytes(com.google.protobuf.ByteString value) { public boolean hasStartTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -939,6 +962,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -963,6 +987,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -984,6 +1009,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -1013,6 +1039,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1034,6 +1061,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -1050,6 +1078,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1068,6 +1097,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -1102,6 +1132,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -1118,6 +1149,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1138,6 +1170,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -1162,6 +1195,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1183,6 +1217,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1212,6 +1247,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1233,6 +1269,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1249,6 +1286,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1267,6 +1305,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1296,6 +1335,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private java.lang.Object sourceTable_ = ""; + /** * * @@ -1318,6 +1358,7 @@ public java.lang.String getSourceTable() { return (java.lang.String) ref; } } + /** * * @@ -1340,6 +1381,7 @@ public com.google.protobuf.ByteString getSourceTableBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1361,6 +1403,7 @@ public Builder setSourceTable(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1378,6 +1421,7 @@ public Builder clearSourceTable() { onChanged(); return this; } + /** * * @@ -1402,13 +1446,15 @@ public Builder setSourceTableBytes(com.google.protobuf.ByteString value) { } private java.lang.Object sourceBackup_ = ""; + /** * * *
          * Output only. Name of the backup from which this backup was copied. If a
          * backup is not created by copying a backup, this field will be empty. Values
    -     * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +     * are of the form:
    +     * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
          * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1426,13 +1472,15 @@ public java.lang.String getSourceBackup() { return (java.lang.String) ref; } } + /** * * *
          * Output only. Name of the backup from which this backup was copied. If a
          * backup is not created by copying a backup, this field will be empty. Values
    -     * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +     * are of the form:
    +     * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
          * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1450,13 +1498,15 @@ public com.google.protobuf.ByteString getSourceBackupBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * *
          * Output only. Name of the backup from which this backup was copied. If a
          * backup is not created by copying a backup, this field will be empty. Values
    -     * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +     * are of the form:
    +     * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
          * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1473,13 +1523,15 @@ public Builder setSourceBackup(java.lang.String value) { onChanged(); return this; } + /** * * *
          * Output only. Name of the backup from which this backup was copied. If a
          * backup is not created by copying a backup, this field will be empty. Values
    -     * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +     * are of the form:
    +     * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
          * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1492,13 +1544,15 @@ public Builder clearSourceBackup() { onChanged(); return this; } + /** * * *
          * Output only. Name of the backup from which this backup was copied. If a
          * backup is not created by copying a backup, this field will be empty. Values
    -     * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +     * are of the form:
    +     * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
          * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 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 6a93a024bd..c1e1b7d2ed 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface BackupInfoOrBuilder @@ -36,6 +36,7 @@ public interface BackupInfoOrBuilder * @return The backup. */ java.lang.String getBackup(); + /** * * @@ -63,6 +64,7 @@ public interface BackupInfoOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -77,6 +79,7 @@ public interface BackupInfoOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -104,6 +107,7 @@ public interface BackupInfoOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -118,6 +122,7 @@ public interface BackupInfoOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -143,6 +148,7 @@ public interface BackupInfoOrBuilder * @return The sourceTable. */ java.lang.String getSourceTable(); + /** * * @@ -162,7 +168,8 @@ public interface BackupInfoOrBuilder *
        * Output only. Name of the backup from which this backup was copied. If a
        * backup is not created by copying a backup, this field will be empty. Values
    -   * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +   * are of the form:
    +   * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
        * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -170,13 +177,15 @@ public interface BackupInfoOrBuilder * @return The sourceBackup. */ java.lang.String getSourceBackup(); + /** * * *
        * Output only. Name of the backup from which this backup was copied. If a
        * backup is not created by copying a backup, this field will be empty. Values
    -   * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +   * are of the form:
    +   * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
        * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 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..477282450b 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 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. 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 4f122ca46d..14ef315547 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface BackupOrBuilder @@ -45,6 +45,7 @@ public interface BackupOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -83,6 +84,7 @@ public interface BackupOrBuilder * @return The sourceTable. */ java.lang.String getSourceTable(); + /** * * @@ -106,7 +108,8 @@ public interface BackupOrBuilder *
        * Output only. Name of the backup from which this backup was copied. If a
        * backup is not created by copying a backup, this field will be empty. Values
    -   * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +   * are of the form:
    +   * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
        * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -114,13 +117,15 @@ public interface BackupOrBuilder * @return The sourceBackup. */ java.lang.String getSourceBackup(); + /** * * *
        * Output only. Name of the backup from which this backup was copied. If a
        * backup is not created by copying a backup, this field will be empty. Values
    -   * are of the form: projects/<project>/instances/<instance>/backups/<backup>.
    +   * are of the form:
    +   * projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
        * 
    * * string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -133,11 +138,13 @@ public interface BackupOrBuilder * * *
    -   * Required. The expiration time of the backup, with microseconds
    -   * granularity that must be at least 6 hours and at most 90 days
    -   * from the time the request is received. Once the `expire_time`
    -   * has passed, Cloud Bigtable will delete the backup and free the
    -   * resources used by the backup.
    +   * Required. The expiration time of the backup.
    +   * When creating a backup or updating its `expire_time`, the value must be
    +   * greater than the backup creation time by:
    +   * - At least 6 hours
    +   * - At most 90 days
    +   *
    +   * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
        * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -146,15 +153,18 @@ public interface BackupOrBuilder * @return Whether the expireTime field is set. */ boolean hasExpireTime(); + /** * * *
    -   * Required. The expiration time of the backup, with microseconds
    -   * granularity that must be at least 6 hours and at most 90 days
    -   * from the time the request is received. Once the `expire_time`
    -   * has passed, Cloud Bigtable will delete the backup and free the
    -   * resources used by the backup.
    +   * Required. The expiration time of the backup.
    +   * When creating a backup or updating its `expire_time`, the value must be
    +   * greater than the backup creation time by:
    +   * - At least 6 hours
    +   * - At most 90 days
    +   *
    +   * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
        * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -163,15 +173,18 @@ public interface BackupOrBuilder * @return The expireTime. */ com.google.protobuf.Timestamp getExpireTime(); + /** * * *
    -   * Required. The expiration time of the backup, with microseconds
    -   * granularity that must be at least 6 hours and at most 90 days
    -   * from the time the request is received. Once the `expire_time`
    -   * has passed, Cloud Bigtable will delete the backup and free the
    -   * resources used by the backup.
    +   * Required. The expiration time of the backup.
    +   * When creating a backup or updating its `expire_time`, the value must be
    +   * greater than the backup creation time by:
    +   * - At least 6 hours
    +   * - At most 90 days
    +   *
    +   * Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
        * 
    * * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -196,6 +209,7 @@ public interface BackupOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -213,6 +227,7 @@ public interface BackupOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -243,6 +258,7 @@ public interface BackupOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -257,6 +273,7 @@ public interface BackupOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -297,6 +314,7 @@ public interface BackupOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -326,6 +344,7 @@ public interface BackupOrBuilder * @return Whether the encryptionInfo field is set. */ boolean hasEncryptionInfo(); + /** * * @@ -340,6 +359,7 @@ public interface BackupOrBuilder * @return The encryptionInfo. */ com.google.bigtable.admin.v2.EncryptionInfo getEncryptionInfo(); + /** * * @@ -352,4 +372,88 @@ public interface BackupOrBuilder * */ com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrBuilder(); + + /** + * + * + *
    +   * Indicates the backup type of the backup.
    +   * 
    + * + * .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; + * + * @return The enum numeric value on the wire for backupType. + */ + int getBackupTypeValue(); + + /** + * + * + *
    +   * Indicates the backup type of the backup.
    +   * 
    + * + * .google.bigtable.admin.v2.Backup.BackupType backup_type = 11; + * + * @return The backupType. + */ + com.google.bigtable.admin.v2.Backup.BackupType getBackupType(); + + /** + * + * + *
    +   * The time at which the hot backup will be converted to a standard backup.
    +   * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +   * hot backup to a standard backup. This value must be greater than the backup
    +   * creation time by:
    +   * - At least 24 hours
    +   *
    +   * This field only applies for hot backups. When creating or updating a
    +   * standard backup, attempting to set this field will fail the request.
    +   * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + * + * @return Whether the hotToStandardTime field is set. + */ + boolean hasHotToStandardTime(); + + /** + * + * + *
    +   * The time at which the hot backup will be converted to a standard backup.
    +   * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +   * hot backup to a standard backup. This value must be greater than the backup
    +   * creation time by:
    +   * - At least 24 hours
    +   *
    +   * This field only applies for hot backups. When creating or updating a
    +   * standard backup, attempting to set this field will fail the request.
    +   * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + * + * @return The hotToStandardTime. + */ + com.google.protobuf.Timestamp getHotToStandardTime(); + + /** + * + * + *
    +   * The time at which the hot backup will be converted to a standard backup.
    +   * Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
    +   * hot backup to a standard backup. This value must be greater than the backup
    +   * creation time by:
    +   * - At least 24 hours
    +   *
    +   * This field only applies for hot backups. When creating or updating a
    +   * standard backup, attempting to set this field will fail the request.
    +   * 
    + * + * .google.protobuf.Timestamp hot_to_standard_time = 12; + */ + com.google.protobuf.TimestampOrBuilder getHotToStandardTimeOrBuilder(); } 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 ea06b5e132..220de525c8 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public final class BigtableInstanceAdminProto { @@ -144,6 +144,70 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_admin_v2_ListHotTabletsResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_admin_v2_DeleteMaterializedViewRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -270,121 +334,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\342\001\n\034com.google.bigtable.ad" - + "min.v2B\032BigtableInstanceAdminProtoP\001Z=go" - + "ogle.golang.org/genproto/googleapis/bigt" - + "able/admin/v2;admin\252\002\036Google.Cloud.Bigta" - + "ble.Admin.V2\312\002\036Google\\Cloud\\Bigtable\\Adm" - + "in\\V2\352\002\"Google::Cloud::Bigtable::Admin::" - + "V2b\006proto3" + + "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( @@ -638,6 +832,134 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "HotTablets", "NextPageToken", }); + internal_static_google_bigtable_admin_v2_CreateLogicalViewRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_bigtable_admin_v2_CreateLogicalViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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().getMessageTypes().get(27); + internal_static_google_bigtable_admin_v2_CreateLogicalViewMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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().getMessageTypes().get(28); + internal_static_google_bigtable_admin_v2_GetLogicalViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_GetLogicalViewRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_bigtable_admin_v2_ListLogicalViewsRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_bigtable_admin_v2_ListLogicalViewsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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().getMessageTypes().get(30); + internal_static_google_bigtable_admin_v2_ListLogicalViewsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_ListLogicalViewsResponse_descriptor, + new java.lang.String[] { + "LogicalViews", "NextPageToken", + }); + internal_static_google_bigtable_admin_v2_UpdateLogicalViewRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_bigtable_admin_v2_UpdateLogicalViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_UpdateLogicalViewRequest_descriptor, + new java.lang.String[] { + "LogicalView", "UpdateMask", + }); + internal_static_google_bigtable_admin_v2_UpdateLogicalViewMetadata_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_bigtable_admin_v2_UpdateLogicalViewMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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().getMessageTypes().get(33); + internal_static_google_bigtable_admin_v2_DeleteLogicalViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_DeleteLogicalViewRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", + }); + internal_static_google_bigtable_admin_v2_CreateMaterializedViewRequest_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_google_bigtable_admin_v2_CreateMaterializedViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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().getMessageTypes().get(35); + internal_static_google_bigtable_admin_v2_CreateMaterializedViewMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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().getMessageTypes().get(36); + internal_static_google_bigtable_admin_v2_GetMaterializedViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_GetMaterializedViewRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_bigtable_admin_v2_ListMaterializedViewsRequest_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_bigtable_admin_v2_ListMaterializedViewsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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().getMessageTypes().get(38); + internal_static_google_bigtable_admin_v2_ListMaterializedViewsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_ListMaterializedViewsResponse_descriptor, + new java.lang.String[] { + "MaterializedViews", "NextPageToken", + }); + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewRequest_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewRequest_descriptor, + new java.lang.String[] { + "MaterializedView", "UpdateMask", + }); + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewMetadata_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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().getMessageTypes().get(41); + internal_static_google_bigtable_admin_v2_DeleteMaterializedViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_DeleteMaterializedViewRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); 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 519621b5bb..ce8c3b01b0 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public final class BigtableTableAdminProto { @@ -216,6 +216,38 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_admin_v2_DeleteAuthorizedViewRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_admin_v2_DeleteSchemaBundleRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -225,7 +257,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,352 +267,428 @@ 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) { super(builder); @@ -64,6 +65,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 +85,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasRetentionPeriod() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -104,6 +107,7 @@ public com.google.protobuf.Duration getRetentionPeriod() { ? com.google.protobuf.Duration.getDefaultInstance() : retentionPeriod_; } + /** * * @@ -288,6 +292,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -492,6 +497,7 @@ public Builder mergeFrom( com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> retentionPeriodBuilder_; + /** * * @@ -510,6 +516,7 @@ public Builder mergeFrom( public boolean hasRetentionPeriod() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -534,6 +541,7 @@ public com.google.protobuf.Duration getRetentionPeriod() { return retentionPeriodBuilder_.getMessage(); } } + /** * * @@ -560,6 +568,7 @@ public Builder setRetentionPeriod(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -583,6 +592,7 @@ public Builder setRetentionPeriod(com.google.protobuf.Duration.Builder builderFo onChanged(); return this; } + /** * * @@ -614,6 +624,7 @@ public Builder mergeRetentionPeriod(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -637,6 +648,7 @@ public Builder clearRetentionPeriod() { onChanged(); return this; } + /** * * @@ -655,6 +667,7 @@ public com.google.protobuf.Duration.Builder getRetentionPeriodBuilder() { onChanged(); return getRetentionPeriodFieldBuilder().getBuilder(); } + /** * * @@ -677,6 +690,7 @@ public com.google.protobuf.DurationOrBuilder getRetentionPeriodOrBuilder() { : retentionPeriod_; } } + /** * * 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..0b6fd1d8ec 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ChangeStreamConfigOrBuilder @@ -40,6 +40,7 @@ public interface ChangeStreamConfigOrBuilder * @return Whether the retentionPeriod field is set. */ boolean hasRetentionPeriod(); + /** * * @@ -56,6 +57,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..079dc17f23 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class CheckConsistencyRequest extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CheckConsistencyRequest) CheckConsistencyRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CheckConsistencyRequest.newBuilder() to construct. private CheckConsistencyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -82,6 +83,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 +120,7 @@ public ModeCase getModeCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -145,6 +148,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -177,6 +181,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object consistencyToken_ = ""; + /** * * @@ -200,6 +205,7 @@ public java.lang.String getConsistencyToken() { return s; } } + /** * * @@ -225,6 +231,7 @@ public com.google.protobuf.ByteString getConsistencyTokenBytes() { } public static final int STANDARD_READ_REMOTE_WRITES_FIELD_NUMBER = 3; + /** * * @@ -243,6 +250,7 @@ public com.google.protobuf.ByteString getConsistencyTokenBytes() { public boolean hasStandardReadRemoteWrites() { return modeCase_ == 3; } + /** * * @@ -264,6 +272,7 @@ public com.google.bigtable.admin.v2.StandardReadRemoteWrites getStandardReadRemo } return com.google.bigtable.admin.v2.StandardReadRemoteWrites.getDefaultInstance(); } + /** * * @@ -286,6 +295,7 @@ public com.google.bigtable.admin.v2.StandardReadRemoteWrites getStandardReadRemo } public static final int DATA_BOOST_READ_LOCAL_WRITES_FIELD_NUMBER = 4; + /** * * @@ -304,6 +314,7 @@ public com.google.bigtable.admin.v2.StandardReadRemoteWrites getStandardReadRemo public boolean hasDataBoostReadLocalWrites() { return modeCase_ == 4; } + /** * * @@ -325,6 +336,7 @@ public com.google.bigtable.admin.v2.DataBoostReadLocalWrites getDataBoostReadLoc } return com.google.bigtable.admin.v2.DataBoostReadLocalWrites.getDefaultInstance(); } + /** * * @@ -555,6 +567,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -819,6 +832,7 @@ public Builder clearMode() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -845,6 +859,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -871,6 +886,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -896,6 +912,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -917,6 +934,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -945,6 +963,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object consistencyToken_ = ""; + /** * * @@ -967,6 +986,7 @@ public java.lang.String getConsistencyToken() { return (java.lang.String) ref; } } + /** * * @@ -989,6 +1009,7 @@ public com.google.protobuf.ByteString getConsistencyTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1010,6 +1031,7 @@ public Builder setConsistencyToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1027,6 +1049,7 @@ public Builder clearConsistencyToken() { onChanged(); return this; } + /** * * @@ -1055,6 +1078,7 @@ public Builder setConsistencyTokenBytes(com.google.protobuf.ByteString value) { com.google.bigtable.admin.v2.StandardReadRemoteWrites.Builder, com.google.bigtable.admin.v2.StandardReadRemoteWritesOrBuilder> standardReadRemoteWritesBuilder_; + /** * * @@ -1073,6 +1097,7 @@ public Builder setConsistencyTokenBytes(com.google.protobuf.ByteString value) { public boolean hasStandardReadRemoteWrites() { return modeCase_ == 3; } + /** * * @@ -1101,6 +1126,7 @@ public com.google.bigtable.admin.v2.StandardReadRemoteWrites getStandardReadRemo return com.google.bigtable.admin.v2.StandardReadRemoteWrites.getDefaultInstance(); } } + /** * * @@ -1127,6 +1153,7 @@ public Builder setStandardReadRemoteWrites( modeCase_ = 3; return this; } + /** * * @@ -1150,6 +1177,7 @@ public Builder setStandardReadRemoteWrites( modeCase_ = 3; return this; } + /** * * @@ -1187,6 +1215,7 @@ public Builder mergeStandardReadRemoteWrites( modeCase_ = 3; return this; } + /** * * @@ -1215,6 +1244,7 @@ public Builder clearStandardReadRemoteWrites() { } return this; } + /** * * @@ -1231,6 +1261,7 @@ public Builder clearStandardReadRemoteWrites() { getStandardReadRemoteWritesBuilder() { return getStandardReadRemoteWritesFieldBuilder().getBuilder(); } + /** * * @@ -1255,6 +1286,7 @@ public Builder clearStandardReadRemoteWrites() { return com.google.bigtable.admin.v2.StandardReadRemoteWrites.getDefaultInstance(); } } + /** * * @@ -1296,6 +1328,7 @@ public Builder clearStandardReadRemoteWrites() { com.google.bigtable.admin.v2.DataBoostReadLocalWrites.Builder, com.google.bigtable.admin.v2.DataBoostReadLocalWritesOrBuilder> dataBoostReadLocalWritesBuilder_; + /** * * @@ -1314,6 +1347,7 @@ public Builder clearStandardReadRemoteWrites() { public boolean hasDataBoostReadLocalWrites() { return modeCase_ == 4; } + /** * * @@ -1342,6 +1376,7 @@ public com.google.bigtable.admin.v2.DataBoostReadLocalWrites getDataBoostReadLoc return com.google.bigtable.admin.v2.DataBoostReadLocalWrites.getDefaultInstance(); } } + /** * * @@ -1368,6 +1403,7 @@ public Builder setDataBoostReadLocalWrites( modeCase_ = 4; return this; } + /** * * @@ -1391,6 +1427,7 @@ public Builder setDataBoostReadLocalWrites( modeCase_ = 4; return this; } + /** * * @@ -1428,6 +1465,7 @@ public Builder mergeDataBoostReadLocalWrites( modeCase_ = 4; return this; } + /** * * @@ -1456,6 +1494,7 @@ public Builder clearDataBoostReadLocalWrites() { } return this; } + /** * * @@ -1472,6 +1511,7 @@ public Builder clearDataBoostReadLocalWrites() { getDataBoostReadLocalWritesBuilder() { return getDataBoostReadLocalWritesFieldBuilder().getBuilder(); } + /** * * @@ -1496,6 +1536,7 @@ public Builder clearDataBoostReadLocalWrites() { return com.google.bigtable.admin.v2.DataBoostReadLocalWrites.getDefaultInstance(); } } + /** * * 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..0dba315357 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CheckConsistencyRequestOrBuilder @@ -40,6 +40,7 @@ public interface CheckConsistencyRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -69,6 +70,7 @@ public interface CheckConsistencyRequestOrBuilder * @return The consistencyToken. */ java.lang.String getConsistencyToken(); + /** * * @@ -97,6 +99,7 @@ public interface CheckConsistencyRequestOrBuilder * @return Whether the standardReadRemoteWrites field is set. */ boolean hasStandardReadRemoteWrites(); + /** * * @@ -112,6 +115,7 @@ public interface CheckConsistencyRequestOrBuilder * @return The standardReadRemoteWrites. */ com.google.bigtable.admin.v2.StandardReadRemoteWrites getStandardReadRemoteWrites(); + /** * * @@ -142,6 +146,7 @@ public interface CheckConsistencyRequestOrBuilder * @return Whether the dataBoostReadLocalWrites field is set. */ boolean hasDataBoostReadLocalWrites(); + /** * * @@ -157,6 +162,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..f057352201 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class CheckConsistencyResponse extends com.google.protobuf.Generate // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CheckConsistencyResponse) CheckConsistencyResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use CheckConsistencyResponse.newBuilder() to construct. private CheckConsistencyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int CONSISTENT_FIELD_NUMBER = 1; private boolean consistent_ = false; + /** * * @@ -241,6 +243,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -424,6 +427,7 @@ public Builder mergeFrom( private int bitField0_; private boolean consistent_; + /** * * @@ -440,6 +444,7 @@ public Builder mergeFrom( public boolean getConsistent() { return consistent_; } + /** * * @@ -460,6 +465,7 @@ public Builder setConsistent(boolean value) { onChanged(); return this; } + /** * * 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..105e66c330 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CheckConsistencyResponseOrBuilder 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..a8188c11e4 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/instance.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -35,6 +35,7 @@ public final class Cluster extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Cluster) ClusterOrBuilder { private static final long serialVersionUID = 0L; + // Use Cluster.newBuilder() to construct. private Cluster(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -44,6 +45,7 @@ private Cluster() { name_ = ""; location_ = ""; state_ = 0; + nodeScalingFactor_ = 0; defaultStorageType_ = 0; } @@ -148,6 +150,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_NOT_KNOWN = 0; */ public static final int STATE_NOT_KNOWN_VALUE = 0; + /** * * @@ -158,6 +161,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * READY = 1; */ public static final int READY_VALUE = 1; + /** * * @@ -170,6 +174,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * CREATING = 2; */ public static final int CREATING_VALUE = 2; + /** * * @@ -184,6 +189,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * RESIZING = 3; */ public static final int RESIZING_VALUE = 3; + /** * * @@ -283,6 +289,173 @@ 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), + ; + + /** + * + * + *
    +     * 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 final 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 +475,7 @@ public interface ClusterAutoscalingConfigOrBuilder * @return Whether the autoscalingLimits field is set. */ boolean hasAutoscalingLimits(); + /** * * @@ -316,6 +490,7 @@ public interface ClusterAutoscalingConfigOrBuilder * @return The autoscalingLimits. */ com.google.bigtable.admin.v2.AutoscalingLimits getAutoscalingLimits(); + /** * * @@ -343,6 +518,7 @@ public interface ClusterAutoscalingConfigOrBuilder * @return Whether the autoscalingTargets field is set. */ boolean hasAutoscalingTargets(); + /** * * @@ -357,6 +533,7 @@ public interface ClusterAutoscalingConfigOrBuilder * @return The autoscalingTargets. */ com.google.bigtable.admin.v2.AutoscalingTargets getAutoscalingTargets(); + /** * * @@ -370,6 +547,7 @@ public interface ClusterAutoscalingConfigOrBuilder */ com.google.bigtable.admin.v2.AutoscalingTargetsOrBuilder getAutoscalingTargetsOrBuilder(); } + /** * * @@ -384,6 +562,7 @@ public static final class ClusterAutoscalingConfig extends com.google.protobuf.G // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig) ClusterAutoscalingConfigOrBuilder { private static final long serialVersionUID = 0L; + // Use ClusterAutoscalingConfig.newBuilder() to construct. private ClusterAutoscalingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -415,6 +594,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 +612,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasAutoscalingLimits() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -451,6 +632,7 @@ public com.google.bigtable.admin.v2.AutoscalingLimits getAutoscalingLimits() { ? com.google.bigtable.admin.v2.AutoscalingLimits.getDefaultInstance() : autoscalingLimits_; } + /** * * @@ -471,6 +653,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 +671,7 @@ public com.google.bigtable.admin.v2.AutoscalingLimitsOrBuilder getAutoscalingLim public boolean hasAutoscalingTargets() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -507,6 +691,7 @@ public com.google.bigtable.admin.v2.AutoscalingTargets getAutoscalingTargets() { ? com.google.bigtable.admin.v2.AutoscalingTargets.getDefaultInstance() : autoscalingTargets_; } + /** * * @@ -707,6 +892,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -944,6 +1130,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.AutoscalingLimits.Builder, com.google.bigtable.admin.v2.AutoscalingLimitsOrBuilder> autoscalingLimitsBuilder_; + /** * * @@ -960,6 +1147,7 @@ public Builder mergeFrom( public boolean hasAutoscalingLimits() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -982,6 +1170,7 @@ public com.google.bigtable.admin.v2.AutoscalingLimits getAutoscalingLimits() { return autoscalingLimitsBuilder_.getMessage(); } } + /** * * @@ -1006,6 +1195,7 @@ public Builder setAutoscalingLimits(com.google.bigtable.admin.v2.AutoscalingLimi onChanged(); return this; } + /** * * @@ -1028,6 +1218,7 @@ public Builder setAutoscalingLimits( onChanged(); return this; } + /** * * @@ -1058,6 +1249,7 @@ public Builder mergeAutoscalingLimits(com.google.bigtable.admin.v2.AutoscalingLi } return this; } + /** * * @@ -1079,6 +1271,7 @@ public Builder clearAutoscalingLimits() { onChanged(); return this; } + /** * * @@ -1095,6 +1288,7 @@ public com.google.bigtable.admin.v2.AutoscalingLimits.Builder getAutoscalingLimi onChanged(); return getAutoscalingLimitsFieldBuilder().getBuilder(); } + /** * * @@ -1116,6 +1310,7 @@ public com.google.bigtable.admin.v2.AutoscalingLimits.Builder getAutoscalingLimi : autoscalingLimits_; } } + /** * * @@ -1150,6 +1345,7 @@ public com.google.bigtable.admin.v2.AutoscalingLimits.Builder getAutoscalingLimi com.google.bigtable.admin.v2.AutoscalingTargets.Builder, com.google.bigtable.admin.v2.AutoscalingTargetsOrBuilder> autoscalingTargetsBuilder_; + /** * * @@ -1166,6 +1362,7 @@ public com.google.bigtable.admin.v2.AutoscalingLimits.Builder getAutoscalingLimi public boolean hasAutoscalingTargets() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1188,6 +1385,7 @@ public com.google.bigtable.admin.v2.AutoscalingTargets getAutoscalingTargets() { return autoscalingTargetsBuilder_.getMessage(); } } + /** * * @@ -1212,6 +1410,7 @@ public Builder setAutoscalingTargets(com.google.bigtable.admin.v2.AutoscalingTar onChanged(); return this; } + /** * * @@ -1234,6 +1433,7 @@ public Builder setAutoscalingTargets( onChanged(); return this; } + /** * * @@ -1265,6 +1465,7 @@ public Builder mergeAutoscalingTargets( } return this; } + /** * * @@ -1286,6 +1487,7 @@ public Builder clearAutoscalingTargets() { onChanged(); return this; } + /** * * @@ -1303,6 +1505,7 @@ public Builder clearAutoscalingTargets() { onChanged(); return getAutoscalingTargetsFieldBuilder().getBuilder(); } + /** * * @@ -1324,6 +1527,7 @@ public Builder clearAutoscalingTargets() { : autoscalingTargets_; } } + /** * * @@ -1438,6 +1642,7 @@ public interface ClusterConfigOrBuilder * @return Whether the clusterAutoscalingConfig field is set. */ boolean hasClusterAutoscalingConfig(); + /** * * @@ -1452,6 +1657,7 @@ public interface ClusterConfigOrBuilder * @return The clusterAutoscalingConfig. */ com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig getClusterAutoscalingConfig(); + /** * * @@ -1466,6 +1672,7 @@ public interface ClusterConfigOrBuilder com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfigOrBuilder getClusterAutoscalingConfigOrBuilder(); } + /** * * @@ -1480,6 +1687,7 @@ public static final class ClusterConfig extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Cluster.ClusterConfig) ClusterConfigOrBuilder { private static final long serialVersionUID = 0L; + // Use ClusterConfig.newBuilder() to construct. private ClusterConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -1511,6 +1719,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 +1737,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasClusterAutoscalingConfig() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1548,6 +1758,7 @@ public boolean hasClusterAutoscalingConfig() { ? com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.getDefaultInstance() : clusterAutoscalingConfig_; } + /** * * @@ -1735,6 +1946,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1946,6 +2158,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.Builder, com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfigOrBuilder> clusterAutoscalingConfigBuilder_; + /** * * @@ -1962,6 +2175,7 @@ public Builder mergeFrom( public boolean hasClusterAutoscalingConfig() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1985,6 +2199,7 @@ public boolean hasClusterAutoscalingConfig() { return clusterAutoscalingConfigBuilder_.getMessage(); } } + /** * * @@ -2010,6 +2225,7 @@ public Builder setClusterAutoscalingConfig( onChanged(); return this; } + /** * * @@ -2032,6 +2248,7 @@ public Builder setClusterAutoscalingConfig( onChanged(); return this; } + /** * * @@ -2064,6 +2281,7 @@ public Builder mergeClusterAutoscalingConfig( } return this; } + /** * * @@ -2085,6 +2303,7 @@ public Builder clearClusterAutoscalingConfig() { onChanged(); return this; } + /** * * @@ -2102,6 +2321,7 @@ public Builder clearClusterAutoscalingConfig() { onChanged(); return getClusterAutoscalingConfigFieldBuilder().getBuilder(); } + /** * * @@ -2123,6 +2343,7 @@ public Builder clearClusterAutoscalingConfig() { : clusterAutoscalingConfig_; } } + /** * * @@ -2231,7 +2452,6 @@ public interface EncryptionConfigOrBuilder * `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}` * @@ -2241,6 +2461,7 @@ public interface EncryptionConfigOrBuilder * @return The kmsKeyName. */ java.lang.String getKmsKeyName(); + /** * * @@ -2252,7 +2473,6 @@ public interface EncryptionConfigOrBuilder * `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}` * @@ -2263,6 +2483,7 @@ public interface EncryptionConfigOrBuilder */ com.google.protobuf.ByteString getKmsKeyNameBytes(); } + /** * * @@ -2278,6 +2499,7 @@ public static final class EncryptionConfig extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Cluster.EncryptionConfig) EncryptionConfigOrBuilder { private static final long serialVersionUID = 0L; + // Use EncryptionConfig.newBuilder() to construct. private EncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -2312,6 +2534,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object kmsKeyName_ = ""; + /** * * @@ -2323,7 +2546,6 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `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}` * @@ -2344,6 +2566,7 @@ public java.lang.String getKmsKeyName() { return s; } } + /** * * @@ -2355,7 +2578,6 @@ public java.lang.String getKmsKeyName() { * `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}` * @@ -2538,6 +2760,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -2726,6 +2949,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object kmsKeyName_ = ""; + /** * * @@ -2737,7 +2961,6 @@ public Builder mergeFrom( * `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}` * @@ -2757,6 +2980,7 @@ public java.lang.String getKmsKeyName() { return (java.lang.String) ref; } } + /** * * @@ -2768,7 +2992,6 @@ public java.lang.String getKmsKeyName() { * `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}` * @@ -2788,6 +3011,7 @@ public com.google.protobuf.ByteString getKmsKeyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2799,7 +3023,6 @@ public com.google.protobuf.ByteString getKmsKeyNameBytes() { * `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}` * @@ -2818,6 +3041,7 @@ public Builder setKmsKeyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2829,7 +3053,6 @@ public Builder setKmsKeyName(java.lang.String value) { * `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}` * @@ -2844,6 +3067,7 @@ public Builder clearKmsKeyName() { onChanged(); return this; } + /** * * @@ -2855,7 +3079,6 @@ public Builder clearKmsKeyName() { * `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}` * @@ -2957,6 +3180,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 +3215,7 @@ public ConfigCase getConfigCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -3015,6 +3240,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -3044,6 +3270,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object location_ = ""; + /** * * @@ -3072,6 +3299,7 @@ public java.lang.String getLocation() { return s; } } + /** * * @@ -3103,6 +3331,7 @@ public com.google.protobuf.ByteString getLocationBytes() { public static final int STATE_FIELD_NUMBER = 3; private int state_ = 0; + /** * * @@ -3120,6 +3349,7 @@ public com.google.protobuf.ByteString getLocationBytes() { public int getStateValue() { return state_; } + /** * * @@ -3142,12 +3372,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 +3391,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 +3451,7 @@ public int getServeNodes() { public boolean hasClusterConfig() { return configCase_ == 7; } + /** * * @@ -3193,6 +3470,7 @@ public com.google.bigtable.admin.v2.Cluster.ClusterConfig getClusterConfig() { } return com.google.bigtable.admin.v2.Cluster.ClusterConfig.getDefaultInstance(); } + /** * * @@ -3212,6 +3490,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 +3509,7 @@ public com.google.bigtable.admin.v2.Cluster.ClusterConfigOrBuilder getClusterCon public int getDefaultStorageTypeValue() { return defaultStorageType_; } + /** * * @@ -3253,6 +3533,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 +3551,7 @@ public com.google.bigtable.admin.v2.StorageType getDefaultStorageType() { public boolean hasEncryptionConfig() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -3289,6 +3571,7 @@ public com.google.bigtable.admin.v2.Cluster.EncryptionConfig getEncryptionConfig ? com.google.bigtable.admin.v2.Cluster.EncryptionConfig.getDefaultInstance() : encryptionConfig_; } + /** * * @@ -3344,6 +3627,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); } @@ -3377,6 +3665,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 +3689,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 +3722,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()) { @@ -3541,6 +3837,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -3595,6 +3892,7 @@ public Builder clear() { location_ = ""; state_ = 0; serveNodes_ = 0; + nodeScalingFactor_ = 0; if (clusterConfigBuilder_ != null) { clusterConfigBuilder_.clear(); } @@ -3654,11 +3952,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; @@ -3735,6 +4036,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,14 +4109,14 @@ public Builder mergeFrom( case 40: { defaultStorageType_ = input.readEnum(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 40 case 50: { input.readMessage( getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 50 case 58: @@ -3821,6 +4125,12 @@ public Builder mergeFrom( configCase_ = 7; break; } // case 58 + case 72: + { + nodeScalingFactor_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 72 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3855,6 +4165,7 @@ public Builder clearConfig() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -3878,6 +4189,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -3901,6 +4213,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3923,6 +4236,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3941,6 +4255,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -3966,6 +4281,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object location_ = ""; + /** * * @@ -3993,6 +4309,7 @@ public java.lang.String getLocation() { return (java.lang.String) ref; } } + /** * * @@ -4020,6 +4337,7 @@ public com.google.protobuf.ByteString getLocationBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4046,6 +4364,7 @@ public Builder setLocation(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4068,6 +4387,7 @@ public Builder clearLocation() { onChanged(); return this; } + /** * * @@ -4097,6 +4417,7 @@ public Builder setLocationBytes(com.google.protobuf.ByteString value) { } private int state_ = 0; + /** * * @@ -4114,6 +4435,7 @@ public Builder setLocationBytes(com.google.protobuf.ByteString value) { public int getStateValue() { return state_; } + /** * * @@ -4134,6 +4456,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -4153,6 +4476,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 +4500,7 @@ public Builder setState(com.google.bigtable.admin.v2.Cluster.State value) { onChanged(); return this; } + /** * * @@ -4197,12 +4522,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 +4540,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 +4562,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 +4583,120 @@ public Builder clearServeNodes() { return this; } + 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.SingleFieldBuilderV3< 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 +4712,7 @@ public Builder clearServeNodes() { public boolean hasClusterConfig() { return configCase_ == 7; } + /** * * @@ -4297,6 +4738,7 @@ public com.google.bigtable.admin.v2.Cluster.ClusterConfig getClusterConfig() { return com.google.bigtable.admin.v2.Cluster.ClusterConfig.getDefaultInstance(); } } + /** * * @@ -4319,6 +4761,7 @@ public Builder setClusterConfig(com.google.bigtable.admin.v2.Cluster.ClusterConf configCase_ = 7; return this; } + /** * * @@ -4339,6 +4782,7 @@ public Builder setClusterConfig( configCase_ = 7; return this; } + /** * * @@ -4371,6 +4815,7 @@ public Builder mergeClusterConfig(com.google.bigtable.admin.v2.Cluster.ClusterCo configCase_ = 7; return this; } + /** * * @@ -4396,6 +4841,7 @@ public Builder clearClusterConfig() { } return this; } + /** * * @@ -4408,6 +4854,7 @@ public Builder clearClusterConfig() { public com.google.bigtable.admin.v2.Cluster.ClusterConfig.Builder getClusterConfigBuilder() { return getClusterConfigFieldBuilder().getBuilder(); } + /** * * @@ -4428,6 +4875,7 @@ public com.google.bigtable.admin.v2.Cluster.ClusterConfigOrBuilder getClusterCon return com.google.bigtable.admin.v2.Cluster.ClusterConfig.getDefaultInstance(); } } + /** * * @@ -4462,6 +4910,7 @@ public com.google.bigtable.admin.v2.Cluster.ClusterConfigOrBuilder getClusterCon } private int defaultStorageType_ = 0; + /** * * @@ -4480,6 +4929,7 @@ public com.google.bigtable.admin.v2.Cluster.ClusterConfigOrBuilder getClusterCon public int getDefaultStorageTypeValue() { return defaultStorageType_; } + /** * * @@ -4497,10 +4947,11 @@ public int getDefaultStorageTypeValue() { */ public Builder setDefaultStorageTypeValue(int value) { defaultStorageType_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } + /** * * @@ -4521,6 +4972,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 +4992,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,7 +5013,7 @@ 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; @@ -4572,6 +5025,7 @@ public Builder clearDefaultStorageType() { com.google.bigtable.admin.v2.Cluster.EncryptionConfig.Builder, com.google.bigtable.admin.v2.Cluster.EncryptionConfigOrBuilder> encryptionConfigBuilder_; + /** * * @@ -4586,8 +5040,9 @@ public Builder clearDefaultStorageType() { * @return Whether the encryptionConfig field is set. */ public boolean hasEncryptionConfig() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } + /** * * @@ -4610,6 +5065,7 @@ public com.google.bigtable.admin.v2.Cluster.EncryptionConfig getEncryptionConfig return encryptionConfigBuilder_.getMessage(); } } + /** * * @@ -4631,10 +5087,11 @@ public Builder setEncryptionConfig( } else { encryptionConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } + /** * * @@ -4653,10 +5110,11 @@ public Builder setEncryptionConfig( } else { encryptionConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } + /** * * @@ -4671,7 +5129,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 +5141,12 @@ public Builder mergeEncryptionConfig( encryptionConfigBuilder_.mergeFrom(value); } if (encryptionConfig_ != null) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); } return this; } + /** * * @@ -4700,7 +5159,7 @@ public Builder mergeEncryptionConfig( *
    */ public Builder clearEncryptionConfig() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); encryptionConfig_ = null; if (encryptionConfigBuilder_ != null) { encryptionConfigBuilder_.dispose(); @@ -4709,6 +5168,7 @@ public Builder clearEncryptionConfig() { onChanged(); return this; } + /** * * @@ -4722,10 +5182,11 @@ public Builder clearEncryptionConfig() { */ public com.google.bigtable.admin.v2.Cluster.EncryptionConfig.Builder getEncryptionConfigBuilder() { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return getEncryptionConfigFieldBuilder().getBuilder(); } + /** * * @@ -4747,6 +5208,7 @@ public Builder clearEncryptionConfig() { : encryptionConfig_; } } + /** * * 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..e293bcb599 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 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. 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..6761690fa5 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/instance.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ClusterOrBuilder @@ -37,6 +37,7 @@ public interface ClusterOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -68,6 +69,7 @@ public interface ClusterOrBuilder * @return The location. */ java.lang.String getLocation(); + /** * * @@ -100,6 +102,7 @@ public interface ClusterOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -119,8 +122,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 +133,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 +175,7 @@ public interface ClusterOrBuilder * @return Whether the clusterConfig field is set. */ boolean hasClusterConfig(); + /** * * @@ -153,6 +188,7 @@ public interface ClusterOrBuilder * @return The clusterConfig. */ com.google.bigtable.admin.v2.Cluster.ClusterConfig getClusterConfig(); + /** * * @@ -179,6 +215,7 @@ public interface ClusterOrBuilder * @return The enum numeric value on the wire for defaultStorageType. */ int getDefaultStorageTypeValue(); + /** * * @@ -209,6 +246,7 @@ public interface ClusterOrBuilder * @return Whether the encryptionConfig field is set. */ boolean hasEncryptionConfig(); + /** * * @@ -223,6 +261,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..e15c443a6e 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class ColumnFamily extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ColumnFamily) ColumnFamilyOrBuilder { private static final long serialVersionUID = 0L; + // Use ColumnFamily.newBuilder() to construct. private ColumnFamily(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,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 +86,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasGcRule() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -104,6 +107,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 +129,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_; + /** * * @@ -149,6 +154,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getGcRuleOrBuilder() { public boolean hasValueType() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -173,6 +179,7 @@ public boolean hasValueType() { public com.google.bigtable.admin.v2.Type getValueType() { return valueType_ == null ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : valueType_; } + /** * * @@ -374,6 +381,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -595,6 +603,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder> gcRuleBuilder_; + /** * * @@ -614,6 +623,7 @@ public Builder mergeFrom( public boolean hasGcRule() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -637,6 +647,7 @@ public com.google.bigtable.admin.v2.GcRule getGcRule() { return gcRuleBuilder_.getMessage(); } } + /** * * @@ -664,6 +675,7 @@ public Builder setGcRule(com.google.bigtable.admin.v2.GcRule value) { onChanged(); return this; } + /** * * @@ -688,6 +700,7 @@ public Builder setGcRule(com.google.bigtable.admin.v2.GcRule.Builder builderForV onChanged(); return this; } + /** * * @@ -720,6 +733,7 @@ public Builder mergeGcRule(com.google.bigtable.admin.v2.GcRule value) { } return this; } + /** * * @@ -744,6 +758,7 @@ public Builder clearGcRule() { onChanged(); return this; } + /** * * @@ -763,6 +778,7 @@ public com.google.bigtable.admin.v2.GcRule.Builder getGcRuleBuilder() { onChanged(); return getGcRuleFieldBuilder().getBuilder(); } + /** * * @@ -784,6 +800,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getGcRuleOrBuilder() { return gcRule_ == null ? com.google.bigtable.admin.v2.GcRule.getDefaultInstance() : gcRule_; } } + /** * * @@ -821,6 +838,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getGcRuleOrBuilder() { com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder> valueTypeBuilder_; + /** * * @@ -844,6 +862,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getGcRuleOrBuilder() { public boolean hasValueType() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -873,6 +892,7 @@ public com.google.bigtable.admin.v2.Type getValueType() { return valueTypeBuilder_.getMessage(); } } + /** * * @@ -904,6 +924,7 @@ public Builder setValueType(com.google.bigtable.admin.v2.Type value) { onChanged(); return this; } + /** * * @@ -932,6 +953,7 @@ public Builder setValueType(com.google.bigtable.admin.v2.Type.Builder builderFor onChanged(); return this; } + /** * * @@ -968,6 +990,7 @@ public Builder mergeValueType(com.google.bigtable.admin.v2.Type value) { } return this; } + /** * * @@ -996,6 +1019,7 @@ public Builder clearValueType() { onChanged(); return this; } + /** * * @@ -1019,6 +1043,7 @@ public com.google.bigtable.admin.v2.Type.Builder getValueTypeBuilder() { onChanged(); return getValueTypeFieldBuilder().getBuilder(); } + /** * * @@ -1046,6 +1071,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getValueTypeOrBuilder() { : valueType_; } } + /** * * 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..22249f1661 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ColumnFamilyOrBuilder @@ -41,6 +41,7 @@ public interface ColumnFamilyOrBuilder * @return Whether the gcRule field is set. */ boolean hasGcRule(); + /** * * @@ -58,6 +59,7 @@ public interface ColumnFamilyOrBuilder * @return The gcRule. */ com.google.bigtable.admin.v2.GcRule getGcRule(); + /** * * @@ -95,6 +97,7 @@ public interface ColumnFamilyOrBuilder * @return Whether the valueType field is set. */ boolean hasValueType(); + /** * * @@ -116,6 +119,7 @@ public interface ColumnFamilyOrBuilder * @return The valueType. */ com.google.bigtable.admin.v2.Type getValueType(); + /** * * 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 8676a0d306..9cb618a1ca 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/common.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public final class CommonProto { @@ -41,20 +41,22 @@ 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\323\001\n\034com.google.b" - + "igtable.admin.v2B\013CommonProtoP\001Z=google." - + "golang.org/genproto/googleapis/bigtable/" - + "admin/v2;admin\252\002\036Google.Cloud.Bigtable.A" - + "dmin.V2\312\002\036Google\\Cloud\\Bigtable\\Admin\\V2" - + "\352\002\"Google::Cloud::Bigtable::Admin::V2b\006p" - + "roto3" + "\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" + + "ogle::Cloud::Bigtable::Admin::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( 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..16472b7867 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class CopyBackupMetadata extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CopyBackupMetadata) CopyBackupMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use CopyBackupMetadata.newBuilder() to construct. private CopyBackupMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -94,6 +96,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -122,6 +125,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 +141,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasSourceBackupInfo() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -154,6 +159,7 @@ public com.google.bigtable.admin.v2.BackupInfo getSourceBackupInfo() { ? com.google.bigtable.admin.v2.BackupInfo.getDefaultInstance() : sourceBackupInfo_; } + /** * * @@ -172,6 +178,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 +196,7 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getSourceBackupInfoOrBui public boolean hasProgress() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -208,6 +216,7 @@ public com.google.bigtable.admin.v2.OperationProgress getProgress() { ? com.google.bigtable.admin.v2.OperationProgress.getDefaultInstance() : progress_; } + /** * * @@ -413,6 +422,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -648,6 +658,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -672,6 +683,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -696,6 +708,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -719,6 +732,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -738,6 +752,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -769,6 +784,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { com.google.bigtable.admin.v2.BackupInfo.Builder, com.google.bigtable.admin.v2.BackupInfoOrBuilder> sourceBackupInfoBuilder_; + /** * * @@ -783,6 +799,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasSourceBackupInfo() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -803,6 +820,7 @@ public com.google.bigtable.admin.v2.BackupInfo getSourceBackupInfo() { return sourceBackupInfoBuilder_.getMessage(); } } + /** * * @@ -825,6 +843,7 @@ public Builder setSourceBackupInfo(com.google.bigtable.admin.v2.BackupInfo value onChanged(); return this; } + /** * * @@ -845,6 +864,7 @@ public Builder setSourceBackupInfo( onChanged(); return this; } + /** * * @@ -872,6 +892,7 @@ public Builder mergeSourceBackupInfo(com.google.bigtable.admin.v2.BackupInfo val } return this; } + /** * * @@ -891,6 +912,7 @@ public Builder clearSourceBackupInfo() { onChanged(); return this; } + /** * * @@ -905,6 +927,7 @@ public com.google.bigtable.admin.v2.BackupInfo.Builder getSourceBackupInfoBuilde onChanged(); return getSourceBackupInfoFieldBuilder().getBuilder(); } + /** * * @@ -923,6 +946,7 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getSourceBackupInfoOrBui : sourceBackupInfo_; } } + /** * * @@ -955,6 +979,7 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getSourceBackupInfoOrBui com.google.bigtable.admin.v2.OperationProgress.Builder, com.google.bigtable.admin.v2.OperationProgressOrBuilder> progressBuilder_; + /** * * @@ -971,6 +996,7 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getSourceBackupInfoOrBui public boolean hasProgress() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -993,6 +1019,7 @@ public com.google.bigtable.admin.v2.OperationProgress getProgress() { return progressBuilder_.getMessage(); } } + /** * * @@ -1017,6 +1044,7 @@ public Builder setProgress(com.google.bigtable.admin.v2.OperationProgress value) onChanged(); return this; } + /** * * @@ -1039,6 +1067,7 @@ public Builder setProgress( onChanged(); return this; } + /** * * @@ -1068,6 +1097,7 @@ public Builder mergeProgress(com.google.bigtable.admin.v2.OperationProgress valu } return this; } + /** * * @@ -1089,6 +1119,7 @@ public Builder clearProgress() { onChanged(); return this; } + /** * * @@ -1105,6 +1136,7 @@ public com.google.bigtable.admin.v2.OperationProgress.Builder getProgressBuilder onChanged(); return getProgressFieldBuilder().getBuilder(); } + /** * * @@ -1125,6 +1157,7 @@ public com.google.bigtable.admin.v2.OperationProgressOrBuilder getProgressOrBuil : progress_; } } + /** * * 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..59395b4e4f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CopyBackupMetadataOrBuilder @@ -38,6 +38,7 @@ public interface CopyBackupMetadataOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -65,6 +66,7 @@ public interface CopyBackupMetadataOrBuilder * @return Whether the sourceBackupInfo field is set. */ boolean hasSourceBackupInfo(); + /** * * @@ -77,6 +79,7 @@ public interface CopyBackupMetadataOrBuilder * @return The sourceBackupInfo. */ com.google.bigtable.admin.v2.BackupInfo getSourceBackupInfo(); + /** * * @@ -102,6 +105,7 @@ public interface CopyBackupMetadataOrBuilder * @return Whether the progress field is set. */ boolean hasProgress(); + /** * * @@ -116,6 +120,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 69d472c190..2459b5f255 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class CopyBackupRequest extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CopyBackupRequest) CopyBackupRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CopyBackupRequest.newBuilder() to construct. private CopyBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -71,12 +72,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * *
        * Required. The name of the destination cluster that will contain the backup
    -   * copy. The cluster must already exists. Values are of the form:
    +   * copy. The cluster must already exist. Values are of the form:
        * `projects/{project}/instances/{instance}/clusters/{cluster}`.
        * 
    * @@ -98,12 +100,13 @@ public java.lang.String getParent() { return s; } } + /** * * *
        * Required. The name of the destination cluster that will contain the backup
    -   * copy. The cluster must already exists. Values are of the form:
    +   * copy. The cluster must already exist. Values are of the form:
        * `projects/{project}/instances/{instance}/clusters/{cluster}`.
        * 
    * @@ -130,6 +133,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object backupId_ = ""; + /** * * @@ -158,6 +162,7 @@ public java.lang.String getBackupId() { return s; } } + /** * * @@ -191,6 +196,7 @@ public com.google.protobuf.ByteString getBackupIdBytes() { @SuppressWarnings("serial") private volatile java.lang.Object sourceBackup_ = ""; + /** * * @@ -222,6 +228,7 @@ public java.lang.String getSourceBackup() { return s; } } + /** * * @@ -256,6 +263,7 @@ public com.google.protobuf.ByteString getSourceBackupBytes() { public static final int EXPIRE_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp expireTime_; + /** * * @@ -276,6 +284,7 @@ public com.google.protobuf.ByteString getSourceBackupBytes() { public boolean hasExpireTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -296,6 +305,7 @@ public boolean hasExpireTime() { public com.google.protobuf.Timestamp getExpireTime() { return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; } + /** * * @@ -506,6 +516,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -749,12 +760,13 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * *
          * Required. The name of the destination cluster that will contain the backup
    -     * copy. The cluster must already exists. Values are of the form:
    +     * copy. The cluster must already exist. Values are of the form:
          * `projects/{project}/instances/{instance}/clusters/{cluster}`.
          * 
    * @@ -775,12 +787,13 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * *
          * Required. The name of the destination cluster that will contain the backup
    -     * copy. The cluster must already exists. Values are of the form:
    +     * copy. The cluster must already exist. Values are of the form:
          * `projects/{project}/instances/{instance}/clusters/{cluster}`.
          * 
    * @@ -801,12 +814,13 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * *
          * Required. The name of the destination cluster that will contain the backup
    -     * copy. The cluster must already exists. Values are of the form:
    +     * copy. The cluster must already exist. Values are of the form:
          * `projects/{project}/instances/{instance}/clusters/{cluster}`.
          * 
    * @@ -826,12 +840,13 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * *
          * Required. The name of the destination cluster that will contain the backup
    -     * copy. The cluster must already exists. Values are of the form:
    +     * copy. The cluster must already exist. Values are of the form:
          * `projects/{project}/instances/{instance}/clusters/{cluster}`.
          * 
    * @@ -847,12 +862,13 @@ public Builder clearParent() { onChanged(); return this; } + /** * * *
          * Required. The name of the destination cluster that will contain the backup
    -     * copy. The cluster must already exists. Values are of the form:
    +     * copy. The cluster must already exist. Values are of the form:
          * `projects/{project}/instances/{instance}/clusters/{cluster}`.
          * 
    * @@ -875,6 +891,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object backupId_ = ""; + /** * * @@ -902,6 +919,7 @@ public java.lang.String getBackupId() { return (java.lang.String) ref; } } + /** * * @@ -929,6 +947,7 @@ public com.google.protobuf.ByteString getBackupIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -955,6 +974,7 @@ public Builder setBackupId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -977,6 +997,7 @@ public Builder clearBackupId() { onChanged(); return this; } + /** * * @@ -1006,6 +1027,7 @@ public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { } private java.lang.Object sourceBackup_ = ""; + /** * * @@ -1036,6 +1058,7 @@ public java.lang.String getSourceBackup() { return (java.lang.String) ref; } } + /** * * @@ -1066,6 +1089,7 @@ public com.google.protobuf.ByteString getSourceBackupBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1095,6 +1119,7 @@ public Builder setSourceBackup(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1120,6 +1145,7 @@ public Builder clearSourceBackup() { onChanged(); return this; } + /** * * @@ -1157,6 +1183,7 @@ public Builder setSourceBackupBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expireTimeBuilder_; + /** * * @@ -1176,6 +1203,7 @@ public Builder setSourceBackupBytes(com.google.protobuf.ByteString value) { public boolean hasExpireTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1201,6 +1229,7 @@ public com.google.protobuf.Timestamp getExpireTime() { return expireTimeBuilder_.getMessage(); } } + /** * * @@ -1228,6 +1257,7 @@ public Builder setExpireTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1252,6 +1282,7 @@ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1284,6 +1315,7 @@ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1308,6 +1340,7 @@ public Builder clearExpireTime() { onChanged(); return this; } + /** * * @@ -1327,6 +1360,7 @@ public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { onChanged(); return getExpireTimeFieldBuilder().getBuilder(); } + /** * * @@ -1350,6 +1384,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { : expireTime_; } } + /** * * 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 43ca118837..5d3b528a8b 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CopyBackupRequestOrBuilder @@ -29,7 +29,7 @@ public interface CopyBackupRequestOrBuilder * *
        * Required. The name of the destination cluster that will contain the backup
    -   * copy. The cluster must already exists. Values are of the form:
    +   * copy. The cluster must already exist. Values are of the form:
        * `projects/{project}/instances/{instance}/clusters/{cluster}`.
        * 
    * @@ -40,12 +40,13 @@ public interface CopyBackupRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * *
        * Required. The name of the destination cluster that will contain the backup
    -   * copy. The cluster must already exists. Values are of the form:
    +   * copy. The cluster must already exist. Values are of the form:
        * `projects/{project}/instances/{instance}/clusters/{cluster}`.
        * 
    * @@ -74,6 +75,7 @@ public interface CopyBackupRequestOrBuilder * @return The backupId. */ java.lang.String getBackupId(); + /** * * @@ -112,6 +114,7 @@ public interface CopyBackupRequestOrBuilder * @return The sourceBackup. */ java.lang.String getSourceBackup(); + /** * * @@ -150,6 +153,7 @@ public interface CopyBackupRequestOrBuilder * @return Whether the expireTime field is set. */ boolean hasExpireTime(); + /** * * @@ -167,6 +171,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..c67a327f6a 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class CreateAppProfileRequest extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateAppProfileRequest) CreateAppProfileRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateAppProfileRequest.newBuilder() to construct. private CreateAppProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -95,6 +97,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -126,6 +129,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -151,6 +155,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -179,6 +184,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 +203,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public boolean hasAppProfile() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -217,6 +224,7 @@ public com.google.bigtable.admin.v2.AppProfile getAppProfile() { ? com.google.bigtable.admin.v2.AppProfile.getDefaultInstance() : appProfile_; } + /** * * @@ -238,6 +246,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() public static final int IGNORE_WARNINGS_FIELD_NUMBER = 4; private boolean ignoreWarnings_ = false; + /** * * @@ -445,6 +454,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -686,6 +696,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -711,6 +722,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -736,6 +748,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -760,6 +773,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -780,6 +794,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -807,6 +822,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object appProfileId_ = ""; + /** * * @@ -831,6 +847,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -855,6 +872,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -878,6 +896,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -897,6 +916,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -928,6 +948,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { com.google.bigtable.admin.v2.AppProfile.Builder, com.google.bigtable.admin.v2.AppProfileOrBuilder> appProfileBuilder_; + /** * * @@ -945,6 +966,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { public boolean hasAppProfile() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -968,6 +990,7 @@ public com.google.bigtable.admin.v2.AppProfile getAppProfile() { return appProfileBuilder_.getMessage(); } } + /** * * @@ -993,6 +1016,7 @@ public Builder setAppProfile(com.google.bigtable.admin.v2.AppProfile value) { onChanged(); return this; } + /** * * @@ -1015,6 +1039,7 @@ public Builder setAppProfile(com.google.bigtable.admin.v2.AppProfile.Builder bui onChanged(); return this; } + /** * * @@ -1045,6 +1070,7 @@ public Builder mergeAppProfile(com.google.bigtable.admin.v2.AppProfile value) { } return this; } + /** * * @@ -1067,6 +1093,7 @@ public Builder clearAppProfile() { onChanged(); return this; } + /** * * @@ -1084,6 +1111,7 @@ public com.google.bigtable.admin.v2.AppProfile.Builder getAppProfileBuilder() { onChanged(); return getAppProfileFieldBuilder().getBuilder(); } + /** * * @@ -1105,6 +1133,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() : appProfile_; } } + /** * * @@ -1135,6 +1164,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() } private boolean ignoreWarnings_; + /** * * @@ -1150,6 +1180,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() public boolean getIgnoreWarnings() { return ignoreWarnings_; } + /** * * @@ -1169,6 +1200,7 @@ public Builder setIgnoreWarnings(boolean value) { onChanged(); return this; } + /** * * 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..0969a0563d 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CreateAppProfileRequestOrBuilder @@ -39,6 +39,7 @@ public interface CreateAppProfileRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -69,6 +70,7 @@ public interface CreateAppProfileRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -99,6 +101,7 @@ public interface CreateAppProfileRequestOrBuilder * @return Whether the appProfile field is set. */ boolean hasAppProfile(); + /** * * @@ -114,6 +117,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..d987003ff5 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class CreateAuthorizedViewMetadata extends com.google.protobuf.Gene // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateAuthorizedViewMetadata) CreateAuthorizedViewMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateAuthorizedViewMetadata.newBuilder() to construct. private CreateAuthorizedViewMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,11 +65,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 +82,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 +101,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 +122,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 +138,7 @@ public com.google.bigtable.admin.v2.CreateAuthorizedViewRequest getOriginalReque public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -145,6 +154,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -161,6 +171,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -176,6 +187,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -191,6 +203,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -398,6 +411,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -641,11 +655,13 @@ public Builder mergeFrom( 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 +671,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 +693,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 +718,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 +740,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 +771,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 +792,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; @@ -781,11 +809,13 @@ public Builder clearOriginalRequest() { onChanged(); return getOriginalRequestFieldBuilder().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,11 +830,13 @@ 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; @@ -832,6 +864,7 @@ public Builder clearOriginalRequest() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -846,6 +879,7 @@ public Builder clearOriginalRequest() { public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -866,6 +900,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -888,6 +923,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -907,6 +943,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -934,6 +971,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -953,6 +991,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -967,6 +1006,7 @@ public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { onChanged(); return getRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -985,6 +1025,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -1017,6 +1058,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -1031,6 +1073,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1051,6 +1094,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -1073,6 +1117,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1092,6 +1137,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1119,6 +1165,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1138,6 +1185,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -1152,6 +1200,7 @@ public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { onChanged(); return getFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1170,6 +1219,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * 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..452908c5c0 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CreateAuthorizedViewMetadataOrBuilder @@ -28,7 +28,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 +37,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 +51,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 +76,7 @@ public interface CreateAuthorizedViewMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -83,6 +89,7 @@ public interface CreateAuthorizedViewMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -106,6 +113,7 @@ public interface CreateAuthorizedViewMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -118,6 +126,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..2366a53687 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class CreateAuthorizedViewRequest extends com.google.protobuf.Gener // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateAuthorizedViewRequest) CreateAuthorizedViewRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateAuthorizedViewRequest.newBuilder() to construct. private CreateAuthorizedViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -70,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -97,6 +99,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -129,6 +132,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object authorizedViewId_ = ""; + /** * * @@ -155,6 +159,7 @@ public java.lang.String getAuthorizedViewId() { return s; } } + /** * * @@ -184,6 +189,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 +207,7 @@ public com.google.protobuf.ByteString getAuthorizedViewIdBytes() { public boolean hasAuthorizedView() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -220,6 +227,7 @@ public com.google.bigtable.admin.v2.AuthorizedView getAuthorizedView() { ? com.google.bigtable.admin.v2.AuthorizedView.getDefaultInstance() : authorizedView_; } + /** * * @@ -421,6 +429,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -651,6 +660,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -677,6 +687,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -703,6 +714,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -728,6 +740,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -749,6 +762,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -777,6 +791,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object authorizedViewId_ = ""; + /** * * @@ -802,6 +817,7 @@ public java.lang.String getAuthorizedViewId() { return (java.lang.String) ref; } } + /** * * @@ -827,6 +843,7 @@ public com.google.protobuf.ByteString getAuthorizedViewIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -851,6 +868,7 @@ public Builder setAuthorizedViewId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -871,6 +889,7 @@ public Builder clearAuthorizedViewId() { onChanged(); return this; } + /** * * @@ -903,6 +922,7 @@ public Builder setAuthorizedViewIdBytes(com.google.protobuf.ByteString value) { com.google.bigtable.admin.v2.AuthorizedView.Builder, com.google.bigtable.admin.v2.AuthorizedViewOrBuilder> authorizedViewBuilder_; + /** * * @@ -919,6 +939,7 @@ public Builder setAuthorizedViewIdBytes(com.google.protobuf.ByteString value) { public boolean hasAuthorizedView() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -941,6 +962,7 @@ public com.google.bigtable.admin.v2.AuthorizedView getAuthorizedView() { return authorizedViewBuilder_.getMessage(); } } + /** * * @@ -965,6 +987,7 @@ public Builder setAuthorizedView(com.google.bigtable.admin.v2.AuthorizedView val onChanged(); return this; } + /** * * @@ -987,6 +1010,7 @@ public Builder setAuthorizedView( onChanged(); return this; } + /** * * @@ -1017,6 +1041,7 @@ public Builder mergeAuthorizedView(com.google.bigtable.admin.v2.AuthorizedView v } return this; } + /** * * @@ -1038,6 +1063,7 @@ public Builder clearAuthorizedView() { onChanged(); return this; } + /** * * @@ -1054,6 +1080,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.Builder getAuthorizedViewBuil onChanged(); return getAuthorizedViewFieldBuilder().getBuilder(); } + /** * * @@ -1074,6 +1101,7 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewOrB : authorizedView_; } } + /** * * 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..9c944deb8e 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CreateAuthorizedViewRequestOrBuilder @@ -40,6 +40,7 @@ public interface CreateAuthorizedViewRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -72,6 +73,7 @@ public interface CreateAuthorizedViewRequestOrBuilder * @return The authorizedViewId. */ java.lang.String getAuthorizedViewId(); + /** * * @@ -102,6 +104,7 @@ public interface CreateAuthorizedViewRequestOrBuilder * @return Whether the authorizedView field is set. */ boolean hasAuthorizedView(); + /** * * @@ -116,6 +119,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..2be0f8c0b6 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class CreateBackupMetadata extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateBackupMetadata) CreateBackupMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateBackupMetadata.newBuilder() to construct. private CreateBackupMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -70,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +95,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -121,6 +124,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object sourceTable_ = ""; + /** * * @@ -144,6 +148,7 @@ public java.lang.String getSourceTable() { return s; } } + /** * * @@ -170,6 +175,7 @@ public com.google.protobuf.ByteString getSourceTableBytes() { public static final int START_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -185,6 +191,7 @@ public com.google.protobuf.ByteString getSourceTableBytes() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -200,6 +207,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -216,6 +224,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -231,6 +240,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -246,6 +256,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -456,6 +467,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -704,6 +716,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -726,6 +739,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -748,6 +762,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -769,6 +784,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -786,6 +802,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -810,6 +827,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object sourceTable_ = ""; + /** * * @@ -832,6 +850,7 @@ public java.lang.String getSourceTable() { return (java.lang.String) ref; } } + /** * * @@ -854,6 +873,7 @@ public com.google.protobuf.ByteString getSourceTableBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -875,6 +895,7 @@ public Builder setSourceTable(java.lang.String value) { onChanged(); return this; } + /** * * @@ -892,6 +913,7 @@ public Builder clearSourceTable() { onChanged(); return this; } + /** * * @@ -921,6 +943,7 @@ public Builder setSourceTableBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -935,6 +958,7 @@ public Builder setSourceTableBytes(com.google.protobuf.ByteString value) { public boolean hasStartTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -953,6 +977,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -975,6 +1000,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -994,6 +1020,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -1021,6 +1048,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1040,6 +1068,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -1054,6 +1083,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1070,6 +1100,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -1102,6 +1133,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -1116,6 +1148,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1134,6 +1167,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -1156,6 +1190,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1175,6 +1210,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1202,6 +1238,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1221,6 +1258,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1235,6 +1273,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1251,6 +1290,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * 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..d7bb2b12b7 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CreateBackupMetadataOrBuilder @@ -36,6 +36,7 @@ public interface CreateBackupMetadataOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -61,6 +62,7 @@ public interface CreateBackupMetadataOrBuilder * @return The sourceTable. */ java.lang.String getSourceTable(); + /** * * @@ -86,6 +88,7 @@ public interface CreateBackupMetadataOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -98,6 +101,7 @@ public interface CreateBackupMetadataOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -121,6 +125,7 @@ public interface CreateBackupMetadataOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -133,6 +138,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..476c652fdc 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class CreateBackupRequest extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateBackupRequest) CreateBackupRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateBackupRequest.newBuilder() to construct. private CreateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -70,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -97,6 +99,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -129,6 +132,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object backupId_ = ""; + /** * * @@ -157,6 +161,7 @@ public java.lang.String getBackupId() { return s; } } + /** * * @@ -188,6 +193,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 +210,7 @@ public com.google.protobuf.ByteString getBackupIdBytes() { public boolean hasBackup() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -220,6 +227,7 @@ public boolean hasBackup() { public com.google.bigtable.admin.v2.Backup getBackup() { return backup_ == null ? com.google.bigtable.admin.v2.Backup.getDefaultInstance() : backup_; } + /** * * @@ -417,6 +425,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -646,6 +655,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -672,6 +682,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -698,6 +709,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -723,6 +735,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -744,6 +757,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -772,6 +786,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object backupId_ = ""; + /** * * @@ -799,6 +814,7 @@ public java.lang.String getBackupId() { return (java.lang.String) ref; } } + /** * * @@ -826,6 +842,7 @@ public com.google.protobuf.ByteString getBackupIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -852,6 +869,7 @@ public Builder setBackupId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -874,6 +892,7 @@ public Builder clearBackupId() { onChanged(); return this; } + /** * * @@ -908,6 +927,7 @@ public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { com.google.bigtable.admin.v2.Backup.Builder, com.google.bigtable.admin.v2.BackupOrBuilder> backupBuilder_; + /** * * @@ -923,6 +943,7 @@ public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { public boolean hasBackup() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -942,6 +963,7 @@ public com.google.bigtable.admin.v2.Backup getBackup() { return backupBuilder_.getMessage(); } } + /** * * @@ -965,6 +987,7 @@ public Builder setBackup(com.google.bigtable.admin.v2.Backup value) { onChanged(); return this; } + /** * * @@ -985,6 +1008,7 @@ public Builder setBackup(com.google.bigtable.admin.v2.Backup.Builder builderForV onChanged(); return this; } + /** * * @@ -1013,6 +1037,7 @@ public Builder mergeBackup(com.google.bigtable.admin.v2.Backup value) { } return this; } + /** * * @@ -1033,6 +1058,7 @@ public Builder clearBackup() { onChanged(); return this; } + /** * * @@ -1048,6 +1074,7 @@ public com.google.bigtable.admin.v2.Backup.Builder getBackupBuilder() { onChanged(); return getBackupFieldBuilder().getBuilder(); } + /** * * @@ -1065,6 +1092,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupOrBuilder() { return backup_ == null ? com.google.bigtable.admin.v2.Backup.getDefaultInstance() : backup_; } } + /** * * 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..e9ffd9529a 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CreateBackupRequestOrBuilder @@ -40,6 +40,7 @@ public interface CreateBackupRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -74,6 +75,7 @@ public interface CreateBackupRequestOrBuilder * @return The backupId. */ java.lang.String getBackupId(); + /** * * @@ -105,6 +107,7 @@ public interface CreateBackupRequestOrBuilder * @return Whether the backup field is set. */ boolean hasBackup(); + /** * * @@ -118,6 +121,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..c25cc80b76 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class CreateClusterMetadata extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateClusterMetadata) CreateClusterMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateClusterMetadata.newBuilder() to construct. private CreateClusterMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -112,6 +113,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 +121,7 @@ public interface TableProgressOrBuilder */ com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State getState(); } + /** * * @@ -133,6 +136,7 @@ public static final class TableProgress extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateClusterMetadata.TableProgress) TableProgressOrBuilder { private static final long serialVersionUID = 0L; + // Use TableProgress.newBuilder() to construct. private TableProgress(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -214,6 +218,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { /** STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -224,6 +229,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * PENDING = 1; */ public static final int PENDING_VALUE = 1; + /** * * @@ -234,6 +240,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * COPYING = 2; */ public static final int COPYING_VALUE = 2; + /** * * @@ -244,6 +251,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * COMPLETED = 3; */ public static final int COMPLETED_VALUE = 3; + /** * * @@ -348,6 +356,7 @@ private State(int value) { public static final int ESTIMATED_SIZE_BYTES_FIELD_NUMBER = 2; private long estimatedSizeBytes_ = 0L; + /** * * @@ -366,6 +375,7 @@ public long getEstimatedSizeBytes() { public static final int ESTIMATED_COPIED_BYTES_FIELD_NUMBER = 3; private long estimatedCopiedBytes_ = 0L; + /** * * @@ -386,6 +396,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 +406,7 @@ public long getEstimatedCopiedBytes() { public int getStateValue() { return state_; } + /** * .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; * @@ -595,6 +607,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -813,6 +826,7 @@ public Builder mergeFrom( private int bitField0_; private long estimatedSizeBytes_; + /** * * @@ -828,6 +842,7 @@ public Builder mergeFrom( public long getEstimatedSizeBytes() { return estimatedSizeBytes_; } + /** * * @@ -847,6 +862,7 @@ public Builder setEstimatedSizeBytes(long value) { onChanged(); return this; } + /** * * @@ -866,6 +882,7 @@ public Builder clearEstimatedSizeBytes() { } private long estimatedCopiedBytes_; + /** * * @@ -883,6 +900,7 @@ public Builder clearEstimatedSizeBytes() { public long getEstimatedCopiedBytes() { return estimatedCopiedBytes_; } + /** * * @@ -904,6 +922,7 @@ public Builder setEstimatedCopiedBytes(long value) { onChanged(); return this; } + /** * * @@ -925,6 +944,7 @@ public Builder clearEstimatedCopiedBytes() { } private int state_ = 0; + /** * .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; * @@ -934,6 +954,7 @@ public Builder clearEstimatedCopiedBytes() { public int getStateValue() { return state_; } + /** * .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; * @@ -946,6 +967,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; * @@ -960,6 +982,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 +999,7 @@ public Builder setState( onChanged(); return this; } + /** * .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; * @@ -1058,6 +1082,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 +1098,7 @@ public com.google.protobuf.Parser getParserForType() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1090,6 +1116,7 @@ public com.google.bigtable.admin.v2.CreateClusterRequest getOriginalRequest() { ? com.google.bigtable.admin.v2.CreateClusterRequest.getDefaultInstance() : originalRequest_; } + /** * * @@ -1108,6 +1135,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 +1151,7 @@ public com.google.bigtable.admin.v2.CreateClusterRequestOrBuilder getOriginalReq public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1138,6 +1167,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -1154,6 +1184,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -1169,6 +1200,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1184,6 +1216,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -1234,6 +1267,7 @@ private static final class TablesDefaultEntryHolder { public int getTablesCount() { return internalGetTables().getMap().size(); } + /** * * @@ -1259,6 +1293,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 +1302,7 @@ public boolean containsTables(java.lang.String key) { getTables() { return getTablesMap(); } + /** * * @@ -1291,6 +1327,7 @@ public boolean containsTables(java.lang.String key) { getTablesMap() { return internalGetTables().getMap(); } + /** * * @@ -1323,6 +1360,7 @@ public boolean containsTables(java.lang.String key) { map = internalGetTables().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -1568,6 +1606,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1854,6 +1893,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.CreateClusterRequest.Builder, com.google.bigtable.admin.v2.CreateClusterRequestOrBuilder> originalRequestBuilder_; + /** * * @@ -1868,6 +1908,7 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1888,6 +1929,7 @@ public com.google.bigtable.admin.v2.CreateClusterRequest getOriginalRequest() { return originalRequestBuilder_.getMessage(); } } + /** * * @@ -1910,6 +1952,7 @@ public Builder setOriginalRequest(com.google.bigtable.admin.v2.CreateClusterRequ onChanged(); return this; } + /** * * @@ -1930,6 +1973,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -1958,6 +2002,7 @@ public Builder mergeOriginalRequest(com.google.bigtable.admin.v2.CreateClusterRe } return this; } + /** * * @@ -1977,6 +2022,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -1991,6 +2037,7 @@ public com.google.bigtable.admin.v2.CreateClusterRequest.Builder getOriginalRequ onChanged(); return getOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -2010,6 +2057,7 @@ public com.google.bigtable.admin.v2.CreateClusterRequest.Builder getOriginalRequ : originalRequest_; } } + /** * * @@ -2042,6 +2090,7 @@ public com.google.bigtable.admin.v2.CreateClusterRequest.Builder getOriginalRequ com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -2056,6 +2105,7 @@ public com.google.bigtable.admin.v2.CreateClusterRequest.Builder getOriginalRequ public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -2076,6 +2126,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -2098,6 +2149,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -2117,6 +2169,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -2144,6 +2197,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2163,6 +2217,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -2177,6 +2232,7 @@ public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { onChanged(); return getRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -2195,6 +2251,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -2227,6 +2284,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -2241,6 +2299,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -2261,6 +2320,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -2283,6 +2343,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -2302,6 +2363,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -2329,6 +2391,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2348,6 +2411,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -2362,6 +2426,7 @@ public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { onChanged(); return getFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -2380,6 +2445,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * @@ -2427,7 +2493,8 @@ public com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress build( defaultEntry() { return TablesDefaultEntryHolder.defaultEntry; } - }; + } + ; private static final TablesConverter tablesConverter = new TablesConverter(); @@ -2467,6 +2534,7 @@ public com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress build( public int getTablesCount() { return internalGetTables().ensureBuilderMap().size(); } + /** * * @@ -2492,6 +2560,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 +2569,7 @@ public boolean containsTables(java.lang.String key) { getTables() { return getTablesMap(); } + /** * * @@ -2524,6 +2594,7 @@ public boolean containsTables(java.lang.String key) { getTablesMap() { return internalGetTables().getImmutableMap(); } + /** * * @@ -2557,6 +2628,7 @@ public boolean containsTables(java.lang.String key) { map = internalGetMutableTables().ensureBuilderMap(); return map.containsKey(key) ? tablesConverter.build(map.get(key)) : defaultValue; } + /** * * @@ -2596,6 +2668,7 @@ public Builder clearTables() { internalGetMutableTables().clear(); return this; } + /** * * @@ -2621,6 +2694,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 +2703,7 @@ public Builder removeTables(java.lang.String key) { bitField0_ |= 0x00000008; return internalGetMutableTables().ensureMessageMap(); } + /** * * @@ -2660,6 +2735,7 @@ public Builder putTables( bitField0_ |= 0x00000008; return this; } + /** * * @@ -2693,6 +2769,7 @@ public Builder putAllTables( bitField0_ |= 0x00000008; return this; } + /** * * 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..528db7741d 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CreateClusterMetadataOrBuilder @@ -36,6 +36,7 @@ public interface CreateClusterMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -48,6 +49,7 @@ public interface CreateClusterMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.CreateClusterRequest getOriginalRequest(); + /** * * @@ -71,6 +73,7 @@ public interface CreateClusterMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -83,6 +86,7 @@ public interface CreateClusterMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -106,6 +110,7 @@ public interface CreateClusterMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -118,6 +123,7 @@ public interface CreateClusterMetadataOrBuilder * @return The finishTime. */ com.google.protobuf.Timestamp getFinishTime(); + /** * * @@ -148,6 +154,7 @@ public interface CreateClusterMetadataOrBuilder *
    */ int getTablesCount(); + /** * * @@ -167,10 +174,12 @@ public interface CreateClusterMetadataOrBuilder *
    */ boolean containsTables(java.lang.String key); + /** Use {@link #getTablesMap()} instead. */ @java.lang.Deprecated java.util.Map getTables(); + /** * * @@ -191,6 +200,7 @@ public interface CreateClusterMetadataOrBuilder */ java.util.Map getTablesMap(); + /** * * @@ -214,6 +224,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..9f2c538bbd 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class CreateClusterRequest extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateClusterRequest) CreateClusterRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateClusterRequest.newBuilder() to construct. private CreateClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -95,6 +97,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -126,6 +129,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object clusterId_ = ""; + /** * * @@ -151,6 +155,7 @@ public java.lang.String getClusterId() { return s; } } + /** * * @@ -179,6 +184,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 +202,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { public boolean hasCluster() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -213,6 +220,7 @@ public boolean hasCluster() { public com.google.bigtable.admin.v2.Cluster getCluster() { return cluster_ == null ? com.google.bigtable.admin.v2.Cluster.getDefaultInstance() : cluster_; } + /** * * @@ -411,6 +419,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -639,6 +648,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -664,6 +674,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -689,6 +700,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -713,6 +725,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -733,6 +746,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -760,6 +774,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object clusterId_ = ""; + /** * * @@ -784,6 +799,7 @@ public java.lang.String getClusterId() { return (java.lang.String) ref; } } + /** * * @@ -808,6 +824,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -831,6 +848,7 @@ public Builder setClusterId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -850,6 +868,7 @@ public Builder clearClusterId() { onChanged(); return this; } + /** * * @@ -881,6 +900,7 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder> clusterBuilder_; + /** * * @@ -898,6 +918,7 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { public boolean hasCluster() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -921,6 +942,7 @@ public com.google.bigtable.admin.v2.Cluster getCluster() { return clusterBuilder_.getMessage(); } } + /** * * @@ -946,6 +968,7 @@ public Builder setCluster(com.google.bigtable.admin.v2.Cluster value) { onChanged(); return this; } + /** * * @@ -968,6 +991,7 @@ public Builder setCluster(com.google.bigtable.admin.v2.Cluster.Builder builderFo onChanged(); return this; } + /** * * @@ -998,6 +1022,7 @@ public Builder mergeCluster(com.google.bigtable.admin.v2.Cluster value) { } return this; } + /** * * @@ -1020,6 +1045,7 @@ public Builder clearCluster() { onChanged(); return this; } + /** * * @@ -1037,6 +1063,7 @@ public com.google.bigtable.admin.v2.Cluster.Builder getClusterBuilder() { onChanged(); return getClusterFieldBuilder().getBuilder(); } + /** * * @@ -1058,6 +1085,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClusterOrBuilder() { : cluster_; } } + /** * * 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..49b1f8fe22 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CreateClusterRequestOrBuilder @@ -39,6 +39,7 @@ public interface CreateClusterRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -69,6 +70,7 @@ public interface CreateClusterRequestOrBuilder * @return The clusterId. */ java.lang.String getClusterId(); + /** * * @@ -98,6 +100,7 @@ public interface CreateClusterRequestOrBuilder * @return Whether the cluster field is set. */ boolean hasCluster(); + /** * * @@ -112,6 +115,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..c7d0b372d2 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class CreateInstanceMetadata extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateInstanceMetadata) CreateInstanceMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateInstanceMetadata.newBuilder() to construct. private CreateInstanceMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,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 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -96,6 +99,7 @@ public com.google.bigtable.admin.v2.CreateInstanceRequest getOriginalRequest() { ? com.google.bigtable.admin.v2.CreateInstanceRequest.getDefaultInstance() : originalRequest_; } + /** * * @@ -114,6 +118,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 +134,7 @@ public com.google.bigtable.admin.v2.CreateInstanceRequestOrBuilder getOriginalRe public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -144,6 +150,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -160,6 +167,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -175,6 +183,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -190,6 +199,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -396,6 +406,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -639,6 +650,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.CreateInstanceRequest.Builder, com.google.bigtable.admin.v2.CreateInstanceRequestOrBuilder> originalRequestBuilder_; + /** * * @@ -653,6 +665,7 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -673,6 +686,7 @@ public com.google.bigtable.admin.v2.CreateInstanceRequest getOriginalRequest() { return originalRequestBuilder_.getMessage(); } } + /** * * @@ -695,6 +709,7 @@ public Builder setOriginalRequest(com.google.bigtable.admin.v2.CreateInstanceReq onChanged(); return this; } + /** * * @@ -715,6 +730,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -743,6 +759,7 @@ public Builder mergeOriginalRequest(com.google.bigtable.admin.v2.CreateInstanceR } return this; } + /** * * @@ -762,6 +779,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -776,6 +794,7 @@ public com.google.bigtable.admin.v2.CreateInstanceRequest.Builder getOriginalReq onChanged(); return getOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -795,6 +814,7 @@ public com.google.bigtable.admin.v2.CreateInstanceRequest.Builder getOriginalReq : originalRequest_; } } + /** * * @@ -827,6 +847,7 @@ public com.google.bigtable.admin.v2.CreateInstanceRequest.Builder getOriginalReq com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -841,6 +862,7 @@ public com.google.bigtable.admin.v2.CreateInstanceRequest.Builder getOriginalReq public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -861,6 +883,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -883,6 +906,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -902,6 +926,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -929,6 +954,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -948,6 +974,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -962,6 +989,7 @@ public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { onChanged(); return getRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -980,6 +1008,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -1012,6 +1041,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -1026,6 +1056,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1046,6 +1077,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -1068,6 +1100,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1087,6 +1120,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1114,6 +1148,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1133,6 +1168,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -1147,6 +1183,7 @@ public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { onChanged(); return getFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1165,6 +1202,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * 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..e33e8595e0 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CreateInstanceMetadataOrBuilder @@ -36,6 +36,7 @@ public interface CreateInstanceMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -48,6 +49,7 @@ public interface CreateInstanceMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.CreateInstanceRequest getOriginalRequest(); + /** * * @@ -71,6 +73,7 @@ public interface CreateInstanceMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -83,6 +86,7 @@ public interface CreateInstanceMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -106,6 +110,7 @@ public interface CreateInstanceMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -118,6 +123,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..515cd9963b 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class CreateInstanceRequest extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateInstanceRequest) CreateInstanceRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateInstanceRequest.newBuilder() to construct. private CreateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -81,6 +82,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -107,6 +109,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -138,6 +141,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object instanceId_ = ""; + /** * * @@ -163,6 +167,7 @@ public java.lang.String getInstanceId() { return s; } } + /** * * @@ -191,6 +196,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 +215,7 @@ public com.google.protobuf.ByteString getInstanceIdBytes() { public boolean hasInstance() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -229,6 +236,7 @@ public com.google.bigtable.admin.v2.Instance getInstance() { ? com.google.bigtable.admin.v2.Instance.getDefaultInstance() : instance_; } + /** * * @@ -279,6 +287,7 @@ private static final class ClustersDefaultEntryHolder { public int getClustersCount() { return internalGetClusters().getMap().size(); } + /** * * @@ -287,7 +296,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 +309,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 +325,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 +335,7 @@ public java.util.Map get public java.util.Map getClustersMap() { return internalGetClusters().getMap(); } + /** * * @@ -334,7 +344,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 +362,7 @@ public java.util.Map get internalGetClusters().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -361,7 +371,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. * * * @@ -581,6 +590,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -850,6 +860,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -875,6 +886,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -900,6 +912,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -924,6 +937,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -944,6 +958,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -971,6 +986,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object instanceId_ = ""; + /** * * @@ -995,6 +1011,7 @@ public java.lang.String getInstanceId() { return (java.lang.String) ref; } } + /** * * @@ -1019,6 +1036,7 @@ public com.google.protobuf.ByteString getInstanceIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1042,6 +1060,7 @@ public Builder setInstanceId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1061,6 +1080,7 @@ public Builder clearInstanceId() { onChanged(); return this; } + /** * * @@ -1092,6 +1112,7 @@ public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { com.google.bigtable.admin.v2.Instance.Builder, com.google.bigtable.admin.v2.InstanceOrBuilder> instanceBuilder_; + /** * * @@ -1109,6 +1130,7 @@ public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { public boolean hasInstance() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1132,6 +1154,7 @@ public com.google.bigtable.admin.v2.Instance getInstance() { return instanceBuilder_.getMessage(); } } + /** * * @@ -1157,6 +1180,7 @@ public Builder setInstance(com.google.bigtable.admin.v2.Instance value) { onChanged(); return this; } + /** * * @@ -1179,6 +1203,7 @@ public Builder setInstance(com.google.bigtable.admin.v2.Instance.Builder builder onChanged(); return this; } + /** * * @@ -1209,6 +1234,7 @@ public Builder mergeInstance(com.google.bigtable.admin.v2.Instance value) { } return this; } + /** * * @@ -1231,6 +1257,7 @@ public Builder clearInstance() { onChanged(); return this; } + /** * * @@ -1248,6 +1275,7 @@ public com.google.bigtable.admin.v2.Instance.Builder getInstanceBuilder() { onChanged(); return getInstanceFieldBuilder().getBuilder(); } + /** * * @@ -1269,6 +1297,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstanceOrBuilder() { : instance_; } } + /** * * @@ -1317,7 +1346,8 @@ public com.google.bigtable.admin.v2.Cluster build( defaultEntry() { return ClustersDefaultEntryHolder.defaultEntry; } - }; + } + ; private static final ClustersConverter clustersConverter = new ClustersConverter(); @@ -1357,6 +1387,7 @@ public com.google.bigtable.admin.v2.Cluster build( public int getClustersCount() { return internalGetClusters().ensureBuilderMap().size(); } + /** * * @@ -1365,7 +1396,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 +1409,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 +1425,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 +1435,7 @@ public java.util.Map get public java.util.Map getClustersMap() { return internalGetClusters().getImmutableMap(); } + /** * * @@ -1412,7 +1444,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 +1462,7 @@ public java.util.Map get internalGetMutableClusters().ensureBuilderMap(); return map.containsKey(key) ? clustersConverter.build(map.get(key)) : defaultValue; } + /** * * @@ -1439,7 +1471,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 +1495,7 @@ public Builder clearClusters() { internalGetMutableClusters().clear(); return this; } + /** * * @@ -1472,7 +1504,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 +1517,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 +1525,7 @@ public Builder removeClusters(java.lang.String key) { bitField0_ |= 0x00000008; return internalGetMutableClusters().ensureMessageMap(); } + /** * * @@ -1501,7 +1534,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 +1551,7 @@ public Builder putClusters(java.lang.String key, com.google.bigtable.admin.v2.Cl bitField0_ |= 0x00000008; return this; } + /** * * @@ -1527,7 +1560,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 +1578,7 @@ public Builder putAllClusters( bitField0_ |= 0x00000008; return this; } + /** * * @@ -1554,7 +1587,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. * * * 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..a16bb4b0fe 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CreateInstanceRequestOrBuilder @@ -39,6 +39,7 @@ public interface CreateInstanceRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -69,6 +70,7 @@ public interface CreateInstanceRequestOrBuilder * @return The instanceId. */ java.lang.String getInstanceId(); + /** * * @@ -99,6 +101,7 @@ public interface CreateInstanceRequestOrBuilder * @return Whether the instance field is set. */ boolean hasInstance(); + /** * * @@ -114,6 +117,7 @@ public interface CreateInstanceRequestOrBuilder * @return The instance. */ com.google.bigtable.admin.v2.Instance getInstance(); + /** * * @@ -136,7 +140,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 +147,7 @@ public interface CreateInstanceRequestOrBuilder * */ int getClustersCount(); + /** * * @@ -152,7 +156,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 +163,11 @@ public interface CreateInstanceRequestOrBuilder * */ boolean containsClusters(java.lang.String key); + /** Use {@link #getClustersMap()} instead. */ @java.lang.Deprecated java.util.Map getClusters(); + /** * * @@ -171,7 +176,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 +183,7 @@ public interface CreateInstanceRequestOrBuilder * */ java.util.Map getClustersMap(); + /** * * @@ -187,7 +192,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 +203,7 @@ com.google.bigtable.admin.v2.Cluster getClustersOrDefault( java.lang.String key, /* nullable */ com.google.bigtable.admin.v2.Cluster defaultValue); + /** * * @@ -207,7 +212,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..5b9f26bbfe --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewMetadata.java @@ -0,0 +1,1299 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * The metadata for the Operation returned by CreateLogicalView.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.CreateLogicalViewMetadata} + */ +public final class CreateLogicalViewMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateLogicalViewMetadata) + CreateLogicalViewMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateLogicalViewMetadata.newBuilder() to construct. + private CreateLogicalViewMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateLogicalViewMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOriginalRequestFieldBuilder(); + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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.SingleFieldBuilderV3< + 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 getOriginalRequestFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.CreateLogicalViewRequest, + com.google.bigtable.admin.v2.CreateLogicalViewRequest.Builder, + com.google.bigtable.admin.v2.CreateLogicalViewRequestOrBuilder> + getOriginalRequestFieldBuilder() { + if (originalRequestBuilder_ == null) { + originalRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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.SingleFieldBuilderV3< + 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 getStartTimeFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
    +     * 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 getEndTimeFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..a8a857fb75 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewMetadataOrBuilder.java @@ -0,0 +1,140 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..a330e27054 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewRequest.java @@ -0,0 +1,1169 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Request message for BigtableInstanceAdmin.CreateLogicalView.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.CreateLogicalViewRequest} + */ +public final class CreateLogicalViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateLogicalViewRequest) + CreateLogicalViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateLogicalViewRequest.newBuilder() to construct. + private CreateLogicalViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateLogicalViewRequest() { + parent_ = ""; + logicalViewId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateLogicalViewRequest(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logicalViewId_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logicalViewId_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLogicalViewFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getLogicalViewFieldBuilder().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.SingleFieldBuilderV3< + 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 getLogicalViewFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.LogicalView, + com.google.bigtable.admin.v2.LogicalView.Builder, + com.google.bigtable.admin.v2.LogicalViewOrBuilder> + getLogicalViewFieldBuilder() { + if (logicalViewBuilder_ == null) { + logicalViewBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..e4c0209ea5 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewRequestOrBuilder.java @@ -0,0 +1,129 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..cc8bd72cd6 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewMetadata.java @@ -0,0 +1,1302 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * The metadata for the Operation returned by CreateMaterializedView.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.CreateMaterializedViewMetadata} + */ +public final class CreateMaterializedViewMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateMaterializedViewMetadata) + CreateMaterializedViewMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateMaterializedViewMetadata.newBuilder() to construct. + private CreateMaterializedViewMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateMaterializedViewMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOriginalRequestFieldBuilder(); + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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.SingleFieldBuilderV3< + 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 getOriginalRequestFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.CreateMaterializedViewRequest, + com.google.bigtable.admin.v2.CreateMaterializedViewRequest.Builder, + com.google.bigtable.admin.v2.CreateMaterializedViewRequestOrBuilder> + getOriginalRequestFieldBuilder() { + if (originalRequestBuilder_ == null) { + originalRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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.SingleFieldBuilderV3< + 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 getStartTimeFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
    +     * 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 getEndTimeFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..2620c64a40 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewMetadataOrBuilder.java @@ -0,0 +1,140 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..5b33f6e8c9 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewRequest.java @@ -0,0 +1,1171 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Request message for BigtableInstanceAdmin.CreateMaterializedView.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.CreateMaterializedViewRequest} + */ +public final class CreateMaterializedViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateMaterializedViewRequest) + CreateMaterializedViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateMaterializedViewRequest.newBuilder() to construct. + private CreateMaterializedViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateMaterializedViewRequest() { + parent_ = ""; + materializedViewId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateMaterializedViewRequest(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(materializedViewId_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(materializedViewId_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMaterializedViewFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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( + getMaterializedViewFieldBuilder().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.SingleFieldBuilderV3< + 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 getMaterializedViewFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.MaterializedView, + com.google.bigtable.admin.v2.MaterializedView.Builder, + com.google.bigtable.admin.v2.MaterializedViewOrBuilder> + getMaterializedViewFieldBuilder() { + if (materializedViewBuilder_ == null) { + materializedViewBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..46b26cc021 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewRequestOrBuilder.java @@ -0,0 +1,129 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..da21032562 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleMetadata.java @@ -0,0 +1,1206 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +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} + */ +public final class CreateSchemaBundleMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateSchemaBundleMetadata) + CreateSchemaBundleMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateSchemaBundleMetadata.newBuilder() to construct. + private CreateSchemaBundleMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSchemaBundleMetadata() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSchemaBundleMetadata(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + 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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().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.SingleFieldBuilderV3< + 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 getStartTimeFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
    +     * 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 getEndTimeFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..1f42b3f6be --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleMetadataOrBuilder.java @@ -0,0 +1,130 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..fcdd2bcbbc --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleRequest.java @@ -0,0 +1,1178 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * The request for
    + * [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.CreateSchemaBundleRequest} + */ +public final class CreateSchemaBundleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateSchemaBundleRequest) + CreateSchemaBundleRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateSchemaBundleRequest.newBuilder() to construct. + private CreateSchemaBundleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSchemaBundleRequest() { + parent_ = ""; + schemaBundleId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSchemaBundleRequest(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaBundleId_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaBundleId_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSchemaBundleFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getSchemaBundleFieldBuilder().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.SingleFieldBuilderV3< + 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 getSchemaBundleFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.SchemaBundle, + com.google.bigtable.admin.v2.SchemaBundle.Builder, + com.google.bigtable.admin.v2.SchemaBundleOrBuilder> + getSchemaBundleFieldBuilder() { + if (schemaBundleBuilder_ == null) { + schemaBundleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..0d15eca721 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleRequestOrBuilder.java @@ -0,0 +1,131 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..9192f00310 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -38,6 +38,7 @@ public final class CreateTableFromSnapshotMetadata extends com.google.protobuf.G // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateTableFromSnapshotMetadata) CreateTableFromSnapshotMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateTableFromSnapshotMetadata.newBuilder() to construct. private CreateTableFromSnapshotMetadata( com.google.protobuf.GeneratedMessageV3.Builder builder) { @@ -70,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.CreateTableFromSnapshotRequest originalRequest_; + /** * * @@ -86,6 +88,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -104,6 +107,7 @@ public com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest getOriginalRe ? com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.getDefaultInstance() : originalRequest_; } + /** * * @@ -124,6 +128,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 +144,7 @@ public com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest getOriginalRe public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -154,6 +160,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -170,6 +177,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -185,6 +193,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -200,6 +209,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -407,6 +417,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -658,6 +669,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.Builder, com.google.bigtable.admin.v2.CreateTableFromSnapshotRequestOrBuilder> originalRequestBuilder_; + /** * * @@ -673,6 +685,7 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -694,6 +707,7 @@ public com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest getOriginalRe return originalRequestBuilder_.getMessage(); } } + /** * * @@ -718,6 +732,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -739,6 +754,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -770,6 +786,7 @@ public Builder mergeOriginalRequest( } return this; } + /** * * @@ -790,6 +807,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -806,6 +824,7 @@ public Builder clearOriginalRequest() { onChanged(); return getOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -826,6 +845,7 @@ public Builder clearOriginalRequest() { : originalRequest_; } } + /** * * @@ -859,6 +879,7 @@ public Builder clearOriginalRequest() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -873,6 +894,7 @@ public Builder clearOriginalRequest() { public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -893,6 +915,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -915,6 +938,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -934,6 +958,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -961,6 +986,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -980,6 +1006,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -994,6 +1021,7 @@ public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { onChanged(); return getRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -1012,6 +1040,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -1044,6 +1073,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -1058,6 +1088,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1078,6 +1109,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -1100,6 +1132,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1119,6 +1152,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1146,6 +1180,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1165,6 +1200,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -1179,6 +1215,7 @@ public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { onChanged(); return getFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1197,6 +1234,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * 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..14dcbb081b 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CreateTableFromSnapshotMetadataOrBuilder @@ -37,6 +37,7 @@ public interface CreateTableFromSnapshotMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -50,6 +51,7 @@ public interface CreateTableFromSnapshotMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest getOriginalRequest(); + /** * * @@ -75,6 +77,7 @@ public interface CreateTableFromSnapshotMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -87,6 +90,7 @@ public interface CreateTableFromSnapshotMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -110,6 +114,7 @@ public interface CreateTableFromSnapshotMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -122,6 +127,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..4ecbd3a2e9 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -39,6 +39,7 @@ public final class CreateTableFromSnapshotRequest extends com.google.protobuf.Ge // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateTableFromSnapshotRequest) CreateTableFromSnapshotRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateTableFromSnapshotRequest.newBuilder() to construct. private CreateTableFromSnapshotRequest( com.google.protobuf.GeneratedMessageV3.Builder builder) { @@ -76,6 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -102,6 +104,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -133,6 +136,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object tableId_ = ""; + /** * * @@ -157,6 +161,7 @@ public java.lang.String getTableId() { return s; } } + /** * * @@ -186,6 +191,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { @SuppressWarnings("serial") private volatile java.lang.Object sourceSnapshot_ = ""; + /** * * @@ -214,6 +220,7 @@ public java.lang.String getSourceSnapshot() { return s; } } + /** * * @@ -421,6 +428,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -641,6 +649,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -666,6 +675,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -691,6 +701,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -715,6 +726,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -735,6 +747,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -762,6 +775,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object tableId_ = ""; + /** * * @@ -785,6 +799,7 @@ public java.lang.String getTableId() { return (java.lang.String) ref; } } + /** * * @@ -808,6 +823,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -830,6 +846,7 @@ public Builder setTableId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -848,6 +865,7 @@ public Builder clearTableId() { onChanged(); return this; } + /** * * @@ -873,6 +891,7 @@ public Builder setTableIdBytes(com.google.protobuf.ByteString value) { } private java.lang.Object sourceSnapshot_ = ""; + /** * * @@ -900,6 +919,7 @@ public java.lang.String getSourceSnapshot() { return (java.lang.String) ref; } } + /** * * @@ -927,6 +947,7 @@ public com.google.protobuf.ByteString getSourceSnapshotBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -953,6 +974,7 @@ public Builder setSourceSnapshot(java.lang.String value) { onChanged(); return this; } + /** * * @@ -975,6 +997,7 @@ public Builder clearSourceSnapshot() { onChanged(); return this; } + /** * * 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..25515bf67c 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CreateTableFromSnapshotRequestOrBuilder @@ -39,6 +39,7 @@ public interface CreateTableFromSnapshotRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -68,6 +69,7 @@ public interface CreateTableFromSnapshotRequestOrBuilder * @return The tableId. */ java.lang.String getTableId(); + /** * * @@ -99,6 +101,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..ee2d19ccd5 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class CreateTableRequest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateTableRequest) CreateTableRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CreateTableRequest.newBuilder() to construct. private CreateTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -84,6 +85,7 @@ public interface SplitOrBuilder */ com.google.protobuf.ByteString getKey(); } + /** * * @@ -98,6 +100,7 @@ public static final class Split extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateTableRequest.Split) SplitOrBuilder { private static final long serialVersionUID = 0L; + // Use Split.newBuilder() to construct. private Split(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -130,6 +133,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; + /** * * @@ -307,6 +311,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -492,6 +497,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -507,6 +513,7 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getKey() { return key_; } + /** * * @@ -528,6 +535,7 @@ public Builder setKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -615,6 +623,7 @@ public com.google.bigtable.admin.v2.CreateTableRequest.Split getDefaultInstanceF @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -641,6 +650,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -672,6 +682,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object tableId_ = ""; + /** * * @@ -697,6 +708,7 @@ public java.lang.String getTableId() { return s; } } + /** * * @@ -725,6 +737,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 +754,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { public boolean hasTable() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -757,6 +771,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 +791,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { @SuppressWarnings("serial") private java.util.List initialSplits_; + /** * * @@ -805,6 +821,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { getInitialSplitsList() { return initialSplits_; } + /** * * @@ -834,6 +851,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { getInitialSplitsOrBuilderList() { return initialSplits_; } + /** * * @@ -862,6 +880,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { public int getInitialSplitsCount() { return initialSplits_.size(); } + /** * * @@ -890,6 +909,7 @@ public int getInitialSplitsCount() { public com.google.bigtable.admin.v2.CreateTableRequest.Split getInitialSplits(int index) { return initialSplits_.get(index); } + /** * * @@ -1113,6 +1133,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1405,6 +1426,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -1430,6 +1452,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -1455,6 +1478,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1479,6 +1503,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1499,6 +1524,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -1526,6 +1552,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object tableId_ = ""; + /** * * @@ -1550,6 +1577,7 @@ public java.lang.String getTableId() { return (java.lang.String) ref; } } + /** * * @@ -1574,6 +1602,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1597,6 +1626,7 @@ public Builder setTableId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1616,6 +1646,7 @@ public Builder clearTableId() { onChanged(); return this; } + /** * * @@ -1647,6 +1678,7 @@ public Builder setTableIdBytes(com.google.protobuf.ByteString value) { com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder> tableBuilder_; + /** * * @@ -1662,6 +1694,7 @@ public Builder setTableIdBytes(com.google.protobuf.ByteString value) { public boolean hasTable() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1681,6 +1714,7 @@ public com.google.bigtable.admin.v2.Table getTable() { return tableBuilder_.getMessage(); } } + /** * * @@ -1704,6 +1738,7 @@ public Builder setTable(com.google.bigtable.admin.v2.Table value) { onChanged(); return this; } + /** * * @@ -1724,6 +1759,7 @@ public Builder setTable(com.google.bigtable.admin.v2.Table.Builder builderForVal onChanged(); return this; } + /** * * @@ -1752,6 +1788,7 @@ public Builder mergeTable(com.google.bigtable.admin.v2.Table value) { } return this; } + /** * * @@ -1772,6 +1809,7 @@ public Builder clearTable() { onChanged(); return this; } + /** * * @@ -1787,6 +1825,7 @@ public com.google.bigtable.admin.v2.Table.Builder getTableBuilder() { onChanged(); return getTableFieldBuilder().getBuilder(); } + /** * * @@ -1804,6 +1843,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { return table_ == null ? com.google.bigtable.admin.v2.Table.getDefaultInstance() : table_; } } + /** * * @@ -1881,6 +1921,7 @@ private void ensureInitialSplitsIsMutable() { return initialSplitsBuilder_.getMessageList(); } } + /** * * @@ -1912,6 +1953,7 @@ public int getInitialSplitsCount() { return initialSplitsBuilder_.getCount(); } } + /** * * @@ -1943,6 +1985,7 @@ public com.google.bigtable.admin.v2.CreateTableRequest.Split getInitialSplits(in return initialSplitsBuilder_.getMessage(index); } } + /** * * @@ -1981,6 +2024,7 @@ public Builder setInitialSplits( } return this; } + /** * * @@ -2016,6 +2060,7 @@ public Builder setInitialSplits( } return this; } + /** * * @@ -2053,6 +2098,7 @@ public Builder addInitialSplits(com.google.bigtable.admin.v2.CreateTableRequest. } return this; } + /** * * @@ -2091,6 +2137,7 @@ public Builder addInitialSplits( } return this; } + /** * * @@ -2126,6 +2173,7 @@ public Builder addInitialSplits( } return this; } + /** * * @@ -2161,6 +2209,7 @@ public Builder addInitialSplits( } return this; } + /** * * @@ -2197,6 +2246,7 @@ public Builder addAllInitialSplits( } return this; } + /** * * @@ -2231,6 +2281,7 @@ public Builder clearInitialSplits() { } return this; } + /** * * @@ -2265,6 +2316,7 @@ public Builder removeInitialSplits(int index) { } return this; } + /** * * @@ -2293,6 +2345,7 @@ public com.google.bigtable.admin.v2.CreateTableRequest.Split.Builder getInitialS int index) { return getInitialSplitsFieldBuilder().getBuilder(index); } + /** * * @@ -2325,6 +2378,7 @@ public com.google.bigtable.admin.v2.CreateTableRequest.SplitOrBuilder getInitial return initialSplitsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -2357,6 +2411,7 @@ public com.google.bigtable.admin.v2.CreateTableRequest.SplitOrBuilder getInitial return java.util.Collections.unmodifiableList(initialSplits_); } } + /** * * @@ -2385,6 +2440,7 @@ public com.google.bigtable.admin.v2.CreateTableRequest.Split.Builder addInitialS return getInitialSplitsFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.CreateTableRequest.Split.getDefaultInstance()); } + /** * * @@ -2415,6 +2471,7 @@ public com.google.bigtable.admin.v2.CreateTableRequest.Split.Builder addInitialS .addBuilder( index, com.google.bigtable.admin.v2.CreateTableRequest.Split.getDefaultInstance()); } + /** * * 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..272ad13c7d 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface CreateTableRequestOrBuilder @@ -39,6 +39,7 @@ public interface CreateTableRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -69,6 +70,7 @@ public interface CreateTableRequestOrBuilder * @return The tableId. */ java.lang.String getTableId(); + /** * * @@ -97,6 +99,7 @@ public interface CreateTableRequestOrBuilder * @return Whether the table field is set. */ boolean hasTable(); + /** * * @@ -110,6 +113,7 @@ public interface CreateTableRequestOrBuilder * @return The table. */ com.google.bigtable.admin.v2.Table getTable(); + /** * * @@ -147,6 +151,7 @@ public interface CreateTableRequestOrBuilder * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; */ java.util.List getInitialSplitsList(); + /** * * @@ -172,6 +177,7 @@ public interface CreateTableRequestOrBuilder * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; */ com.google.bigtable.admin.v2.CreateTableRequest.Split getInitialSplits(int index); + /** * * @@ -197,6 +203,7 @@ public interface CreateTableRequestOrBuilder * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; */ int getInitialSplitsCount(); + /** * * @@ -223,6 +230,7 @@ public interface CreateTableRequestOrBuilder */ java.util.List getInitialSplitsOrBuilderList(); + /** * * 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..de760d3435 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class DataBoostReadLocalWrites extends com.google.protobuf.Generate // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DataBoostReadLocalWrites) DataBoostReadLocalWritesOrBuilder { private static final long serialVersionUID = 0L; + // Use DataBoostReadLocalWrites.newBuilder() to construct. private DataBoostReadLocalWrites(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -213,6 +214,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * 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..112e7c6918 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface DataBoostReadLocalWritesOrBuilder 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..3417b65463 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class DeleteAppProfileRequest extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteAppProfileRequest) DeleteAppProfileRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteAppProfileRequest.newBuilder() to construct. private DeleteAppProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -94,6 +96,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -124,6 +127,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int IGNORE_WARNINGS_FIELD_NUMBER = 2; private boolean ignoreWarnings_ = false; + /** * * @@ -308,6 +312,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -505,6 +510,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -531,6 +537,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -557,6 +564,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -582,6 +590,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -603,6 +612,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -631,6 +641,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private boolean ignoreWarnings_; + /** * * @@ -646,6 +657,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean getIgnoreWarnings() { return ignoreWarnings_; } + /** * * @@ -665,6 +677,7 @@ public Builder setIgnoreWarnings(boolean value) { onChanged(); return this; } + /** * * 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..3a119c4dfa 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface DeleteAppProfileRequestOrBuilder @@ -40,6 +40,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..d6cd6097ff 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class DeleteAuthorizedViewRequest extends com.google.protobuf.Gener // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteAuthorizedViewRequest) DeleteAuthorizedViewRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteAuthorizedViewRequest.newBuilder() to construct. private DeleteAuthorizedViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -96,6 +98,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -128,6 +131,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object etag_ = ""; + /** * * @@ -154,6 +158,7 @@ public java.lang.String getEtag() { return s; } } + /** * * @@ -350,6 +355,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -550,6 +556,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -576,6 +583,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -602,6 +610,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -627,6 +636,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -648,6 +658,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -676,6 +687,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object etag_ = ""; + /** * * @@ -701,6 +713,7 @@ public java.lang.String getEtag() { return (java.lang.String) ref; } } + /** * * @@ -726,6 +739,7 @@ public com.google.protobuf.ByteString getEtagBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -750,6 +764,7 @@ public Builder setEtag(java.lang.String value) { onChanged(); return this; } + /** * * @@ -770,6 +785,7 @@ public Builder clearEtag() { onChanged(); return this; } + /** * * 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..11c2ff07d3 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface DeleteAuthorizedViewRequestOrBuilder @@ -40,6 +40,7 @@ public interface DeleteAuthorizedViewRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -72,6 +73,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..b964227d50 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class DeleteBackupRequest extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteBackupRequest) DeleteBackupRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteBackupRequest.newBuilder() to construct. private DeleteBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +97,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -282,6 +285,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -467,6 +471,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -493,6 +498,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -519,6 +525,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -544,6 +551,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -565,6 +573,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * 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..fb0cc7118f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface DeleteBackupRequestOrBuilder @@ -40,6 +40,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..35874c2e7e 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class DeleteClusterRequest extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteClusterRequest) DeleteClusterRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteClusterRequest.newBuilder() to construct. private DeleteClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +95,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -279,6 +282,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -463,6 +467,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -488,6 +493,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -513,6 +519,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -537,6 +544,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -557,6 +565,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * 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..120deba646 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface DeleteClusterRequestOrBuilder @@ -39,6 +39,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..16d30d36db 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class DeleteInstanceRequest extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteInstanceRequest) DeleteInstanceRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteInstanceRequest.newBuilder() to construct. private DeleteInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +95,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -279,6 +282,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -463,6 +467,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -488,6 +493,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -513,6 +519,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -537,6 +544,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -557,6 +565,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * 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..77da1bec31 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface DeleteInstanceRequestOrBuilder @@ -39,6 +39,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..18383b25b5 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteLogicalViewRequest.java @@ -0,0 +1,873 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Request message for BigtableInstanceAdmin.DeleteLogicalView.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.DeleteLogicalViewRequest} + */ +public final class DeleteLogicalViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteLogicalViewRequest) + DeleteLogicalViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteLogicalViewRequest.newBuilder() to construct. + private DeleteLogicalViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteLogicalViewRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteLogicalViewRequest(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..1d61fb26ea --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteLogicalViewRequestOrBuilder.java @@ -0,0 +1,92 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..108eda217d --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteMaterializedViewRequest.java @@ -0,0 +1,873 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Request message for BigtableInstanceAdmin.DeleteMaterializedView.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.DeleteMaterializedViewRequest} + */ +public final class DeleteMaterializedViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteMaterializedViewRequest) + DeleteMaterializedViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteMaterializedViewRequest.newBuilder() to construct. + private DeleteMaterializedViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteMaterializedViewRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteMaterializedViewRequest(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..09ac5abbf6 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteMaterializedViewRequestOrBuilder.java @@ -0,0 +1,92 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..ce09aeea37 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSchemaBundleRequest.java @@ -0,0 +1,868 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * The request for
    + * [DeleteSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle].
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.DeleteSchemaBundleRequest} + */ +public final class DeleteSchemaBundleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteSchemaBundleRequest) + DeleteSchemaBundleRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteSchemaBundleRequest.newBuilder() to construct. + private DeleteSchemaBundleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteSchemaBundleRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteSchemaBundleRequest(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..042ed44f4e --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSchemaBundleRequestOrBuilder.java @@ -0,0 +1,90 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..4b0b0dc11c 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -39,6 +39,7 @@ public final class DeleteSnapshotRequest extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteSnapshotRequest) DeleteSnapshotRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteSnapshotRequest.newBuilder() to construct. private DeleteSnapshotRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -73,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -100,6 +102,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -287,6 +290,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -477,6 +481,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -503,6 +508,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -529,6 +535,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -554,6 +561,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -575,6 +583,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * 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..c803340f6c 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface DeleteSnapshotRequestOrBuilder @@ -40,6 +40,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..e3daa75ac0 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class DeleteTableRequest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteTableRequest) DeleteTableRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteTableRequest.newBuilder() to construct. private DeleteTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +97,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -282,6 +285,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -467,6 +471,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -493,6 +498,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -519,6 +525,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -544,6 +551,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -565,6 +573,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * 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..4724a85c1b 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface DeleteTableRequestOrBuilder @@ -40,6 +40,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..408975afc0 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class DropRowRangeRequest extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DropRowRangeRequest) DropRowRangeRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use DropRowRangeRequest.newBuilder() to construct. private DropRowRangeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -81,6 +82,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 +119,7 @@ public TargetCase getTargetCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -144,6 +147,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -173,6 +177,7 @@ public com.google.protobuf.ByteString getNameBytes() { } public static final int ROW_KEY_PREFIX_FIELD_NUMBER = 2; + /** * * @@ -189,6 +194,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasRowKeyPrefix() { return targetCase_ == 2; } + /** * * @@ -210,6 +216,7 @@ public com.google.protobuf.ByteString getRowKeyPrefix() { } public static final int DELETE_ALL_DATA_FROM_TABLE_FIELD_NUMBER = 3; + /** * * @@ -225,6 +232,7 @@ public com.google.protobuf.ByteString getRowKeyPrefix() { public boolean hasDeleteAllDataFromTable() { return targetCase_ == 3; } + /** * * @@ -442,6 +450,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -677,6 +686,7 @@ public Builder clearTarget() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -703,6 +713,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -729,6 +740,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -754,6 +766,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -775,6 +788,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -817,6 +831,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasRowKeyPrefix() { return targetCase_ == 2; } + /** * * @@ -835,6 +850,7 @@ public com.google.protobuf.ByteString getRowKeyPrefix() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -857,6 +873,7 @@ public Builder setRowKeyPrefix(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -892,6 +909,7 @@ public Builder clearRowKeyPrefix() { public boolean hasDeleteAllDataFromTable() { return targetCase_ == 3; } + /** * * @@ -909,6 +927,7 @@ public boolean getDeleteAllDataFromTable() { } return false; } + /** * * @@ -928,6 +947,7 @@ public Builder setDeleteAllDataFromTable(boolean value) { onChanged(); return this; } + /** * * 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..9d6041da03 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface DropRowRangeRequestOrBuilder @@ -40,6 +40,7 @@ public interface DropRowRangeRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -70,6 +71,7 @@ public interface DropRowRangeRequestOrBuilder * @return Whether the rowKeyPrefix field is set. */ boolean hasRowKeyPrefix(); + /** * * @@ -96,6 +98,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..56d4e65dd4 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -36,6 +36,7 @@ public final class EncryptionInfo extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.EncryptionInfo) EncryptionInfoOrBuilder { private static final long serialVersionUID = 0L; + // Use EncryptionInfo.newBuilder() to construct. private EncryptionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -128,6 +129,7 @@ public enum EncryptionType implements com.google.protobuf.ProtocolMessageEnum { * ENCRYPTION_TYPE_UNSPECIFIED = 0; */ public static final int ENCRYPTION_TYPE_UNSPECIFIED_VALUE = 0; + /** * * @@ -140,6 +142,7 @@ public enum EncryptionType implements com.google.protobuf.ProtocolMessageEnum { * GOOGLE_DEFAULT_ENCRYPTION = 1; */ public static final int GOOGLE_DEFAULT_ENCRYPTION_VALUE = 1; + /** * * @@ -243,6 +246,7 @@ private EncryptionType(int value) { private int bitField0_; public static final int ENCRYPTION_TYPE_FIELD_NUMBER = 3; private int encryptionType_ = 0; + /** * * @@ -260,6 +264,7 @@ private EncryptionType(int value) { public int getEncryptionTypeValue() { return encryptionType_; } + /** * * @@ -284,6 +289,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 +308,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo.EncryptionType getEncryptionT public boolean hasEncryptionStatus() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -322,6 +329,7 @@ public com.google.rpc.Status getEncryptionStatus() { ? com.google.rpc.Status.getDefaultInstance() : encryptionStatus_; } + /** * * @@ -345,6 +353,7 @@ public com.google.rpc.StatusOrBuilder getEncryptionStatusOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object kmsKeyVersion_ = ""; + /** * * @@ -371,6 +380,7 @@ public java.lang.String getKmsKeyVersion() { return s; } } + /** * * @@ -584,6 +594,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -814,6 +825,7 @@ public Builder mergeFrom( private int bitField0_; private int encryptionType_ = 0; + /** * * @@ -831,6 +843,7 @@ public Builder mergeFrom( public int getEncryptionTypeValue() { return encryptionType_; } + /** * * @@ -851,6 +864,7 @@ public Builder setEncryptionTypeValue(int value) { onChanged(); return this; } + /** * * @@ -872,6 +886,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo.EncryptionType getEncryptionT ? com.google.bigtable.admin.v2.EncryptionInfo.EncryptionType.UNRECOGNIZED : result; } + /** * * @@ -896,6 +911,7 @@ public Builder setEncryptionType( onChanged(); return this; } + /** * * @@ -920,6 +936,7 @@ public Builder clearEncryptionType() { private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> encryptionStatusBuilder_; + /** * * @@ -937,6 +954,7 @@ public Builder clearEncryptionType() { public boolean hasEncryptionStatus() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -960,6 +978,7 @@ public com.google.rpc.Status getEncryptionStatus() { return encryptionStatusBuilder_.getMessage(); } } + /** * * @@ -985,6 +1004,7 @@ public Builder setEncryptionStatus(com.google.rpc.Status value) { onChanged(); return this; } + /** * * @@ -1007,6 +1027,7 @@ public Builder setEncryptionStatus(com.google.rpc.Status.Builder builderForValue onChanged(); return this; } + /** * * @@ -1037,6 +1058,7 @@ public Builder mergeEncryptionStatus(com.google.rpc.Status value) { } return this; } + /** * * @@ -1059,6 +1081,7 @@ public Builder clearEncryptionStatus() { onChanged(); return this; } + /** * * @@ -1076,6 +1099,7 @@ public com.google.rpc.Status.Builder getEncryptionStatusBuilder() { onChanged(); return getEncryptionStatusFieldBuilder().getBuilder(); } + /** * * @@ -1097,6 +1121,7 @@ public com.google.rpc.StatusOrBuilder getEncryptionStatusOrBuilder() { : encryptionStatus_; } } + /** * * @@ -1125,6 +1150,7 @@ public com.google.rpc.StatusOrBuilder getEncryptionStatusOrBuilder() { } private java.lang.Object kmsKeyVersion_ = ""; + /** * * @@ -1150,6 +1176,7 @@ public java.lang.String getKmsKeyVersion() { return (java.lang.String) ref; } } + /** * * @@ -1175,6 +1202,7 @@ public com.google.protobuf.ByteString getKmsKeyVersionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1199,6 +1227,7 @@ public Builder setKmsKeyVersion(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1219,6 +1248,7 @@ public Builder clearKmsKeyVersion() { onChanged(); return this; } + /** * * 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..519952788e 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface EncryptionInfoOrBuilder @@ -38,6 +38,7 @@ public interface EncryptionInfoOrBuilder * @return The enum numeric value on the wire for encryptionType. */ int getEncryptionTypeValue(); + /** * * @@ -68,6 +69,7 @@ public interface EncryptionInfoOrBuilder * @return Whether the encryptionStatus field is set. */ boolean hasEncryptionStatus(); + /** * * @@ -83,6 +85,7 @@ public interface EncryptionInfoOrBuilder * @return The encryptionStatus. */ com.google.rpc.Status getEncryptionStatus(); + /** * * @@ -112,6 +115,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..205dd20214 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class GcRule extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GcRule) GcRuleOrBuilder { private static final long serialVersionUID = 0L; + // Use GcRule.newBuilder() to construct. private GcRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -76,6 +77,7 @@ public interface IntersectionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ java.util.List getRulesList(); + /** * * @@ -86,6 +88,7 @@ public interface IntersectionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ com.google.bigtable.admin.v2.GcRule getRules(int index); + /** * * @@ -96,6 +99,7 @@ public interface IntersectionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ int getRulesCount(); + /** * * @@ -106,6 +110,7 @@ public interface IntersectionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ java.util.List getRulesOrBuilderList(); + /** * * @@ -117,6 +122,7 @@ public interface IntersectionOrBuilder */ com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(int index); } + /** * * @@ -131,6 +137,7 @@ public static final class Intersection extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GcRule.Intersection) IntersectionOrBuilder { private static final long serialVersionUID = 0L; + // Use Intersection.newBuilder() to construct. private Intersection(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -165,6 +172,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List rules_; + /** * * @@ -178,6 +186,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getRulesList() { return rules_; } + /** * * @@ -192,6 +201,7 @@ public java.util.List getRulesList() { getRulesOrBuilderList() { return rules_; } + /** * * @@ -205,6 +215,7 @@ public java.util.List getRulesList() { public int getRulesCount() { return rules_.size(); } + /** * * @@ -218,6 +229,7 @@ public int getRulesCount() { public com.google.bigtable.admin.v2.GcRule getRules(int index) { return rules_.get(index); } + /** * * @@ -394,6 +406,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -658,6 +671,7 @@ public java.util.List getRulesList() { return rulesBuilder_.getMessageList(); } } + /** * * @@ -674,6 +688,7 @@ public int getRulesCount() { return rulesBuilder_.getCount(); } } + /** * * @@ -690,6 +705,7 @@ public com.google.bigtable.admin.v2.GcRule getRules(int index) { return rulesBuilder_.getMessage(index); } } + /** * * @@ -712,6 +728,7 @@ public Builder setRules(int index, com.google.bigtable.admin.v2.GcRule value) { } return this; } + /** * * @@ -732,6 +749,7 @@ public Builder setRules( } return this; } + /** * * @@ -754,6 +772,7 @@ public Builder addRules(com.google.bigtable.admin.v2.GcRule value) { } return this; } + /** * * @@ -776,6 +795,7 @@ public Builder addRules(int index, com.google.bigtable.admin.v2.GcRule value) { } return this; } + /** * * @@ -795,6 +815,7 @@ public Builder addRules(com.google.bigtable.admin.v2.GcRule.Builder builderForVa } return this; } + /** * * @@ -815,6 +836,7 @@ public Builder addRules( } return this; } + /** * * @@ -835,6 +857,7 @@ public Builder addAllRules( } return this; } + /** * * @@ -854,6 +877,7 @@ public Builder clearRules() { } return this; } + /** * * @@ -873,6 +897,7 @@ public Builder removeRules(int index) { } return this; } + /** * * @@ -885,6 +910,7 @@ public Builder removeRules(int index) { public com.google.bigtable.admin.v2.GcRule.Builder getRulesBuilder(int index) { return getRulesFieldBuilder().getBuilder(index); } + /** * * @@ -901,6 +927,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(int index) return rulesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -918,6 +945,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(int index) return java.util.Collections.unmodifiableList(rules_); } } + /** * * @@ -931,6 +959,7 @@ public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder() { return getRulesFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.GcRule.getDefaultInstance()); } + /** * * @@ -944,6 +973,7 @@ public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder(int index) { return getRulesFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.GcRule.getDefaultInstance()); } + /** * * @@ -1053,6 +1083,7 @@ public interface UnionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ java.util.List getRulesList(); + /** * * @@ -1063,6 +1094,7 @@ public interface UnionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ com.google.bigtable.admin.v2.GcRule getRules(int index); + /** * * @@ -1073,6 +1105,7 @@ public interface UnionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ int getRulesCount(); + /** * * @@ -1083,6 +1116,7 @@ public interface UnionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ java.util.List getRulesOrBuilderList(); + /** * * @@ -1094,6 +1128,7 @@ public interface UnionOrBuilder */ com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(int index); } + /** * * @@ -1108,6 +1143,7 @@ public static final class Union extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GcRule.Union) UnionOrBuilder { private static final long serialVersionUID = 0L; + // Use Union.newBuilder() to construct. private Union(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -1142,6 +1178,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List rules_; + /** * * @@ -1155,6 +1192,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getRulesList() { return rules_; } + /** * * @@ -1169,6 +1207,7 @@ public java.util.List getRulesList() { getRulesOrBuilderList() { return rules_; } + /** * * @@ -1182,6 +1221,7 @@ public java.util.List getRulesList() { public int getRulesCount() { return rules_.size(); } + /** * * @@ -1195,6 +1235,7 @@ public int getRulesCount() { public com.google.bigtable.admin.v2.GcRule getRules(int index) { return rules_.get(index); } + /** * * @@ -1371,6 +1412,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1633,6 +1675,7 @@ public java.util.List getRulesList() { return rulesBuilder_.getMessageList(); } } + /** * * @@ -1649,6 +1692,7 @@ public int getRulesCount() { return rulesBuilder_.getCount(); } } + /** * * @@ -1665,6 +1709,7 @@ public com.google.bigtable.admin.v2.GcRule getRules(int index) { return rulesBuilder_.getMessage(index); } } + /** * * @@ -1687,6 +1732,7 @@ public Builder setRules(int index, com.google.bigtable.admin.v2.GcRule value) { } return this; } + /** * * @@ -1707,6 +1753,7 @@ public Builder setRules( } return this; } + /** * * @@ -1729,6 +1776,7 @@ public Builder addRules(com.google.bigtable.admin.v2.GcRule value) { } return this; } + /** * * @@ -1751,6 +1799,7 @@ public Builder addRules(int index, com.google.bigtable.admin.v2.GcRule value) { } return this; } + /** * * @@ -1770,6 +1819,7 @@ public Builder addRules(com.google.bigtable.admin.v2.GcRule.Builder builderForVa } return this; } + /** * * @@ -1790,6 +1840,7 @@ public Builder addRules( } return this; } + /** * * @@ -1810,6 +1861,7 @@ public Builder addAllRules( } return this; } + /** * * @@ -1829,6 +1881,7 @@ public Builder clearRules() { } return this; } + /** * * @@ -1848,6 +1901,7 @@ public Builder removeRules(int index) { } return this; } + /** * * @@ -1860,6 +1914,7 @@ public Builder removeRules(int index) { public com.google.bigtable.admin.v2.GcRule.Builder getRulesBuilder(int index) { return getRulesFieldBuilder().getBuilder(index); } + /** * * @@ -1876,6 +1931,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(int index) return rulesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1893,6 +1949,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(int index) return java.util.Collections.unmodifiableList(rules_); } } + /** * * @@ -1906,6 +1963,7 @@ public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder() { return getRulesFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.GcRule.getDefaultInstance()); } + /** * * @@ -1919,6 +1977,7 @@ public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder(int index) { return getRulesFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.GcRule.getDefaultInstance()); } + /** * * @@ -2032,6 +2091,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 +2129,7 @@ public RuleCase getRuleCase() { } public static final int MAX_NUM_VERSIONS_FIELD_NUMBER = 1; + /** * * @@ -2084,6 +2145,7 @@ public RuleCase getRuleCase() { public boolean hasMaxNumVersions() { return ruleCase_ == 1; } + /** * * @@ -2104,6 +2166,7 @@ public int getMaxNumVersions() { } public static final int MAX_AGE_FIELD_NUMBER = 2; + /** * * @@ -2121,6 +2184,7 @@ public int getMaxNumVersions() { public boolean hasMaxAge() { return ruleCase_ == 2; } + /** * * @@ -2141,6 +2205,7 @@ public com.google.protobuf.Duration getMaxAge() { } return com.google.protobuf.Duration.getDefaultInstance(); } + /** * * @@ -2161,6 +2226,7 @@ public com.google.protobuf.DurationOrBuilder getMaxAgeOrBuilder() { } public static final int INTERSECTION_FIELD_NUMBER = 3; + /** * * @@ -2176,6 +2242,7 @@ public com.google.protobuf.DurationOrBuilder getMaxAgeOrBuilder() { public boolean hasIntersection() { return ruleCase_ == 3; } + /** * * @@ -2194,6 +2261,7 @@ public com.google.bigtable.admin.v2.GcRule.Intersection getIntersection() { } return com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance(); } + /** * * @@ -2212,6 +2280,7 @@ public com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder getIntersection } public static final int UNION_FIELD_NUMBER = 4; + /** * * @@ -2227,6 +2296,7 @@ public com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder getIntersection public boolean hasUnion() { return ruleCase_ == 4; } + /** * * @@ -2245,6 +2315,7 @@ public com.google.bigtable.admin.v2.GcRule.Union getUnion() { } return com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance(); } + /** * * @@ -2479,6 +2550,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -2749,6 +2821,7 @@ public Builder clearRule() { public boolean hasMaxNumVersions() { return ruleCase_ == 1; } + /** * * @@ -2766,6 +2839,7 @@ public int getMaxNumVersions() { } return 0; } + /** * * @@ -2785,6 +2859,7 @@ public Builder setMaxNumVersions(int value) { onChanged(); return this; } + /** * * @@ -2810,6 +2885,7 @@ public Builder clearMaxNumVersions() { com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> maxAgeBuilder_; + /** * * @@ -2827,6 +2903,7 @@ public Builder clearMaxNumVersions() { public boolean hasMaxAge() { return ruleCase_ == 2; } + /** * * @@ -2854,6 +2931,7 @@ public com.google.protobuf.Duration getMaxAge() { return com.google.protobuf.Duration.getDefaultInstance(); } } + /** * * @@ -2878,6 +2956,7 @@ public Builder setMaxAge(com.google.protobuf.Duration value) { ruleCase_ = 2; return this; } + /** * * @@ -2899,6 +2978,7 @@ public Builder setMaxAge(com.google.protobuf.Duration.Builder builderForValue) { ruleCase_ = 2; return this; } + /** * * @@ -2931,6 +3011,7 @@ public Builder mergeMaxAge(com.google.protobuf.Duration value) { ruleCase_ = 2; return this; } + /** * * @@ -2958,6 +3039,7 @@ public Builder clearMaxAge() { } return this; } + /** * * @@ -2972,6 +3054,7 @@ public Builder clearMaxAge() { public com.google.protobuf.Duration.Builder getMaxAgeBuilder() { return getMaxAgeFieldBuilder().getBuilder(); } + /** * * @@ -2994,6 +3077,7 @@ public com.google.protobuf.DurationOrBuilder getMaxAgeOrBuilder() { return com.google.protobuf.Duration.getDefaultInstance(); } } + /** * * @@ -3032,6 +3116,7 @@ public com.google.protobuf.DurationOrBuilder getMaxAgeOrBuilder() { com.google.bigtable.admin.v2.GcRule.Intersection.Builder, com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder> intersectionBuilder_; + /** * * @@ -3047,6 +3132,7 @@ public com.google.protobuf.DurationOrBuilder getMaxAgeOrBuilder() { public boolean hasIntersection() { return ruleCase_ == 3; } + /** * * @@ -3072,6 +3158,7 @@ public com.google.bigtable.admin.v2.GcRule.Intersection getIntersection() { return com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance(); } } + /** * * @@ -3094,6 +3181,7 @@ public Builder setIntersection(com.google.bigtable.admin.v2.GcRule.Intersection ruleCase_ = 3; return this; } + /** * * @@ -3114,6 +3202,7 @@ public Builder setIntersection( ruleCase_ = 3; return this; } + /** * * @@ -3146,6 +3235,7 @@ public Builder mergeIntersection(com.google.bigtable.admin.v2.GcRule.Intersectio ruleCase_ = 3; return this; } + /** * * @@ -3171,6 +3261,7 @@ public Builder clearIntersection() { } return this; } + /** * * @@ -3183,6 +3274,7 @@ public Builder clearIntersection() { public com.google.bigtable.admin.v2.GcRule.Intersection.Builder getIntersectionBuilder() { return getIntersectionFieldBuilder().getBuilder(); } + /** * * @@ -3203,6 +3295,7 @@ public com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder getIntersection return com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance(); } } + /** * * @@ -3241,6 +3334,7 @@ public com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder getIntersection com.google.bigtable.admin.v2.GcRule.Union.Builder, com.google.bigtable.admin.v2.GcRule.UnionOrBuilder> unionBuilder_; + /** * * @@ -3256,6 +3350,7 @@ public com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder getIntersection public boolean hasUnion() { return ruleCase_ == 4; } + /** * * @@ -3281,6 +3376,7 @@ public com.google.bigtable.admin.v2.GcRule.Union getUnion() { return com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance(); } } + /** * * @@ -3303,6 +3399,7 @@ public Builder setUnion(com.google.bigtable.admin.v2.GcRule.Union value) { ruleCase_ = 4; return this; } + /** * * @@ -3322,6 +3419,7 @@ public Builder setUnion(com.google.bigtable.admin.v2.GcRule.Union.Builder builde ruleCase_ = 4; return this; } + /** * * @@ -3354,6 +3452,7 @@ public Builder mergeUnion(com.google.bigtable.admin.v2.GcRule.Union value) { ruleCase_ = 4; return this; } + /** * * @@ -3379,6 +3478,7 @@ public Builder clearUnion() { } return this; } + /** * * @@ -3391,6 +3491,7 @@ public Builder clearUnion() { public com.google.bigtable.admin.v2.GcRule.Union.Builder getUnionBuilder() { return getUnionFieldBuilder().getBuilder(); } + /** * * @@ -3411,6 +3512,7 @@ public com.google.bigtable.admin.v2.GcRule.UnionOrBuilder getUnionOrBuilder() { return com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance(); } } + /** * * 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..10254d5dc0 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface GcRuleOrBuilder @@ -36,6 +36,7 @@ public interface GcRuleOrBuilder * @return Whether the maxNumVersions field is set. */ boolean hasMaxNumVersions(); + /** * * @@ -63,6 +64,7 @@ public interface GcRuleOrBuilder * @return Whether the maxAge field is set. */ boolean hasMaxAge(); + /** * * @@ -77,6 +79,7 @@ public interface GcRuleOrBuilder * @return The maxAge. */ com.google.protobuf.Duration getMaxAge(); + /** * * @@ -102,6 +105,7 @@ public interface GcRuleOrBuilder * @return Whether the intersection field is set. */ boolean hasIntersection(); + /** * * @@ -114,6 +118,7 @@ public interface GcRuleOrBuilder * @return The intersection. */ com.google.bigtable.admin.v2.GcRule.Intersection getIntersection(); + /** * * @@ -137,6 +142,7 @@ public interface GcRuleOrBuilder * @return Whether the union field is set. */ boolean hasUnion(); + /** * * @@ -149,6 +155,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..72e1d9b28c 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class GenerateConsistencyTokenRequest extends com.google.protobuf.G // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GenerateConsistencyTokenRequest) GenerateConsistencyTokenRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GenerateConsistencyTokenRequest.newBuilder() to construct. private GenerateConsistencyTokenRequest( com.google.protobuf.GeneratedMessageV3.Builder builder) { @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -96,6 +98,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -284,6 +287,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -472,6 +476,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -498,6 +503,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -524,6 +530,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -549,6 +556,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -570,6 +578,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * 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..34fcf013b3 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface GenerateConsistencyTokenRequestOrBuilder @@ -40,6 +40,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..cdfd67e6b2 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class GenerateConsistencyTokenResponse extends com.google.protobuf. // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GenerateConsistencyTokenResponse) GenerateConsistencyTokenResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use GenerateConsistencyTokenResponse.newBuilder() to construct. private GenerateConsistencyTokenResponse( com.google.protobuf.GeneratedMessageV3.Builder builder) { @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object consistencyToken_ = ""; + /** * * @@ -92,6 +94,7 @@ public java.lang.String getConsistencyToken() { return s; } } + /** * * @@ -276,6 +279,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -464,6 +468,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object consistencyToken_ = ""; + /** * * @@ -486,6 +491,7 @@ public java.lang.String getConsistencyToken() { return (java.lang.String) ref; } } + /** * * @@ -508,6 +514,7 @@ public com.google.protobuf.ByteString getConsistencyTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -529,6 +536,7 @@ public Builder setConsistencyToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -546,6 +554,7 @@ public Builder clearConsistencyToken() { onChanged(); return this; } + /** * * 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..550e9f1c8f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface GenerateConsistencyTokenResponseOrBuilder @@ -36,6 +36,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..7ef5d0fef2 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class GetAppProfileRequest extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetAppProfileRequest) GetAppProfileRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GetAppProfileRequest.newBuilder() to construct. private GetAppProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +95,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -279,6 +282,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -463,6 +467,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -488,6 +493,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -513,6 +519,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -537,6 +544,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -557,6 +565,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * 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..aa53e68409 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface GetAppProfileRequestOrBuilder @@ -39,6 +39,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..0498427ecc 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class GetAuthorizedViewRequest extends com.google.protobuf.Generate // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetAuthorizedViewRequest) GetAuthorizedViewRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GetAuthorizedViewRequest.newBuilder() to construct. private GetAuthorizedViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -96,6 +98,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -126,6 +129,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int VIEW_FIELD_NUMBER = 2; private int view_ = 0; + /** * * @@ -144,6 +148,7 @@ public com.google.protobuf.ByteString getNameBytes() { public int getViewValue() { return view_; } + /** * * @@ -340,6 +345,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -538,6 +544,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -564,6 +571,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -590,6 +598,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -615,6 +624,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -636,6 +646,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -664,6 +675,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private int view_ = 0; + /** * * @@ -682,6 +694,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public int getViewValue() { return view_; } + /** * * @@ -703,6 +716,7 @@ public Builder setViewValue(int value) { onChanged(); return this; } + /** * * @@ -725,6 +739,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.ResponseView getView() { ? com.google.bigtable.admin.v2.AuthorizedView.ResponseView.UNRECOGNIZED : result; } + /** * * @@ -749,6 +764,7 @@ public Builder setView(com.google.bigtable.admin.v2.AuthorizedView.ResponseView onChanged(); return this; } + /** * * 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..3aeaf6e44e 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface GetAuthorizedViewRequestOrBuilder @@ -40,6 +40,7 @@ public interface GetAuthorizedViewRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -72,6 +73,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..cfa3a87216 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class GetBackupRequest extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetBackupRequest) GetBackupRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GetBackupRequest.newBuilder() to construct. private GetBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +97,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -282,6 +285,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -466,6 +470,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -492,6 +497,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -518,6 +524,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -543,6 +550,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -564,6 +572,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * 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..da3b772a8d 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface GetBackupRequestOrBuilder @@ -40,6 +40,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..daa12d9b7c 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class GetClusterRequest extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetClusterRequest) GetClusterRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GetClusterRequest.newBuilder() to construct. private GetClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +95,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -279,6 +282,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -462,6 +466,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -487,6 +492,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -512,6 +518,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -536,6 +543,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -556,6 +564,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * 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..877c7fa8fa 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface GetClusterRequestOrBuilder @@ -39,6 +39,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..726d7748fd 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class GetInstanceRequest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetInstanceRequest) GetInstanceRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GetInstanceRequest.newBuilder() to construct. private GetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +95,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -279,6 +282,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -463,6 +467,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -488,6 +493,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -513,6 +519,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -537,6 +544,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -557,6 +565,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * 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..8504ff48fd 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface GetInstanceRequestOrBuilder @@ -39,6 +39,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..45c58fe620 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetLogicalViewRequest.java @@ -0,0 +1,655 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Request message for BigtableInstanceAdmin.GetLogicalView.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.GetLogicalViewRequest} + */ +public final class GetLogicalViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetLogicalViewRequest) + GetLogicalViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetLogicalViewRequest.newBuilder() to construct. + private GetLogicalViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetLogicalViewRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetLogicalViewRequest(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..702679c016 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetLogicalViewRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..f6107f3586 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetMaterializedViewRequest.java @@ -0,0 +1,663 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Request message for BigtableInstanceAdmin.GetMaterializedView.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.GetMaterializedViewRequest} + */ +public final class GetMaterializedViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetMaterializedViewRequest) + GetMaterializedViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetMaterializedViewRequest.newBuilder() to construct. + private GetMaterializedViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetMaterializedViewRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetMaterializedViewRequest(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..0086664d12 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetMaterializedViewRequestOrBuilder.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..e3994d4399 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSchemaBundleRequest.java @@ -0,0 +1,664 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * The request for
    + * [GetSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle].
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.GetSchemaBundleRequest} + */ +public final class GetSchemaBundleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetSchemaBundleRequest) + GetSchemaBundleRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetSchemaBundleRequest.newBuilder() to construct. + private GetSchemaBundleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSchemaBundleRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSchemaBundleRequest(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..11a3bc28d0 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSchemaBundleRequestOrBuilder.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..76b36a918e 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -39,6 +39,7 @@ public final class GetSnapshotRequest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetSnapshotRequest) GetSnapshotRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GetSnapshotRequest.newBuilder() to construct. private GetSnapshotRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -73,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -100,6 +102,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -287,6 +290,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -477,6 +481,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -503,6 +508,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -529,6 +535,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -554,6 +561,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -575,6 +583,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * 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..0f5d68d47f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface GetSnapshotRequestOrBuilder @@ -40,6 +40,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..1919e2a007 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class GetTableRequest extends com.google.protobuf.GeneratedMessageV // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetTableRequest) GetTableRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GetTableRequest.newBuilder() to construct. private GetTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -96,6 +98,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -126,6 +129,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int VIEW_FIELD_NUMBER = 2; private int view_ = 0; + /** * * @@ -142,6 +146,7 @@ public com.google.protobuf.ByteString getNameBytes() { public int getViewValue() { return view_; } + /** * * @@ -329,6 +334,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -526,6 +532,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -552,6 +559,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -578,6 +586,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -603,6 +612,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -624,6 +634,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -652,6 +663,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private int view_ = 0; + /** * * @@ -668,6 +680,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public int getViewValue() { return view_; } + /** * * @@ -687,6 +700,7 @@ public Builder setViewValue(int value) { onChanged(); return this; } + /** * * @@ -705,6 +719,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 +742,7 @@ public Builder setView(com.google.bigtable.admin.v2.Table.View value) { onChanged(); return this; } + /** * * 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..c15b774f06 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface GetTableRequestOrBuilder @@ -40,6 +40,7 @@ public interface GetTableRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -70,6 +71,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..a9e0908e6f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/instance.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -37,6 +37,7 @@ public final class HotTablet extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.HotTablet) HotTabletOrBuilder { private static final long serialVersionUID = 0L; + // Use HotTablet.newBuilder() to construct. private HotTablet(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -75,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -99,6 +101,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -128,6 +131,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -152,6 +156,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -179,6 +184,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { public static final int START_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -195,6 +201,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -211,6 +218,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -228,6 +236,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -244,6 +253,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -260,6 +270,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -279,6 +290,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object startKey_ = ""; + /** * * @@ -302,6 +314,7 @@ public java.lang.String getStartKey() { return s; } } + /** * * @@ -330,6 +343,7 @@ public com.google.protobuf.ByteString getStartKeyBytes() { @SuppressWarnings("serial") private volatile java.lang.Object endKey_ = ""; + /** * * @@ -353,6 +367,7 @@ public java.lang.String getEndKey() { return s; } } + /** * * @@ -379,6 +394,7 @@ public com.google.protobuf.ByteString getEndKeyBytes() { public static final int NODE_CPU_USAGE_PERCENT_FIELD_NUMBER = 7; private float nodeCpuUsagePercent_ = 0F; + /** * * @@ -621,6 +637,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -914,6 +931,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -937,6 +955,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -960,6 +979,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -982,6 +1002,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1000,6 +1021,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -1025,6 +1047,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object tableName_ = ""; + /** * * @@ -1048,6 +1071,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -1071,6 +1095,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1093,6 +1118,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1111,6 +1137,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -1141,6 +1168,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -1156,6 +1184,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { public boolean hasStartTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1175,6 +1204,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -1198,6 +1228,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1218,6 +1249,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -1246,6 +1278,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1266,6 +1299,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -1281,6 +1315,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1298,6 +1333,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -1331,6 +1367,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -1346,6 +1383,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1365,6 +1403,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -1388,6 +1427,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1408,6 +1448,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1436,6 +1477,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1456,6 +1498,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1471,6 +1514,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1488,6 +1532,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1516,6 +1561,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private java.lang.Object startKey_ = ""; + /** * * @@ -1538,6 +1584,7 @@ public java.lang.String getStartKey() { return (java.lang.String) ref; } } + /** * * @@ -1560,6 +1607,7 @@ public com.google.protobuf.ByteString getStartKeyBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1581,6 +1629,7 @@ public Builder setStartKey(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1598,6 +1647,7 @@ public Builder clearStartKey() { onChanged(); return this; } + /** * * @@ -1622,6 +1672,7 @@ public Builder setStartKeyBytes(com.google.protobuf.ByteString value) { } private java.lang.Object endKey_ = ""; + /** * * @@ -1644,6 +1695,7 @@ public java.lang.String getEndKey() { return (java.lang.String) ref; } } + /** * * @@ -1666,6 +1718,7 @@ public com.google.protobuf.ByteString getEndKeyBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1687,6 +1740,7 @@ public Builder setEndKey(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1704,6 +1758,7 @@ public Builder clearEndKey() { onChanged(); return this; } + /** * * @@ -1728,6 +1783,7 @@ public Builder setEndKeyBytes(com.google.protobuf.ByteString value) { } private float nodeCpuUsagePercent_; + /** * * @@ -1746,6 +1802,7 @@ public Builder setEndKeyBytes(com.google.protobuf.ByteString value) { public float getNodeCpuUsagePercent() { return nodeCpuUsagePercent_; } + /** * * @@ -1768,6 +1825,7 @@ public Builder setNodeCpuUsagePercent(float value) { onChanged(); return this; } + /** * * 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..92fb01082c 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/instance.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface HotTabletOrBuilder @@ -37,6 +37,7 @@ public interface HotTabletOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -64,6 +65,7 @@ public interface HotTabletOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -91,6 +93,7 @@ public interface HotTabletOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -104,6 +107,7 @@ public interface HotTabletOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -129,6 +133,7 @@ public interface HotTabletOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -142,6 +147,7 @@ public interface HotTabletOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -166,6 +172,7 @@ public interface HotTabletOrBuilder * @return The startKey. */ java.lang.String getStartKey(); + /** * * @@ -191,6 +198,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..48d4b3687b 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/instance.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -36,6 +36,7 @@ public final class Instance extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Instance) InstanceOrBuilder { private static final long serialVersionUID = 0L; + // Use Instance.newBuilder() to construct. private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -66,6 +67,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); } @@ -136,6 +139,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_NOT_KNOWN = 0; */ public static final int STATE_NOT_KNOWN_VALUE = 0; + /** * * @@ -147,6 +151,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * READY = 1; */ public static final int READY_VALUE = 1; + /** * * @@ -301,6 +306,7 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * TYPE_UNSPECIFIED = 0; */ public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** * * @@ -312,6 +318,7 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * PRODUCTION = 1; */ public static final int PRODUCTION_VALUE = 1; + /** * * @@ -412,6 +419,7 @@ private Type(int value) { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -436,6 +444,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -465,6 +474,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object displayName_ = ""; + /** * * @@ -490,6 +500,7 @@ public java.lang.String getDisplayName() { return s; } } + /** * * @@ -518,15 +529,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 +547,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 +570,7 @@ public com.google.bigtable.admin.v2.Instance.State getState() { public static final int TYPE_FIELD_NUMBER = 4; private int type_ = 0; + /** * * @@ -570,6 +586,7 @@ public com.google.bigtable.admin.v2.Instance.State getState() { public int getTypeValue() { return type_; } + /** * * @@ -614,6 +631,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -640,12 +658,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(); } + /** * * @@ -669,6 +689,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -699,6 +720,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -732,13 +754,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 +773,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 +792,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 +812,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public static final int SATISFIES_PZS_FIELD_NUMBER = 8; private boolean satisfiesPzs_ = false; + /** * * @@ -802,6 +828,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public boolean hasSatisfiesPzs() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -818,6 +845,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 @@ -852,6 +1061,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.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 12); getUnknownFields().writeTo(output); } @@ -889,6 +1103,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 +1144,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 +1180,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; @@ -1047,6 +1287,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1074,6 +1315,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,6 +1328,8 @@ 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); } @@ -1131,6 +1376,8 @@ public Builder clear() { createTimeBuilder_ = null; } satisfiesPzs_ = false; + satisfiesPzi_ = false; + internalGetMutableTags().clear(); return this; } @@ -1192,6 +1439,14 @@ 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_; } @@ -1264,6 +1519,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; @@ -1338,6 +1598,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 +1633,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -1381,6 +1657,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -1404,6 +1681,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1426,6 +1704,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1444,6 +1723,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -1469,6 +1749,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object displayName_ = ""; + /** * * @@ -1493,6 +1774,7 @@ public java.lang.String getDisplayName() { return (java.lang.String) ref; } } + /** * * @@ -1517,6 +1799,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1540,6 +1823,7 @@ public Builder setDisplayName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1559,6 +1843,7 @@ public Builder clearDisplayName() { onChanged(); return this; } + /** * * @@ -1585,15 +1870,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 +1888,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 +1909,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 +1929,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 +1953,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 +1975,7 @@ public Builder clearState() { } private int type_ = 0; + /** * * @@ -1695,6 +1991,7 @@ public Builder clearState() { public int getTypeValue() { return type_; } + /** * * @@ -1713,6 +2010,7 @@ public Builder setTypeValue(int value) { onChanged(); return this; } + /** * * @@ -1730,6 +2028,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 +2050,7 @@ public Builder setType(com.google.bigtable.admin.v2.Instance.Type value) { onChanged(); return this; } + /** * * @@ -1794,6 +2094,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -1820,12 +2121,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(); } + /** * * @@ -1849,6 +2152,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -1879,6 +2183,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -1915,6 +2220,7 @@ public Builder clearLabels() { internalGetMutableLabels().getMutableMap().clear(); return this; } + /** * * @@ -1941,12 +2247,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(); } + /** * * @@ -1977,6 +2285,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { bitField0_ |= 0x00000010; return this; } + /** * * @@ -2008,13 +2317,14 @@ public Builder putAllLabels(java.util.Map va 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 +2336,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 +2361,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 +2388,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 +2412,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 +2444,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 +2468,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`.
          * 
    * * @@ -2171,13 +2487,14 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { onChanged(); return getCreateTimeFieldBuilder().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,13 +2510,14 @@ 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`.
          * 
    * * @@ -2224,6 +2542,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { } private boolean satisfiesPzs_; + /** * * @@ -2239,6 +2558,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public boolean hasSatisfiesPzs() { return ((bitField0_ & 0x00000040) != 0); } + /** * * @@ -2254,6 +2574,7 @@ public boolean hasSatisfiesPzs() { public boolean getSatisfiesPzs() { return satisfiesPzs_; } + /** * * @@ -2273,6 +2594,7 @@ public Builder setSatisfiesPzs(boolean value) { onChanged(); return this; } + /** * * @@ -2291,6 +2613,320 @@ 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 /* 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); + } + + 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; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); 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..8c35e41857 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 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. 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..600b20b9a8 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/instance.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface InstanceOrBuilder @@ -37,6 +37,7 @@ public interface InstanceOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -65,6 +66,7 @@ public interface InstanceOrBuilder * @return The displayName. */ java.lang.String getDisplayName(); + /** * * @@ -84,24 +86,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 +124,7 @@ public interface InstanceOrBuilder * @return The enum numeric value on the wire for type. */ int getTypeValue(); + /** * * @@ -152,6 +158,7 @@ public interface InstanceOrBuilder * map<string, string> labels = 5; */ int getLabelsCount(); + /** * * @@ -172,9 +179,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(); + /** * * @@ -195,6 +204,7 @@ public interface InstanceOrBuilder * map<string, string> labels = 5; */ java.util.Map getLabelsMap(); + /** * * @@ -219,6 +229,7 @@ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); + /** * * @@ -244,9 +255,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 +266,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 +282,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 +309,7 @@ java.lang.String getLabelsOrDefault( * @return Whether the satisfiesPzs field is set. */ boolean hasSatisfiesPzs(); + /** * * @@ -308,4 +322,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 93ee4de23b..6b13c7cd56 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/instance.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public final class InstanceProto { @@ -36,6 +36,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_admin_v2_Instance_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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 @@ -68,6 +72,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_descriptor; static final com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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 @@ -84,6 +92,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_admin_v2_HotTablet_descriptor; static final com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_admin_v2_MaterializedView_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -93,105 +109,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\320\002\n\034com.google.bigtable.a" - + "dmin.v2B\rInstanceProtoP\001Z=google.golang." - + "org/genproto/googleapis/bigtable/admin/v" - + "2;admin\252\002\036Google.Cloud.Bigtable.Admin.V2" - + "\312\002\036Google\\Cloud\\Bigtable\\Admin\\V2\352\002\"Goog" - + "le::Cloud::Bigtable::Admin::V2\352Ax\n!cloud" - + "kms.googleapis.com/CryptoKey\022Sprojects/{" - + "project}/locations/{location}/keyRings/{" - + "key_ring}/cryptoKeys/{crypto_key}b\006proto" - + "3" + + ".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( @@ -208,7 +285,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.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); @@ -218,6 +303,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_bigtable_admin_v2_Instance_TagsEntry_descriptor = + internal_static_google_bigtable_admin_v2_Instance_descriptor.getNestedTypes().get(1); + internal_static_google_bigtable_admin_v2_Instance_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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); internal_static_google_bigtable_admin_v2_AutoscalingTargets_fieldAccessorTable = @@ -244,6 +337,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Location", "State", "ServeNodes", + "NodeScalingFactor", "ClusterConfig", "DefaultStorageType", "EncryptionConfig", @@ -296,8 +390,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.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 + .getNestedTypes() + .get(0); + internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_RowAffinity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_SingleClusterRouting_fieldAccessorTable = @@ -336,6 +438,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EndKey", "NodeCpuUsagePercent", }); + internal_static_google_bigtable_admin_v2_LogicalView_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_bigtable_admin_v2_LogicalView_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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().getMessageTypes().get(7); + internal_static_google_bigtable_admin_v2_MaterializedView_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_MaterializedView_descriptor, + new java.lang.String[] { + "Name", "Query", "Etag", "DeletionProtection", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); 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..62822c1eba 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class ListAppProfilesRequest extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListAppProfilesRequest) ListAppProfilesRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListAppProfilesRequest.newBuilder() to construct. private ListAppProfilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -97,6 +99,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -129,6 +132,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 3; private int pageSize_ = 0; + /** * * @@ -157,6 +161,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -180,6 +185,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -381,6 +387,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -593,6 +600,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -621,6 +629,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -649,6 +658,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -676,6 +686,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -699,6 +710,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -729,6 +741,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -752,6 +765,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -779,6 +793,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -806,6 +821,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -828,6 +844,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -850,6 +867,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -871,6 +889,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -888,6 +907,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * 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..e8ed3ff87c 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListAppProfilesRequestOrBuilder @@ -42,6 +42,7 @@ public interface ListAppProfilesRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -94,6 +95,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..ab7799e999 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class ListAppProfilesResponse extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListAppProfilesResponse) ListAppProfilesResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListAppProfilesResponse.newBuilder() to construct. private ListAppProfilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List appProfiles_; + /** * * @@ -82,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getAppProfilesList() { return appProfiles_; } + /** * * @@ -96,6 +99,7 @@ public java.util.List getAppProfilesLis getAppProfilesOrBuilderList() { return appProfiles_; } + /** * * @@ -109,6 +113,7 @@ public java.util.List getAppProfilesLis public int getAppProfilesCount() { return appProfiles_.size(); } + /** * * @@ -122,6 +127,7 @@ public int getAppProfilesCount() { public com.google.bigtable.admin.v2.AppProfile getAppProfiles(int index) { return appProfiles_.get(index); } + /** * * @@ -140,6 +146,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfilesOrBuilder( @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -165,6 +172,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -196,6 +204,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList failedLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -213,6 +222,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { public com.google.protobuf.ProtocolStringList getFailedLocationsList() { return failedLocations_; } + /** * * @@ -230,6 +240,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { public int getFailedLocationsCount() { return failedLocations_.size(); } + /** * * @@ -248,6 +259,7 @@ public int getFailedLocationsCount() { public java.lang.String getFailedLocations(int index) { return failedLocations_.get(index); } + /** * * @@ -453,6 +465,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -752,6 +765,7 @@ public java.util.List getAppProfilesLis return appProfilesBuilder_.getMessageList(); } } + /** * * @@ -768,6 +782,7 @@ public int getAppProfilesCount() { return appProfilesBuilder_.getCount(); } } + /** * * @@ -784,6 +799,7 @@ public com.google.bigtable.admin.v2.AppProfile getAppProfiles(int index) { return appProfilesBuilder_.getMessage(index); } } + /** * * @@ -806,6 +822,7 @@ public Builder setAppProfiles(int index, com.google.bigtable.admin.v2.AppProfile } return this; } + /** * * @@ -826,6 +843,7 @@ public Builder setAppProfiles( } return this; } + /** * * @@ -848,6 +866,7 @@ public Builder addAppProfiles(com.google.bigtable.admin.v2.AppProfile value) { } return this; } + /** * * @@ -870,6 +889,7 @@ public Builder addAppProfiles(int index, com.google.bigtable.admin.v2.AppProfile } return this; } + /** * * @@ -889,6 +909,7 @@ public Builder addAppProfiles(com.google.bigtable.admin.v2.AppProfile.Builder bu } return this; } + /** * * @@ -909,6 +930,7 @@ public Builder addAppProfiles( } return this; } + /** * * @@ -929,6 +951,7 @@ public Builder addAllAppProfiles( } return this; } + /** * * @@ -948,6 +971,7 @@ public Builder clearAppProfiles() { } return this; } + /** * * @@ -967,6 +991,7 @@ public Builder removeAppProfiles(int index) { } return this; } + /** * * @@ -979,6 +1004,7 @@ public Builder removeAppProfiles(int index) { public com.google.bigtable.admin.v2.AppProfile.Builder getAppProfilesBuilder(int index) { return getAppProfilesFieldBuilder().getBuilder(index); } + /** * * @@ -995,6 +1021,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfilesOrBuilder( return appProfilesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1012,6 +1039,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfilesOrBuilder( return java.util.Collections.unmodifiableList(appProfiles_); } } + /** * * @@ -1025,6 +1053,7 @@ public com.google.bigtable.admin.v2.AppProfile.Builder addAppProfilesBuilder() { return getAppProfilesFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.AppProfile.getDefaultInstance()); } + /** * * @@ -1038,6 +1067,7 @@ public com.google.bigtable.admin.v2.AppProfile.Builder addAppProfilesBuilder(int return getAppProfilesFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.AppProfile.getDefaultInstance()); } + /** * * @@ -1070,6 +1100,7 @@ public com.google.bigtable.admin.v2.AppProfile.Builder addAppProfilesBuilder(int } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -1094,6 +1125,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1118,6 +1150,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1141,6 +1174,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1160,6 +1194,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -1194,6 +1229,7 @@ private void ensureFailedLocationsIsMutable() { } bitField0_ |= 0x00000004; } + /** * * @@ -1212,6 +1248,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { failedLocations_.makeImmutable(); return failedLocations_; } + /** * * @@ -1229,6 +1266,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { public int getFailedLocationsCount() { return failedLocations_.size(); } + /** * * @@ -1247,6 +1285,7 @@ public int getFailedLocationsCount() { public java.lang.String getFailedLocations(int index) { return failedLocations_.get(index); } + /** * * @@ -1265,6 +1304,7 @@ public java.lang.String getFailedLocations(int index) { public com.google.protobuf.ByteString getFailedLocationsBytes(int index) { return failedLocations_.getByteString(index); } + /** * * @@ -1291,6 +1331,7 @@ public Builder setFailedLocations(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -1316,6 +1357,7 @@ public Builder addFailedLocations(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1338,6 +1380,7 @@ public Builder addAllFailedLocations(java.lang.Iterable values onChanged(); return this; } + /** * * @@ -1359,6 +1402,7 @@ public Builder clearFailedLocations() { onChanged(); return this; } + /** * * 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..d03901f6cd 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListAppProfilesResponseOrBuilder @@ -34,6 +34,7 @@ public interface ListAppProfilesResponseOrBuilder * repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; */ java.util.List getAppProfilesList(); + /** * * @@ -44,6 +45,7 @@ public interface ListAppProfilesResponseOrBuilder * repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; */ com.google.bigtable.admin.v2.AppProfile getAppProfiles(int index); + /** * * @@ -54,6 +56,7 @@ public interface ListAppProfilesResponseOrBuilder * repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; */ int getAppProfilesCount(); + /** * * @@ -65,6 +68,7 @@ public interface ListAppProfilesResponseOrBuilder */ java.util.List getAppProfilesOrBuilderList(); + /** * * @@ -90,6 +94,7 @@ public interface ListAppProfilesResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * @@ -120,6 +125,7 @@ public interface ListAppProfilesResponseOrBuilder * @return A list containing the failedLocations. */ java.util.List getFailedLocationsList(); + /** * * @@ -135,6 +141,7 @@ public interface ListAppProfilesResponseOrBuilder * @return The count of failedLocations. */ int getFailedLocationsCount(); + /** * * @@ -151,6 +158,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..1b93610ddd 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class ListAuthorizedViewsRequest extends com.google.protobuf.Genera // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListAuthorizedViewsRequest) ListAuthorizedViewsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListAuthorizedViewsRequest.newBuilder() to construct. private ListAuthorizedViewsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -70,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -97,6 +99,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -127,6 +130,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_ = 0; + /** * * @@ -155,6 +159,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -178,6 +183,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -204,12 +210,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 +229,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.
        * 
    * * @@ -436,6 +444,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -662,6 +671,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -688,6 +698,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -714,6 +725,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -739,6 +751,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -760,6 +773,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -788,6 +802,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -811,6 +826,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -838,6 +854,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -865,6 +882,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -887,6 +905,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -909,6 +928,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -930,6 +950,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -947,6 +968,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -971,12 +993,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 +1012,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 +1034,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 +1057,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 +1082,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.
          * 
    * * 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..82e69b2d66 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListAuthorizedViewsRequestOrBuilder @@ -40,6 +40,7 @@ public interface ListAuthorizedViewsRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -90,6 +91,7 @@ public interface ListAuthorizedViewsRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * @@ -107,8 +109,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 +120,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..e17ada4340 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class ListAuthorizedViewsResponse extends com.google.protobuf.Gener // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListAuthorizedViewsResponse) ListAuthorizedViewsResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListAuthorizedViewsResponse.newBuilder() to construct. private ListAuthorizedViewsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List authorizedViews_; + /** * * @@ -82,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getAuthorizedViewsList() { return authorizedViews_; } + /** * * @@ -96,6 +99,7 @@ public java.util.List getAuthorized getAuthorizedViewsOrBuilderList() { return authorizedViews_; } + /** * * @@ -109,6 +113,7 @@ public java.util.List getAuthorized public int getAuthorizedViewsCount() { return authorizedViews_.size(); } + /** * * @@ -122,6 +127,7 @@ public int getAuthorizedViewsCount() { public com.google.bigtable.admin.v2.AuthorizedView getAuthorizedViews(int index) { return authorizedViews_.get(index); } + /** * * @@ -141,6 +147,7 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewsOr @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -166,6 +173,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -363,6 +371,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -641,6 +650,7 @@ public java.util.List getAuthorized return authorizedViewsBuilder_.getMessageList(); } } + /** * * @@ -657,6 +667,7 @@ public int getAuthorizedViewsCount() { return authorizedViewsBuilder_.getCount(); } } + /** * * @@ -673,6 +684,7 @@ public com.google.bigtable.admin.v2.AuthorizedView getAuthorizedViews(int index) return authorizedViewsBuilder_.getMessage(index); } } + /** * * @@ -696,6 +708,7 @@ public Builder setAuthorizedViews( } return this; } + /** * * @@ -716,6 +729,7 @@ public Builder setAuthorizedViews( } return this; } + /** * * @@ -738,6 +752,7 @@ public Builder addAuthorizedViews(com.google.bigtable.admin.v2.AuthorizedView va } return this; } + /** * * @@ -761,6 +776,7 @@ public Builder addAuthorizedViews( } return this; } + /** * * @@ -781,6 +797,7 @@ public Builder addAuthorizedViews( } return this; } + /** * * @@ -801,6 +818,7 @@ public Builder addAuthorizedViews( } return this; } + /** * * @@ -821,6 +839,7 @@ public Builder addAllAuthorizedViews( } return this; } + /** * * @@ -840,6 +859,7 @@ public Builder clearAuthorizedViews() { } return this; } + /** * * @@ -859,6 +879,7 @@ public Builder removeAuthorizedViews(int index) { } return this; } + /** * * @@ -872,6 +893,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.Builder getAuthorizedViewsBui int index) { return getAuthorizedViewsFieldBuilder().getBuilder(index); } + /** * * @@ -889,6 +911,7 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewsOr return authorizedViewsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -906,6 +929,7 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewsOr return java.util.Collections.unmodifiableList(authorizedViews_); } } + /** * * @@ -919,6 +943,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.Builder addAuthorizedViewsBui return getAuthorizedViewsFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.AuthorizedView.getDefaultInstance()); } + /** * * @@ -933,6 +958,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.Builder addAuthorizedViewsBui return getAuthorizedViewsFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.AuthorizedView.getDefaultInstance()); } + /** * * @@ -968,6 +994,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.Builder addAuthorizedViewsBui } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -992,6 +1019,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1016,6 +1044,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1039,6 +1068,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1058,6 +1088,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * 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..c61e45cd16 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListAuthorizedViewsResponseOrBuilder @@ -34,6 +34,7 @@ public interface ListAuthorizedViewsResponseOrBuilder * repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; */ java.util.List getAuthorizedViewsList(); + /** * * @@ -44,6 +45,7 @@ public interface ListAuthorizedViewsResponseOrBuilder * repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; */ com.google.bigtable.admin.v2.AuthorizedView getAuthorizedViews(int index); + /** * * @@ -54,6 +56,7 @@ public interface ListAuthorizedViewsResponseOrBuilder * repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; */ int getAuthorizedViewsCount(); + /** * * @@ -65,6 +68,7 @@ public interface ListAuthorizedViewsResponseOrBuilder */ java.util.List getAuthorizedViewsOrBuilderList(); + /** * * @@ -90,6 +94,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..c466519fc0 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class ListBackupsRequest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListBackupsRequest) ListBackupsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListBackupsRequest.newBuilder() to construct. private ListBackupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -71,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -99,6 +101,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -132,6 +135,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object filter_ = ""; + /** * * @@ -187,6 +191,7 @@ public java.lang.String getFilter() { return s; } } + /** * * @@ -247,6 +252,7 @@ public com.google.protobuf.ByteString getFilterBytes() { @SuppressWarnings("serial") private volatile java.lang.Object orderBy_ = ""; + /** * * @@ -291,6 +297,7 @@ public java.lang.String getOrderBy() { return s; } } + /** * * @@ -338,6 +345,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 4; private int pageSize_ = 0; + /** * * @@ -359,6 +367,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -386,6 +395,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -609,6 +619,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -852,6 +863,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -879,6 +891,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -906,6 +919,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -932,6 +946,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -954,6 +969,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -983,6 +999,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object filter_ = ""; + /** * * @@ -1037,6 +1054,7 @@ public java.lang.String getFilter() { return (java.lang.String) ref; } } + /** * * @@ -1091,6 +1109,7 @@ public com.google.protobuf.ByteString getFilterBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1144,6 +1163,7 @@ public Builder setFilter(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1193,6 +1213,7 @@ public Builder clearFilter() { onChanged(); return this; } + /** * * @@ -1249,6 +1270,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { } private java.lang.Object orderBy_ = ""; + /** * * @@ -1292,6 +1314,7 @@ public java.lang.String getOrderBy() { return (java.lang.String) ref; } } + /** * * @@ -1335,6 +1358,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1377,6 +1401,7 @@ public Builder setOrderBy(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1415,6 +1440,7 @@ public Builder clearOrderBy() { onChanged(); return this; } + /** * * @@ -1460,6 +1486,7 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -1476,6 +1503,7 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -1496,6 +1524,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -1516,6 +1545,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -1542,6 +1572,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1568,6 +1599,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1593,6 +1625,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1614,6 +1647,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * 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..1da8cf9e8e 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListBackupsRequestOrBuilder @@ -41,6 +41,7 @@ public interface ListBackupsRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -103,6 +104,7 @@ public interface ListBackupsRequestOrBuilder * @return The filter. */ java.lang.String getFilter(); + /** * * @@ -181,6 +183,7 @@ public interface ListBackupsRequestOrBuilder * @return The orderBy. */ java.lang.String getOrderBy(); + /** * * @@ -245,6 +248,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..cf907c460d 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class ListBackupsResponse extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListBackupsResponse) ListBackupsResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListBackupsResponse.newBuilder() to construct. private ListBackupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List backups_; + /** * * @@ -82,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getBackupsList() { return backups_; } + /** * * @@ -96,6 +99,7 @@ public java.util.List getBackupsList() { getBackupsOrBuilderList() { return backups_; } + /** * * @@ -109,6 +113,7 @@ public java.util.List getBackupsList() { public int getBackupsCount() { return backups_.size(); } + /** * * @@ -122,6 +127,7 @@ public int getBackupsCount() { public com.google.bigtable.admin.v2.Backup getBackups(int index) { return backups_.get(index); } + /** * * @@ -140,6 +146,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupsOrBuilder(int inde @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -165,6 +172,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -361,6 +369,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -638,6 +647,7 @@ public java.util.List getBackupsList() { return backupsBuilder_.getMessageList(); } } + /** * * @@ -654,6 +664,7 @@ public int getBackupsCount() { return backupsBuilder_.getCount(); } } + /** * * @@ -670,6 +681,7 @@ public com.google.bigtable.admin.v2.Backup getBackups(int index) { return backupsBuilder_.getMessage(index); } } + /** * * @@ -692,6 +704,7 @@ public Builder setBackups(int index, com.google.bigtable.admin.v2.Backup value) } return this; } + /** * * @@ -712,6 +725,7 @@ public Builder setBackups( } return this; } + /** * * @@ -734,6 +748,7 @@ public Builder addBackups(com.google.bigtable.admin.v2.Backup value) { } return this; } + /** * * @@ -756,6 +771,7 @@ public Builder addBackups(int index, com.google.bigtable.admin.v2.Backup value) } return this; } + /** * * @@ -775,6 +791,7 @@ public Builder addBackups(com.google.bigtable.admin.v2.Backup.Builder builderFor } return this; } + /** * * @@ -795,6 +812,7 @@ public Builder addBackups( } return this; } + /** * * @@ -815,6 +833,7 @@ public Builder addAllBackups( } return this; } + /** * * @@ -834,6 +853,7 @@ public Builder clearBackups() { } return this; } + /** * * @@ -853,6 +873,7 @@ public Builder removeBackups(int index) { } return this; } + /** * * @@ -865,6 +886,7 @@ public Builder removeBackups(int index) { public com.google.bigtable.admin.v2.Backup.Builder getBackupsBuilder(int index) { return getBackupsFieldBuilder().getBuilder(index); } + /** * * @@ -881,6 +903,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupsOrBuilder(int inde return backupsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -898,6 +921,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupsOrBuilder(int inde return java.util.Collections.unmodifiableList(backups_); } } + /** * * @@ -911,6 +935,7 @@ public com.google.bigtable.admin.v2.Backup.Builder addBackupsBuilder() { return getBackupsFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.Backup.getDefaultInstance()); } + /** * * @@ -924,6 +949,7 @@ public com.google.bigtable.admin.v2.Backup.Builder addBackupsBuilder(int index) return getBackupsFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.Backup.getDefaultInstance()); } + /** * * @@ -955,6 +981,7 @@ public java.util.List getBackupsBui } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -979,6 +1006,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1003,6 +1031,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1026,6 +1055,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1045,6 +1075,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * 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..f0e155a9d4 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListBackupsResponseOrBuilder @@ -34,6 +34,7 @@ public interface ListBackupsResponseOrBuilder * repeated .google.bigtable.admin.v2.Backup backups = 1; */ java.util.List getBackupsList(); + /** * * @@ -44,6 +45,7 @@ public interface ListBackupsResponseOrBuilder * repeated .google.bigtable.admin.v2.Backup backups = 1; */ com.google.bigtable.admin.v2.Backup getBackups(int index); + /** * * @@ -54,6 +56,7 @@ public interface ListBackupsResponseOrBuilder * repeated .google.bigtable.admin.v2.Backup backups = 1; */ int getBackupsCount(); + /** * * @@ -64,6 +67,7 @@ public interface ListBackupsResponseOrBuilder * repeated .google.bigtable.admin.v2.Backup backups = 1; */ java.util.List getBackupsOrBuilderList(); + /** * * @@ -89,6 +93,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..4958309075 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class ListClustersRequest extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListClustersRequest) ListClustersRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListClustersRequest.newBuilder() to construct. private ListClustersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -97,6 +99,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -131,6 +134,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -154,6 +158,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -346,6 +351,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -545,6 +551,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -573,6 +580,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -601,6 +609,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -628,6 +637,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -651,6 +661,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -681,6 +692,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object pageToken_ = ""; + /** * * @@ -703,6 +715,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -725,6 +738,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -746,6 +760,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -763,6 +778,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * 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..d602f011a9 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListClustersRequestOrBuilder @@ -42,6 +42,7 @@ public interface ListClustersRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -73,6 +74,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..1d9d9b3b63 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class ListClustersResponse extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListClustersResponse) ListClustersResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListClustersResponse.newBuilder() to construct. private ListClustersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List clusters_; + /** * * @@ -82,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getClustersList() { return clusters_; } + /** * * @@ -96,6 +99,7 @@ public java.util.List getClustersList() { getClustersOrBuilderList() { return clusters_; } + /** * * @@ -109,6 +113,7 @@ public java.util.List getClustersList() { public int getClustersCount() { return clusters_.size(); } + /** * * @@ -122,6 +127,7 @@ public int getClustersCount() { public com.google.bigtable.admin.v2.Cluster getClusters(int index) { return clusters_.get(index); } + /** * * @@ -141,6 +147,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 +166,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClustersOrBuilder(int in public com.google.protobuf.ProtocolStringList getFailedLocationsList() { return failedLocations_; } + /** * * @@ -177,6 +185,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { public int getFailedLocationsCount() { return failedLocations_.size(); } + /** * * @@ -196,6 +205,7 @@ public int getFailedLocationsCount() { public java.lang.String getFailedLocations(int index) { return failedLocations_.get(index); } + /** * * @@ -220,6 +230,7 @@ public com.google.protobuf.ByteString getFailedLocationsBytes(int index) { @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -243,6 +254,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -453,6 +465,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -751,6 +764,7 @@ public java.util.List getClustersList() { return clustersBuilder_.getMessageList(); } } + /** * * @@ -767,6 +781,7 @@ public int getClustersCount() { return clustersBuilder_.getCount(); } } + /** * * @@ -783,6 +798,7 @@ public com.google.bigtable.admin.v2.Cluster getClusters(int index) { return clustersBuilder_.getMessage(index); } } + /** * * @@ -805,6 +821,7 @@ public Builder setClusters(int index, com.google.bigtable.admin.v2.Cluster value } return this; } + /** * * @@ -825,6 +842,7 @@ public Builder setClusters( } return this; } + /** * * @@ -847,6 +865,7 @@ public Builder addClusters(com.google.bigtable.admin.v2.Cluster value) { } return this; } + /** * * @@ -869,6 +888,7 @@ public Builder addClusters(int index, com.google.bigtable.admin.v2.Cluster value } return this; } + /** * * @@ -888,6 +908,7 @@ public Builder addClusters(com.google.bigtable.admin.v2.Cluster.Builder builderF } return this; } + /** * * @@ -908,6 +929,7 @@ public Builder addClusters( } return this; } + /** * * @@ -928,6 +950,7 @@ public Builder addAllClusters( } return this; } + /** * * @@ -947,6 +970,7 @@ public Builder clearClusters() { } return this; } + /** * * @@ -966,6 +990,7 @@ public Builder removeClusters(int index) { } return this; } + /** * * @@ -978,6 +1003,7 @@ public Builder removeClusters(int index) { public com.google.bigtable.admin.v2.Cluster.Builder getClustersBuilder(int index) { return getClustersFieldBuilder().getBuilder(index); } + /** * * @@ -994,6 +1020,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClustersOrBuilder(int in return clustersBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1011,6 +1038,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClustersOrBuilder(int in return java.util.Collections.unmodifiableList(clusters_); } } + /** * * @@ -1024,6 +1052,7 @@ public com.google.bigtable.admin.v2.Cluster.Builder addClustersBuilder() { return getClustersFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.Cluster.getDefaultInstance()); } + /** * * @@ -1037,6 +1066,7 @@ public com.google.bigtable.admin.v2.Cluster.Builder addClustersBuilder(int index return getClustersFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.Cluster.getDefaultInstance()); } + /** * * @@ -1076,6 +1106,7 @@ private void ensureFailedLocationsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -1095,6 +1126,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { failedLocations_.makeImmutable(); return failedLocations_; } + /** * * @@ -1113,6 +1145,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { public int getFailedLocationsCount() { return failedLocations_.size(); } + /** * * @@ -1132,6 +1165,7 @@ public int getFailedLocationsCount() { public java.lang.String getFailedLocations(int index) { return failedLocations_.get(index); } + /** * * @@ -1151,6 +1185,7 @@ public java.lang.String getFailedLocations(int index) { public com.google.protobuf.ByteString getFailedLocationsBytes(int index) { return failedLocations_.getByteString(index); } + /** * * @@ -1178,6 +1213,7 @@ public Builder setFailedLocations(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -1204,6 +1240,7 @@ public Builder addFailedLocations(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1227,6 +1264,7 @@ public Builder addAllFailedLocations(java.lang.Iterable values onChanged(); return this; } + /** * * @@ -1249,6 +1287,7 @@ public Builder clearFailedLocations() { onChanged(); return this; } + /** * * @@ -1278,6 +1317,7 @@ public Builder addFailedLocationsBytes(com.google.protobuf.ByteString value) { } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -1300,6 +1340,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1322,6 +1363,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1343,6 +1385,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1360,6 +1403,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * 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..3f4d41663d 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListClustersResponseOrBuilder @@ -34,6 +34,7 @@ public interface ListClustersResponseOrBuilder * repeated .google.bigtable.admin.v2.Cluster clusters = 1; */ java.util.List getClustersList(); + /** * * @@ -44,6 +45,7 @@ public interface ListClustersResponseOrBuilder * repeated .google.bigtable.admin.v2.Cluster clusters = 1; */ com.google.bigtable.admin.v2.Cluster getClusters(int index); + /** * * @@ -54,6 +56,7 @@ public interface ListClustersResponseOrBuilder * repeated .google.bigtable.admin.v2.Cluster clusters = 1; */ int getClustersCount(); + /** * * @@ -65,6 +68,7 @@ public interface ListClustersResponseOrBuilder */ java.util.List getClustersOrBuilderList(); + /** * * @@ -92,6 +96,7 @@ public interface ListClustersResponseOrBuilder * @return A list containing the failedLocations. */ java.util.List getFailedLocationsList(); + /** * * @@ -108,6 +113,7 @@ public interface ListClustersResponseOrBuilder * @return The count of failedLocations. */ int getFailedLocationsCount(); + /** * * @@ -125,6 +131,7 @@ public interface ListClustersResponseOrBuilder * @return The failedLocations at the given index. */ java.lang.String getFailedLocations(int index); + /** * * @@ -155,6 +162,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..fe7c1b3f3d 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class ListHotTabletsRequest extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListHotTabletsRequest) ListHotTabletsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListHotTabletsRequest.newBuilder() to construct. private ListHotTabletsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -96,6 +98,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -126,6 +129,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int START_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -146,6 +150,7 @@ public com.google.protobuf.ByteString getParentBytes() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -166,6 +171,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -187,6 +193,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -202,6 +209,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -217,6 +225,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -233,6 +242,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public static final int PAGE_SIZE_FIELD_NUMBER = 4; private int pageSize_ = 0; + /** * * @@ -261,6 +271,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -284,6 +295,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -513,6 +525,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -773,6 +786,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -799,6 +813,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -825,6 +840,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -850,6 +866,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -871,6 +888,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -904,6 +922,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -923,6 +942,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public boolean hasStartTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -946,6 +966,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -973,6 +994,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -997,6 +1019,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -1029,6 +1052,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1053,6 +1077,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -1072,6 +1097,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1093,6 +1119,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -1130,6 +1157,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -1144,6 +1172,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1162,6 +1191,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -1184,6 +1214,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1203,6 +1234,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1230,6 +1262,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1249,6 +1282,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1263,6 +1297,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1279,6 +1314,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1306,6 +1342,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private int pageSize_; + /** * * @@ -1329,6 +1366,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public int getPageSize() { return pageSize_; } + /** * * @@ -1356,6 +1394,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -1383,6 +1422,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -1405,6 +1445,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1427,6 +1468,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1448,6 +1490,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1465,6 +1508,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * 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..cefb8246cd 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListHotTabletsRequestOrBuilder @@ -40,6 +40,7 @@ public interface ListHotTabletsRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -74,6 +75,7 @@ public interface ListHotTabletsRequestOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -91,6 +93,7 @@ public interface ListHotTabletsRequestOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -119,6 +122,7 @@ public interface ListHotTabletsRequestOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -131,6 +135,7 @@ public interface ListHotTabletsRequestOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -175,6 +180,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..407136eda8 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class ListHotTabletsResponse extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListHotTabletsResponse) ListHotTabletsResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListHotTabletsResponse.newBuilder() to construct. private ListHotTabletsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List hotTablets_; + /** * * @@ -85,6 +87,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getHotTabletsList() { return hotTablets_; } + /** * * @@ -103,6 +106,7 @@ public java.util.List getHotTabletsList( getHotTabletsOrBuilderList() { return hotTablets_; } + /** * * @@ -120,6 +124,7 @@ public java.util.List getHotTabletsList( public int getHotTabletsCount() { return hotTablets_.size(); } + /** * * @@ -137,6 +142,7 @@ public int getHotTabletsCount() { public com.google.bigtable.admin.v2.HotTablet getHotTablets(int index) { return hotTablets_.get(index); } + /** * * @@ -159,6 +165,7 @@ public com.google.bigtable.admin.v2.HotTabletOrBuilder getHotTabletsOrBuilder(in @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -184,6 +191,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -380,6 +388,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -660,6 +669,7 @@ public java.util.List getHotTabletsList( return hotTabletsBuilder_.getMessageList(); } } + /** * * @@ -680,6 +690,7 @@ public int getHotTabletsCount() { return hotTabletsBuilder_.getCount(); } } + /** * * @@ -700,6 +711,7 @@ public com.google.bigtable.admin.v2.HotTablet getHotTablets(int index) { return hotTabletsBuilder_.getMessage(index); } } + /** * * @@ -726,6 +738,7 @@ public Builder setHotTablets(int index, com.google.bigtable.admin.v2.HotTablet v } return this; } + /** * * @@ -750,6 +763,7 @@ public Builder setHotTablets( } return this; } + /** * * @@ -776,6 +790,7 @@ public Builder addHotTablets(com.google.bigtable.admin.v2.HotTablet value) { } return this; } + /** * * @@ -802,6 +817,7 @@ public Builder addHotTablets(int index, com.google.bigtable.admin.v2.HotTablet v } return this; } + /** * * @@ -825,6 +841,7 @@ public Builder addHotTablets(com.google.bigtable.admin.v2.HotTablet.Builder buil } return this; } + /** * * @@ -849,6 +866,7 @@ public Builder addHotTablets( } return this; } + /** * * @@ -873,6 +891,7 @@ public Builder addAllHotTablets( } return this; } + /** * * @@ -896,6 +915,7 @@ public Builder clearHotTablets() { } return this; } + /** * * @@ -919,6 +939,7 @@ public Builder removeHotTablets(int index) { } return this; } + /** * * @@ -935,6 +956,7 @@ public Builder removeHotTablets(int index) { public com.google.bigtable.admin.v2.HotTablet.Builder getHotTabletsBuilder(int index) { return getHotTabletsFieldBuilder().getBuilder(index); } + /** * * @@ -955,6 +977,7 @@ public com.google.bigtable.admin.v2.HotTabletOrBuilder getHotTabletsOrBuilder(in return hotTabletsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -976,6 +999,7 @@ public com.google.bigtable.admin.v2.HotTabletOrBuilder getHotTabletsOrBuilder(in return java.util.Collections.unmodifiableList(hotTablets_); } } + /** * * @@ -993,6 +1017,7 @@ public com.google.bigtable.admin.v2.HotTablet.Builder addHotTabletsBuilder() { return getHotTabletsFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.HotTablet.getDefaultInstance()); } + /** * * @@ -1010,6 +1035,7 @@ public com.google.bigtable.admin.v2.HotTablet.Builder addHotTabletsBuilder(int i return getHotTabletsFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.HotTablet.getDefaultInstance()); } + /** * * @@ -1046,6 +1072,7 @@ public com.google.bigtable.admin.v2.HotTablet.Builder addHotTabletsBuilder(int i } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -1070,6 +1097,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1094,6 +1122,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1117,6 +1146,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1136,6 +1166,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * 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..6a8fcae91f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListHotTabletsResponseOrBuilder @@ -38,6 +38,7 @@ public interface ListHotTabletsResponseOrBuilder * repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; */ java.util.List getHotTabletsList(); + /** * * @@ -52,6 +53,7 @@ public interface ListHotTabletsResponseOrBuilder * repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; */ com.google.bigtable.admin.v2.HotTablet getHotTablets(int index); + /** * * @@ -66,6 +68,7 @@ public interface ListHotTabletsResponseOrBuilder * repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; */ int getHotTabletsCount(); + /** * * @@ -81,6 +84,7 @@ public interface ListHotTabletsResponseOrBuilder */ java.util.List getHotTabletsOrBuilderList(); + /** * * @@ -110,6 +114,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..a7bd6c7b37 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class ListInstancesRequest extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListInstancesRequest) ListInstancesRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListInstancesRequest.newBuilder() to construct. private ListInstancesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -94,6 +96,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -125,6 +128,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -148,6 +152,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -340,6 +345,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -539,6 +545,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -564,6 +571,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -589,6 +597,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -613,6 +622,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -633,6 +643,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -660,6 +671,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object pageToken_ = ""; + /** * * @@ -682,6 +694,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -704,6 +717,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -725,6 +739,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -742,6 +757,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * 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..a3414472b8 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListInstancesRequestOrBuilder @@ -39,6 +39,7 @@ public interface ListInstancesRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -67,6 +68,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..9dd20c1dda 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class ListInstancesResponse extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListInstancesResponse) ListInstancesResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListInstancesResponse.newBuilder() to construct. private ListInstancesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List instances_; + /** * * @@ -82,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getInstancesList() { return instances_; } + /** * * @@ -96,6 +99,7 @@ public java.util.List getInstancesList() getInstancesOrBuilderList() { return instances_; } + /** * * @@ -109,6 +113,7 @@ public java.util.List getInstancesList() public int getInstancesCount() { return instances_.size(); } + /** * * @@ -122,6 +127,7 @@ public int getInstancesCount() { public com.google.bigtable.admin.v2.Instance getInstances(int index) { return instances_.get(index); } + /** * * @@ -141,6 +147,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 +167,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstancesOrBuilder(int public com.google.protobuf.ProtocolStringList getFailedLocationsList() { return failedLocations_; } + /** * * @@ -179,6 +187,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { public int getFailedLocationsCount() { return failedLocations_.size(); } + /** * * @@ -199,6 +208,7 @@ public int getFailedLocationsCount() { public java.lang.String getFailedLocations(int index) { return failedLocations_.get(index); } + /** * * @@ -224,6 +234,7 @@ public com.google.protobuf.ByteString getFailedLocationsBytes(int index) { @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -247,6 +258,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -457,6 +469,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -755,6 +768,7 @@ public java.util.List getInstancesList() return instancesBuilder_.getMessageList(); } } + /** * * @@ -771,6 +785,7 @@ public int getInstancesCount() { return instancesBuilder_.getCount(); } } + /** * * @@ -787,6 +802,7 @@ public com.google.bigtable.admin.v2.Instance getInstances(int index) { return instancesBuilder_.getMessage(index); } } + /** * * @@ -809,6 +825,7 @@ public Builder setInstances(int index, com.google.bigtable.admin.v2.Instance val } return this; } + /** * * @@ -829,6 +846,7 @@ public Builder setInstances( } return this; } + /** * * @@ -851,6 +869,7 @@ public Builder addInstances(com.google.bigtable.admin.v2.Instance value) { } return this; } + /** * * @@ -873,6 +892,7 @@ public Builder addInstances(int index, com.google.bigtable.admin.v2.Instance val } return this; } + /** * * @@ -892,6 +912,7 @@ public Builder addInstances(com.google.bigtable.admin.v2.Instance.Builder builde } return this; } + /** * * @@ -912,6 +933,7 @@ public Builder addInstances( } return this; } + /** * * @@ -932,6 +954,7 @@ public Builder addAllInstances( } return this; } + /** * * @@ -951,6 +974,7 @@ public Builder clearInstances() { } return this; } + /** * * @@ -970,6 +994,7 @@ public Builder removeInstances(int index) { } return this; } + /** * * @@ -982,6 +1007,7 @@ public Builder removeInstances(int index) { public com.google.bigtable.admin.v2.Instance.Builder getInstancesBuilder(int index) { return getInstancesFieldBuilder().getBuilder(index); } + /** * * @@ -998,6 +1024,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstancesOrBuilder(int return instancesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1015,6 +1042,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstancesOrBuilder(int return java.util.Collections.unmodifiableList(instances_); } } + /** * * @@ -1028,6 +1056,7 @@ public com.google.bigtable.admin.v2.Instance.Builder addInstancesBuilder() { return getInstancesFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.Instance.getDefaultInstance()); } + /** * * @@ -1041,6 +1070,7 @@ public com.google.bigtable.admin.v2.Instance.Builder addInstancesBuilder(int ind return getInstancesFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.Instance.getDefaultInstance()); } + /** * * @@ -1080,6 +1110,7 @@ private void ensureFailedLocationsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -1100,6 +1131,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { failedLocations_.makeImmutable(); return failedLocations_; } + /** * * @@ -1119,6 +1151,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { public int getFailedLocationsCount() { return failedLocations_.size(); } + /** * * @@ -1139,6 +1172,7 @@ public int getFailedLocationsCount() { public java.lang.String getFailedLocations(int index) { return failedLocations_.get(index); } + /** * * @@ -1159,6 +1193,7 @@ public java.lang.String getFailedLocations(int index) { public com.google.protobuf.ByteString getFailedLocationsBytes(int index) { return failedLocations_.getByteString(index); } + /** * * @@ -1187,6 +1222,7 @@ public Builder setFailedLocations(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -1214,6 +1250,7 @@ public Builder addFailedLocations(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1238,6 +1275,7 @@ public Builder addAllFailedLocations(java.lang.Iterable values onChanged(); return this; } + /** * * @@ -1261,6 +1299,7 @@ public Builder clearFailedLocations() { onChanged(); return this; } + /** * * @@ -1291,6 +1330,7 @@ public Builder addFailedLocationsBytes(com.google.protobuf.ByteString value) { } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -1313,6 +1353,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1335,6 +1376,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1356,6 +1398,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1373,6 +1416,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * 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..4854201f70 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListInstancesResponseOrBuilder @@ -34,6 +34,7 @@ public interface ListInstancesResponseOrBuilder * repeated .google.bigtable.admin.v2.Instance instances = 1; */ java.util.List getInstancesList(); + /** * * @@ -44,6 +45,7 @@ public interface ListInstancesResponseOrBuilder * repeated .google.bigtable.admin.v2.Instance instances = 1; */ com.google.bigtable.admin.v2.Instance getInstances(int index); + /** * * @@ -54,6 +56,7 @@ public interface ListInstancesResponseOrBuilder * repeated .google.bigtable.admin.v2.Instance instances = 1; */ int getInstancesCount(); + /** * * @@ -65,6 +68,7 @@ public interface ListInstancesResponseOrBuilder */ java.util.List getInstancesOrBuilderList(); + /** * * @@ -93,6 +97,7 @@ public interface ListInstancesResponseOrBuilder * @return A list containing the failedLocations. */ java.util.List getFailedLocationsList(); + /** * * @@ -110,6 +115,7 @@ public interface ListInstancesResponseOrBuilder * @return The count of failedLocations. */ int getFailedLocationsCount(); + /** * * @@ -128,6 +134,7 @@ public interface ListInstancesResponseOrBuilder * @return The failedLocations at the given index. */ java.lang.String getFailedLocations(int index); + /** * * @@ -159,6 +166,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..9a7df6caf0 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsRequest.java @@ -0,0 +1,980 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Request message for BigtableInstanceAdmin.ListLogicalViews.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.ListLogicalViewsRequest} + */ +public final class ListLogicalViewsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListLogicalViewsRequest) + ListLogicalViewsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListLogicalViewsRequest.newBuilder() to construct. + private ListLogicalViewsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListLogicalViewsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListLogicalViewsRequest(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.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_); + } + 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(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.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_); + } + 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..fc4afa326d --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..a30e023c5c --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsResponse.java @@ -0,0 +1,1159 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Response message for BigtableInstanceAdmin.ListLogicalViews.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.ListLogicalViewsResponse} + */ +public final class ListLogicalViewsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListLogicalViewsResponse) + ListLogicalViewsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListLogicalViewsResponse.newBuilder() to construct. + private ListLogicalViewsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListLogicalViewsResponse() { + logicalViews_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListLogicalViewsResponse(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLogicalViewsFieldBuilder() + : 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.RepeatedFieldBuilderV3< + 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 getLogicalViewsFieldBuilder().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 getLogicalViewsFieldBuilder() + .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 getLogicalViewsFieldBuilder() + .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 getLogicalViewsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.bigtable.admin.v2.LogicalView, + com.google.bigtable.admin.v2.LogicalView.Builder, + com.google.bigtable.admin.v2.LogicalViewOrBuilder> + getLogicalViewsFieldBuilder() { + if (logicalViewsBuilder_ == null) { + logicalViewsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..84ac3a0e3c --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsResponseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..17da7db626 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsRequest.java @@ -0,0 +1,981 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Request message for BigtableInstanceAdmin.ListMaterializedViews.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.ListMaterializedViewsRequest} + */ +public final class ListMaterializedViewsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListMaterializedViewsRequest) + ListMaterializedViewsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListMaterializedViewsRequest.newBuilder() to construct. + private ListMaterializedViewsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListMaterializedViewsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListMaterializedViewsRequest(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.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_); + } + 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(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.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_); + } + 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..d9bb3b1cc8 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..b70bde73a3 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsResponse.java @@ -0,0 +1,1171 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Response message for BigtableInstanceAdmin.ListMaterializedViews.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.ListMaterializedViewsResponse} + */ +public final class ListMaterializedViewsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListMaterializedViewsResponse) + ListMaterializedViewsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListMaterializedViewsResponse.newBuilder() to construct. + private ListMaterializedViewsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListMaterializedViewsResponse() { + materializedViews_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListMaterializedViewsResponse(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMaterializedViewsFieldBuilder() + : 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.RepeatedFieldBuilderV3< + 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 getMaterializedViewsFieldBuilder().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 getMaterializedViewsFieldBuilder() + .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 getMaterializedViewsFieldBuilder() + .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 getMaterializedViewsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.bigtable.admin.v2.MaterializedView, + com.google.bigtable.admin.v2.MaterializedView.Builder, + com.google.bigtable.admin.v2.MaterializedViewOrBuilder> + getMaterializedViewsFieldBuilder() { + if (materializedViewsBuilder_ == null) { + materializedViewsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..45d43af134 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsResponseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..52079293fa --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesRequest.java @@ -0,0 +1,987 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * The request for
    + * [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.ListSchemaBundlesRequest} + */ +public final class ListSchemaBundlesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListSchemaBundlesRequest) + ListSchemaBundlesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListSchemaBundlesRequest.newBuilder() to construct. + private ListSchemaBundlesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSchemaBundlesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSchemaBundlesRequest(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.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_); + } + 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(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.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_); + } + 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..5dfd3967fc --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesRequestOrBuilder.java @@ -0,0 +1,109 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..e1c26988d4 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesResponse.java @@ -0,0 +1,1164 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * The response for
    + * [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.ListSchemaBundlesResponse} + */ +public final class ListSchemaBundlesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListSchemaBundlesResponse) + ListSchemaBundlesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListSchemaBundlesResponse.newBuilder() to construct. + private ListSchemaBundlesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSchemaBundlesResponse() { + schemaBundles_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSchemaBundlesResponse(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSchemaBundlesFieldBuilder() + : 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.RepeatedFieldBuilderV3< + 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 getSchemaBundlesFieldBuilder().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 getSchemaBundlesFieldBuilder() + .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 getSchemaBundlesFieldBuilder() + .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 getSchemaBundlesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.bigtable.admin.v2.SchemaBundle, + com.google.bigtable.admin.v2.SchemaBundle.Builder, + com.google.bigtable.admin.v2.SchemaBundleOrBuilder> + getSchemaBundlesFieldBuilder() { + if (schemaBundlesBuilder_ == null) { + schemaBundlesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..98c93d1445 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesResponseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..8905a05711 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -39,6 +39,7 @@ public final class ListSnapshotsRequest extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListSnapshotsRequest) ListSnapshotsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListSnapshotsRequest.newBuilder() to construct. private ListSnapshotsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -74,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -103,6 +105,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -135,6 +138,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_ = 0; + /** * * @@ -156,6 +160,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -179,6 +184,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -380,6 +386,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -598,6 +605,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -626,6 +634,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -654,6 +663,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -681,6 +691,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -704,6 +715,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -734,6 +746,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -750,6 +763,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -770,6 +784,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -790,6 +805,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -812,6 +828,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -834,6 +851,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -855,6 +873,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -872,6 +891,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * 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..6e4a32aeb2 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListSnapshotsRequestOrBuilder @@ -42,6 +42,7 @@ public interface ListSnapshotsRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -87,6 +88,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..1116a54ba2 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -39,6 +39,7 @@ public final class ListSnapshotsResponse extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListSnapshotsResponse) ListSnapshotsResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListSnapshotsResponse.newBuilder() to construct. private ListSnapshotsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -74,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List snapshots_; + /** * * @@ -87,6 +89,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getSnapshotsList() { return snapshots_; } + /** * * @@ -101,6 +104,7 @@ public java.util.List getSnapshotsList() getSnapshotsOrBuilderList() { return snapshots_; } + /** * * @@ -114,6 +118,7 @@ public java.util.List getSnapshotsList() public int getSnapshotsCount() { return snapshots_.size(); } + /** * * @@ -127,6 +132,7 @@ public int getSnapshotsCount() { public com.google.bigtable.admin.v2.Snapshot getSnapshots(int index) { return snapshots_.get(index); } + /** * * @@ -145,6 +151,7 @@ public com.google.bigtable.admin.v2.SnapshotOrBuilder getSnapshotsOrBuilder(int @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -170,6 +177,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -366,6 +374,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -648,6 +657,7 @@ public java.util.List getSnapshotsList() return snapshotsBuilder_.getMessageList(); } } + /** * * @@ -664,6 +674,7 @@ public int getSnapshotsCount() { return snapshotsBuilder_.getCount(); } } + /** * * @@ -680,6 +691,7 @@ public com.google.bigtable.admin.v2.Snapshot getSnapshots(int index) { return snapshotsBuilder_.getMessage(index); } } + /** * * @@ -702,6 +714,7 @@ public Builder setSnapshots(int index, com.google.bigtable.admin.v2.Snapshot val } return this; } + /** * * @@ -722,6 +735,7 @@ public Builder setSnapshots( } return this; } + /** * * @@ -744,6 +758,7 @@ public Builder addSnapshots(com.google.bigtable.admin.v2.Snapshot value) { } return this; } + /** * * @@ -766,6 +781,7 @@ public Builder addSnapshots(int index, com.google.bigtable.admin.v2.Snapshot val } return this; } + /** * * @@ -785,6 +801,7 @@ public Builder addSnapshots(com.google.bigtable.admin.v2.Snapshot.Builder builde } return this; } + /** * * @@ -805,6 +822,7 @@ public Builder addSnapshots( } return this; } + /** * * @@ -825,6 +843,7 @@ public Builder addAllSnapshots( } return this; } + /** * * @@ -844,6 +863,7 @@ public Builder clearSnapshots() { } return this; } + /** * * @@ -863,6 +883,7 @@ public Builder removeSnapshots(int index) { } return this; } + /** * * @@ -875,6 +896,7 @@ public Builder removeSnapshots(int index) { public com.google.bigtable.admin.v2.Snapshot.Builder getSnapshotsBuilder(int index) { return getSnapshotsFieldBuilder().getBuilder(index); } + /** * * @@ -891,6 +913,7 @@ public com.google.bigtable.admin.v2.SnapshotOrBuilder getSnapshotsOrBuilder(int return snapshotsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -908,6 +931,7 @@ public com.google.bigtable.admin.v2.SnapshotOrBuilder getSnapshotsOrBuilder(int return java.util.Collections.unmodifiableList(snapshots_); } } + /** * * @@ -921,6 +945,7 @@ public com.google.bigtable.admin.v2.Snapshot.Builder addSnapshotsBuilder() { return getSnapshotsFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.Snapshot.getDefaultInstance()); } + /** * * @@ -934,6 +959,7 @@ public com.google.bigtable.admin.v2.Snapshot.Builder addSnapshotsBuilder(int ind return getSnapshotsFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.Snapshot.getDefaultInstance()); } + /** * * @@ -965,6 +991,7 @@ public java.util.List getSnapshot } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -989,6 +1016,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1013,6 +1041,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1036,6 +1065,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1055,6 +1085,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * 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..25d011015a 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListSnapshotsResponseOrBuilder @@ -34,6 +34,7 @@ public interface ListSnapshotsResponseOrBuilder * repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; */ java.util.List getSnapshotsList(); + /** * * @@ -44,6 +45,7 @@ public interface ListSnapshotsResponseOrBuilder * repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; */ com.google.bigtable.admin.v2.Snapshot getSnapshots(int index); + /** * * @@ -54,6 +56,7 @@ public interface ListSnapshotsResponseOrBuilder * repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; */ int getSnapshotsCount(); + /** * * @@ -65,6 +68,7 @@ public interface ListSnapshotsResponseOrBuilder */ java.util.List getSnapshotsOrBuilderList(); + /** * * @@ -90,6 +94,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..4b63184697 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class ListTablesRequest extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListTablesRequest) ListTablesRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ListTablesRequest.newBuilder() to construct. private ListTablesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -70,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -96,6 +98,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -125,6 +128,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int VIEW_FIELD_NUMBER = 2; private int view_ = 0; + /** * * @@ -141,6 +145,7 @@ public com.google.protobuf.ByteString getParentBytes() { public int getViewValue() { return view_; } + /** * * @@ -162,6 +167,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 +196,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -213,6 +220,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -423,6 +431,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -648,6 +657,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -673,6 +683,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -698,6 +709,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -722,6 +734,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -742,6 +755,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -769,6 +783,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private int view_ = 0; + /** * * @@ -785,6 +800,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public int getViewValue() { return view_; } + /** * * @@ -804,6 +820,7 @@ public Builder setViewValue(int value) { onChanged(); return this; } + /** * * @@ -822,6 +839,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 +862,7 @@ public Builder setView(com.google.bigtable.admin.v2.Table.View value) { onChanged(); return this; } + /** * * @@ -864,6 +883,7 @@ public Builder clearView() { } private int pageSize_; + /** * * @@ -887,6 +907,7 @@ public Builder clearView() { public int getPageSize() { return pageSize_; } + /** * * @@ -914,6 +935,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -941,6 +963,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -963,6 +986,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -985,6 +1009,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1006,6 +1031,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1023,6 +1049,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * 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..be95a3d9af 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListTablesRequestOrBuilder @@ -39,6 +39,7 @@ public interface ListTablesRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -68,6 +69,7 @@ public interface ListTablesRequestOrBuilder * @return The enum numeric value on the wire for view. */ int getViewValue(); + /** * * @@ -115,6 +117,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..362958639f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class ListTablesResponse extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListTablesResponse) ListTablesResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ListTablesResponse.newBuilder() to construct. private ListTablesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List tables_; + /** * * @@ -82,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getTablesList() { return tables_; } + /** * * @@ -96,6 +99,7 @@ public java.util.List getTablesList() { getTablesOrBuilderList() { return tables_; } + /** * * @@ -109,6 +113,7 @@ public java.util.List getTablesList() { public int getTablesCount() { return tables_.size(); } + /** * * @@ -122,6 +127,7 @@ public int getTablesCount() { public com.google.bigtable.admin.v2.Table getTables(int index) { return tables_.get(index); } + /** * * @@ -140,6 +146,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTablesOrBuilder(int index) @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -165,6 +172,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -361,6 +369,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -638,6 +647,7 @@ public java.util.List getTablesList() { return tablesBuilder_.getMessageList(); } } + /** * * @@ -654,6 +664,7 @@ public int getTablesCount() { return tablesBuilder_.getCount(); } } + /** * * @@ -670,6 +681,7 @@ public com.google.bigtable.admin.v2.Table getTables(int index) { return tablesBuilder_.getMessage(index); } } + /** * * @@ -692,6 +704,7 @@ public Builder setTables(int index, com.google.bigtable.admin.v2.Table value) { } return this; } + /** * * @@ -712,6 +725,7 @@ public Builder setTables( } return this; } + /** * * @@ -734,6 +748,7 @@ public Builder addTables(com.google.bigtable.admin.v2.Table value) { } return this; } + /** * * @@ -756,6 +771,7 @@ public Builder addTables(int index, com.google.bigtable.admin.v2.Table value) { } return this; } + /** * * @@ -775,6 +791,7 @@ public Builder addTables(com.google.bigtable.admin.v2.Table.Builder builderForVa } return this; } + /** * * @@ -795,6 +812,7 @@ public Builder addTables( } return this; } + /** * * @@ -815,6 +833,7 @@ public Builder addAllTables( } return this; } + /** * * @@ -834,6 +853,7 @@ public Builder clearTables() { } return this; } + /** * * @@ -853,6 +873,7 @@ public Builder removeTables(int index) { } return this; } + /** * * @@ -865,6 +886,7 @@ public Builder removeTables(int index) { public com.google.bigtable.admin.v2.Table.Builder getTablesBuilder(int index) { return getTablesFieldBuilder().getBuilder(index); } + /** * * @@ -881,6 +903,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTablesOrBuilder(int index) return tablesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -898,6 +921,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTablesOrBuilder(int index) return java.util.Collections.unmodifiableList(tables_); } } + /** * * @@ -911,6 +935,7 @@ public com.google.bigtable.admin.v2.Table.Builder addTablesBuilder() { return getTablesFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.Table.getDefaultInstance()); } + /** * * @@ -924,6 +949,7 @@ public com.google.bigtable.admin.v2.Table.Builder addTablesBuilder(int index) { return getTablesFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.Table.getDefaultInstance()); } + /** * * @@ -955,6 +981,7 @@ public java.util.List getTablesBuild } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -979,6 +1006,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1003,6 +1031,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1026,6 +1055,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1045,6 +1075,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * 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..10c64bdad7 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ListTablesResponseOrBuilder @@ -34,6 +34,7 @@ public interface ListTablesResponseOrBuilder * repeated .google.bigtable.admin.v2.Table tables = 1; */ java.util.List getTablesList(); + /** * * @@ -44,6 +45,7 @@ public interface ListTablesResponseOrBuilder * repeated .google.bigtable.admin.v2.Table tables = 1; */ com.google.bigtable.admin.v2.Table getTables(int index); + /** * * @@ -54,6 +56,7 @@ public interface ListTablesResponseOrBuilder * repeated .google.bigtable.admin.v2.Table tables = 1; */ int getTablesCount(); + /** * * @@ -64,6 +67,7 @@ public interface ListTablesResponseOrBuilder * repeated .google.bigtable.admin.v2.Table tables = 1; */ java.util.List getTablesOrBuilderList(); + /** * * @@ -89,6 +93,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..2ab238547d 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 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. 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..1da8dfb5ea --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LogicalView.java @@ -0,0 +1,1142 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +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} + */ +public final class LogicalView extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.LogicalView) + LogicalViewOrBuilder { + private static final long serialVersionUID = 0L; + + // Use LogicalView.newBuilder() to construct. + private LogicalView(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LogicalView() { + name_ = ""; + query_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LogicalView(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..54108f013a --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LogicalViewName.java @@ -0,0 +1,227 @@ +/* + * 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.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..c781c63cd0 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LogicalViewOrBuilder.java @@ -0,0 +1,127 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..eef1ebad5e --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/MaterializedView.java @@ -0,0 +1,1157 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +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} + */ +public final class MaterializedView extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.MaterializedView) + MaterializedViewOrBuilder { + private static final long serialVersionUID = 0L; + + // Use MaterializedView.newBuilder() to construct. + private MaterializedView(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MaterializedView() { + name_ = ""; + query_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MaterializedView(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..c8f45670f4 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/MaterializedViewName.java @@ -0,0 +1,227 @@ +/* + * 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.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..2209322bc3 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/MaterializedViewOrBuilder.java @@ -0,0 +1,131 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/instance.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..bbe3469cac 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class ModifyColumnFamiliesRequest extends com.google.protobuf.Gener // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ModifyColumnFamiliesRequest) ModifyColumnFamiliesRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ModifyColumnFamiliesRequest.newBuilder() to construct. private ModifyColumnFamiliesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -82,6 +83,7 @@ public interface ModificationOrBuilder * @return The id. */ java.lang.String getId(); + /** * * @@ -108,6 +110,7 @@ public interface ModificationOrBuilder * @return Whether the create field is set. */ boolean hasCreate(); + /** * * @@ -121,6 +124,7 @@ public interface ModificationOrBuilder * @return The create. */ com.google.bigtable.admin.v2.ColumnFamily getCreate(); + /** * * @@ -146,6 +150,7 @@ public interface ModificationOrBuilder * @return Whether the update field is set. */ boolean hasUpdate(); + /** * * @@ -159,6 +164,7 @@ public interface ModificationOrBuilder * @return The update. */ com.google.bigtable.admin.v2.ColumnFamily getUpdate(); + /** * * @@ -184,6 +190,7 @@ public interface ModificationOrBuilder * @return Whether the drop field is set. */ boolean hasDrop(); + /** * * @@ -213,6 +220,7 @@ public interface ModificationOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -228,6 +236,7 @@ public interface ModificationOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * @@ -244,6 +253,7 @@ public interface ModificationOrBuilder com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.ModCase getModCase(); } + /** * * @@ -258,6 +268,7 @@ public static final class Modification extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification) ModificationOrBuilder { private static final long serialVersionUID = 0L; + // Use Modification.newBuilder() to construct. private Modification(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -307,6 +318,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 +357,7 @@ public ModCase getModCase() { @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; + /** * * @@ -368,6 +381,7 @@ public java.lang.String getId() { return s; } } + /** * * @@ -393,6 +407,7 @@ public com.google.protobuf.ByteString getIdBytes() { } public static final int CREATE_FIELD_NUMBER = 2; + /** * * @@ -409,6 +424,7 @@ public com.google.protobuf.ByteString getIdBytes() { public boolean hasCreate() { return modCase_ == 2; } + /** * * @@ -428,6 +444,7 @@ public com.google.bigtable.admin.v2.ColumnFamily getCreate() { } return com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance(); } + /** * * @@ -447,6 +464,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getCreateOrBuilder() { } public static final int UPDATE_FIELD_NUMBER = 3; + /** * * @@ -463,6 +481,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getCreateOrBuilder() { public boolean hasUpdate() { return modCase_ == 3; } + /** * * @@ -482,6 +501,7 @@ public com.google.bigtable.admin.v2.ColumnFamily getUpdate() { } return com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance(); } + /** * * @@ -501,6 +521,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getUpdateOrBuilder() { } public static final int DROP_FIELD_NUMBER = 4; + /** * * @@ -517,6 +538,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getUpdateOrBuilder() { public boolean hasDrop() { return modCase_ == 4; } + /** * * @@ -539,6 +561,7 @@ public boolean getDrop() { public static final int UPDATE_MASK_FIELD_NUMBER = 6; private com.google.protobuf.FieldMask updateMask_; + /** * * @@ -557,6 +580,7 @@ public boolean getDrop() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -575,6 +599,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -822,6 +847,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1123,6 +1149,7 @@ public Builder clearMod() { private int bitField0_; private java.lang.Object id_ = ""; + /** * * @@ -1145,6 +1172,7 @@ public java.lang.String getId() { return (java.lang.String) ref; } } + /** * * @@ -1167,6 +1195,7 @@ public com.google.protobuf.ByteString getIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1188,6 +1217,7 @@ public Builder setId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1205,6 +1235,7 @@ public Builder clearId() { onChanged(); return this; } + /** * * @@ -1233,6 +1264,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) { com.google.bigtable.admin.v2.ColumnFamily.Builder, com.google.bigtable.admin.v2.ColumnFamilyOrBuilder> createBuilder_; + /** * * @@ -1249,6 +1281,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) { public boolean hasCreate() { return modCase_ == 2; } + /** * * @@ -1275,6 +1308,7 @@ public com.google.bigtable.admin.v2.ColumnFamily getCreate() { return com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance(); } } + /** * * @@ -1298,6 +1332,7 @@ public Builder setCreate(com.google.bigtable.admin.v2.ColumnFamily value) { modCase_ = 2; return this; } + /** * * @@ -1318,6 +1353,7 @@ public Builder setCreate(com.google.bigtable.admin.v2.ColumnFamily.Builder build modCase_ = 2; return this; } + /** * * @@ -1351,6 +1387,7 @@ public Builder mergeCreate(com.google.bigtable.admin.v2.ColumnFamily value) { modCase_ = 2; return this; } + /** * * @@ -1377,6 +1414,7 @@ public Builder clearCreate() { } return this; } + /** * * @@ -1390,6 +1428,7 @@ public Builder clearCreate() { public com.google.bigtable.admin.v2.ColumnFamily.Builder getCreateBuilder() { return getCreateFieldBuilder().getBuilder(); } + /** * * @@ -1411,6 +1450,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getCreateOrBuilder() { return com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance(); } } + /** * * @@ -1450,6 +1490,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getCreateOrBuilder() { com.google.bigtable.admin.v2.ColumnFamily.Builder, com.google.bigtable.admin.v2.ColumnFamilyOrBuilder> updateBuilder_; + /** * * @@ -1466,6 +1507,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getCreateOrBuilder() { public boolean hasUpdate() { return modCase_ == 3; } + /** * * @@ -1492,6 +1534,7 @@ public com.google.bigtable.admin.v2.ColumnFamily getUpdate() { return com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance(); } } + /** * * @@ -1515,6 +1558,7 @@ public Builder setUpdate(com.google.bigtable.admin.v2.ColumnFamily value) { modCase_ = 3; return this; } + /** * * @@ -1535,6 +1579,7 @@ public Builder setUpdate(com.google.bigtable.admin.v2.ColumnFamily.Builder build modCase_ = 3; return this; } + /** * * @@ -1568,6 +1613,7 @@ public Builder mergeUpdate(com.google.bigtable.admin.v2.ColumnFamily value) { modCase_ = 3; return this; } + /** * * @@ -1594,6 +1640,7 @@ public Builder clearUpdate() { } return this; } + /** * * @@ -1607,6 +1654,7 @@ public Builder clearUpdate() { public com.google.bigtable.admin.v2.ColumnFamily.Builder getUpdateBuilder() { return getUpdateFieldBuilder().getBuilder(); } + /** * * @@ -1628,6 +1676,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getUpdateOrBuilder() { return com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance(); } } + /** * * @@ -1677,6 +1726,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getUpdateOrBuilder() { public boolean hasDrop() { return modCase_ == 4; } + /** * * @@ -1695,6 +1745,7 @@ public boolean getDrop() { } return false; } + /** * * @@ -1715,6 +1766,7 @@ public Builder setDrop(boolean value) { onChanged(); return this; } + /** * * @@ -1742,6 +1794,7 @@ public Builder clearDrop() { com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -1759,6 +1812,7 @@ public Builder clearDrop() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1782,6 +1836,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -1807,6 +1862,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -1829,6 +1885,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -1859,6 +1916,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -1881,6 +1939,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -1898,6 +1957,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { onChanged(); return getUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -1919,6 +1979,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -2020,6 +2081,7 @@ public com.google.protobuf.Parser getParserForType() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -2047,6 +2109,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -2080,6 +2143,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private java.util.List modifications_; + /** * * @@ -2099,6 +2163,7 @@ public com.google.protobuf.ByteString getNameBytes() { getModificationsList() { return modifications_; } + /** * * @@ -2119,6 +2184,7 @@ public com.google.protobuf.ByteString getNameBytes() { getModificationsOrBuilderList() { return modifications_; } + /** * * @@ -2137,6 +2203,7 @@ public com.google.protobuf.ByteString getNameBytes() { public int getModificationsCount() { return modifications_.size(); } + /** * * @@ -2156,6 +2223,7 @@ public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification get int index) { return modifications_.get(index); } + /** * * @@ -2178,6 +2246,7 @@ public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification get public static final int IGNORE_WARNINGS_FIELD_NUMBER = 3; private boolean ignoreWarnings_ = false; + /** * * @@ -2374,6 +2443,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -2635,6 +2705,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -2661,6 +2732,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -2687,6 +2759,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2712,6 +2785,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2733,6 +2807,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -2801,6 +2876,7 @@ private void ensureModificationsIsMutable() { return modificationsBuilder_.getMessageList(); } } + /** * * @@ -2822,6 +2898,7 @@ public int getModificationsCount() { return modificationsBuilder_.getCount(); } } + /** * * @@ -2844,6 +2921,7 @@ public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification get return modificationsBuilder_.getMessage(index); } } + /** * * @@ -2872,6 +2950,7 @@ public Builder setModifications( } return this; } + /** * * @@ -2899,6 +2978,7 @@ public Builder setModifications( } return this; } + /** * * @@ -2927,6 +3007,7 @@ public Builder addModifications( } return this; } + /** * * @@ -2955,6 +3036,7 @@ public Builder addModifications( } return this; } + /** * * @@ -2981,6 +3063,7 @@ public Builder addModifications( } return this; } + /** * * @@ -3008,6 +3091,7 @@ public Builder addModifications( } return this; } + /** * * @@ -3035,6 +3119,7 @@ public Builder addAllModifications( } return this; } + /** * * @@ -3059,6 +3144,7 @@ public Builder clearModifications() { } return this; } + /** * * @@ -3083,6 +3169,7 @@ public Builder removeModifications(int index) { } return this; } + /** * * @@ -3101,6 +3188,7 @@ public Builder removeModifications(int index) { getModificationsBuilder(int index) { return getModificationsFieldBuilder().getBuilder(index); } + /** * * @@ -3123,6 +3211,7 @@ public Builder removeModifications(int index) { return modificationsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -3147,6 +3236,7 @@ public Builder removeModifications(int index) { return java.util.Collections.unmodifiableList(modifications_); } } + /** * * @@ -3168,6 +3258,7 @@ public Builder removeModifications(int index) { com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification .getDefaultInstance()); } + /** * * @@ -3190,6 +3281,7 @@ public Builder removeModifications(int index) { com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification .getDefaultInstance()); } + /** * * @@ -3231,6 +3323,7 @@ public Builder removeModifications(int index) { } private boolean ignoreWarnings_; + /** * * @@ -3246,6 +3339,7 @@ public Builder removeModifications(int index) { public boolean getIgnoreWarnings() { return ignoreWarnings_; } + /** * * @@ -3265,6 +3359,7 @@ public Builder setIgnoreWarnings(boolean value) { onChanged(); return this; } + /** * * 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..31abacda83 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface ModifyColumnFamiliesRequestOrBuilder @@ -40,6 +40,7 @@ public interface ModifyColumnFamiliesRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -73,6 +74,7 @@ public interface ModifyColumnFamiliesRequestOrBuilder */ java.util.List getModificationsList(); + /** * * @@ -88,6 +90,7 @@ public interface ModifyColumnFamiliesRequestOrBuilder *
    */ com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification getModifications(int index); + /** * * @@ -103,6 +106,7 @@ public interface ModifyColumnFamiliesRequestOrBuilder *
    */ int getModificationsCount(); + /** * * @@ -120,6 +124,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..e7dd929b71 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/common.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class OperationProgress extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.OperationProgress) OperationProgressOrBuilder { private static final long serialVersionUID = 0L; + // Use OperationProgress.newBuilder() to construct. private OperationProgress(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,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 +86,7 @@ public int getProgressPercent() { public static final int START_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -99,6 +102,7 @@ public int getProgressPercent() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -114,6 +118,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -130,6 +135,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -146,6 +152,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -162,6 +169,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -364,6 +372,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -594,6 +603,7 @@ public Builder mergeFrom( private int bitField0_; private int progressPercent_; + /** * * @@ -610,6 +620,7 @@ public Builder mergeFrom( public int getProgressPercent() { return progressPercent_; } + /** * * @@ -630,6 +641,7 @@ public Builder setProgressPercent(int value) { onChanged(); return this; } + /** * * @@ -655,6 +667,7 @@ public Builder clearProgressPercent() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -669,6 +682,7 @@ public Builder clearProgressPercent() { public boolean hasStartTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -687,6 +701,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -709,6 +724,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -728,6 +744,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -755,6 +772,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -774,6 +792,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -788,6 +807,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -804,6 +824,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -836,6 +857,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -851,6 +873,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -870,6 +893,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -893,6 +917,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -913,6 +938,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -941,6 +967,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -961,6 +988,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -976,6 +1004,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -993,6 +1022,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * 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..4d39995025 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/common.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface OperationProgressOrBuilder @@ -50,6 +50,7 @@ public interface OperationProgressOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -62,6 +63,7 @@ public interface OperationProgressOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -86,6 +88,7 @@ public interface OperationProgressOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -99,6 +102,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..ead1f10c76 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -36,6 +36,7 @@ public final class OptimizeRestoredTableMetadata extends com.google.protobuf.Gen // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.OptimizeRestoredTableMetadata) OptimizeRestoredTableMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use OptimizeRestoredTableMetadata.newBuilder() to construct. private OptimizeRestoredTableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -71,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -94,6 +96,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -120,6 +123,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 +139,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasProgress() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -152,6 +157,7 @@ public com.google.bigtable.admin.v2.OperationProgress getProgress() { ? com.google.bigtable.admin.v2.OperationProgress.getDefaultInstance() : progress_; } + /** * * @@ -342,6 +348,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -558,6 +565,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -580,6 +588,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -602,6 +611,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -623,6 +633,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -640,6 +651,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -669,6 +681,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { com.google.bigtable.admin.v2.OperationProgress.Builder, com.google.bigtable.admin.v2.OperationProgressOrBuilder> progressBuilder_; + /** * * @@ -683,6 +696,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasProgress() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -703,6 +717,7 @@ public com.google.bigtable.admin.v2.OperationProgress getProgress() { return progressBuilder_.getMessage(); } } + /** * * @@ -725,6 +740,7 @@ public Builder setProgress(com.google.bigtable.admin.v2.OperationProgress value) onChanged(); return this; } + /** * * @@ -745,6 +761,7 @@ public Builder setProgress( onChanged(); return this; } + /** * * @@ -772,6 +789,7 @@ public Builder mergeProgress(com.google.bigtable.admin.v2.OperationProgress valu } return this; } + /** * * @@ -791,6 +809,7 @@ public Builder clearProgress() { onChanged(); return this; } + /** * * @@ -805,6 +824,7 @@ public com.google.bigtable.admin.v2.OperationProgress.Builder getProgressBuilder onChanged(); return getProgressFieldBuilder().getBuilder(); } + /** * * @@ -823,6 +843,7 @@ public com.google.bigtable.admin.v2.OperationProgressOrBuilder getProgressOrBuil : progress_; } } + /** * * 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..6d27ef7b9a 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface OptimizeRestoredTableMetadataOrBuilder @@ -36,6 +36,7 @@ public interface OptimizeRestoredTableMetadataOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -61,6 +62,7 @@ public interface OptimizeRestoredTableMetadataOrBuilder * @return Whether the progress field is set. */ boolean hasProgress(); + /** * * @@ -73,6 +75,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..be28eeac8e 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class PartialUpdateClusterMetadata extends com.google.protobuf.Gene // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.PartialUpdateClusterMetadata) PartialUpdateClusterMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use PartialUpdateClusterMetadata.newBuilder() to construct. private PartialUpdateClusterMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,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 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasRequestTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -94,6 +97,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -110,6 +114,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -125,6 +130,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -140,6 +146,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -156,6 +163,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 +179,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -188,6 +197,7 @@ public com.google.bigtable.admin.v2.PartialUpdateClusterRequest getOriginalReque ? com.google.bigtable.admin.v2.PartialUpdateClusterRequest.getDefaultInstance() : originalRequest_; } + /** * * @@ -398,6 +408,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -641,6 +652,7 @@ public Builder mergeFrom( com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -655,6 +667,7 @@ public Builder mergeFrom( public boolean hasRequestTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -675,6 +688,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -697,6 +711,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -716,6 +731,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -743,6 +759,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -762,6 +779,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -776,6 +794,7 @@ public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { onChanged(); return getRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -794,6 +813,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -826,6 +846,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -840,6 +861,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -860,6 +882,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -882,6 +905,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -901,6 +925,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -928,6 +953,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -947,6 +973,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -961,6 +988,7 @@ public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { onChanged(); return getFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -979,6 +1007,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * @@ -1011,6 +1040,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { com.google.bigtable.admin.v2.PartialUpdateClusterRequest.Builder, com.google.bigtable.admin.v2.PartialUpdateClusterRequestOrBuilder> originalRequestBuilder_; + /** * * @@ -1025,6 +1055,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1045,6 +1076,7 @@ public com.google.bigtable.admin.v2.PartialUpdateClusterRequest getOriginalReque return originalRequestBuilder_.getMessage(); } } + /** * * @@ -1068,6 +1100,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -1088,6 +1121,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -1117,6 +1151,7 @@ public Builder mergeOriginalRequest( } return this; } + /** * * @@ -1136,6 +1171,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -1151,6 +1187,7 @@ public Builder clearOriginalRequest() { onChanged(); return getOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -1170,6 +1207,7 @@ public Builder clearOriginalRequest() { : originalRequest_; } } + /** * * 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..7549524815 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface PartialUpdateClusterMetadataOrBuilder @@ -36,6 +36,7 @@ public interface PartialUpdateClusterMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -48,6 +49,7 @@ public interface PartialUpdateClusterMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -71,6 +73,7 @@ public interface PartialUpdateClusterMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -83,6 +86,7 @@ public interface PartialUpdateClusterMetadataOrBuilder * @return The finishTime. */ com.google.protobuf.Timestamp getFinishTime(); + /** * * @@ -106,6 +110,7 @@ public interface PartialUpdateClusterMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -118,6 +123,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..18a8df1ef1 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class PartialUpdateClusterRequest extends com.google.protobuf.Gener // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.PartialUpdateClusterRequest) PartialUpdateClusterRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use PartialUpdateClusterRequest.newBuilder() to construct. private PartialUpdateClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,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 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasCluster() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -98,6 +101,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 +120,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 +137,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClusterOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -148,6 +154,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -342,6 +349,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -564,6 +572,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder> clusterBuilder_; + /** * * @@ -581,6 +590,7 @@ public Builder mergeFrom( public boolean hasCluster() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -604,6 +614,7 @@ public com.google.bigtable.admin.v2.Cluster getCluster() { return clusterBuilder_.getMessage(); } } + /** * * @@ -629,6 +640,7 @@ public Builder setCluster(com.google.bigtable.admin.v2.Cluster value) { onChanged(); return this; } + /** * * @@ -651,6 +663,7 @@ public Builder setCluster(com.google.bigtable.admin.v2.Cluster.Builder builderFo onChanged(); return this; } + /** * * @@ -681,6 +694,7 @@ public Builder mergeCluster(com.google.bigtable.admin.v2.Cluster value) { } return this; } + /** * * @@ -703,6 +717,7 @@ public Builder clearCluster() { onChanged(); return this; } + /** * * @@ -720,6 +735,7 @@ public com.google.bigtable.admin.v2.Cluster.Builder getClusterBuilder() { onChanged(); return getClusterFieldBuilder().getBuilder(); } + /** * * @@ -741,6 +757,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClusterOrBuilder() { : cluster_; } } + /** * * @@ -776,6 +793,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClusterOrBuilder() { com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -791,6 +809,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClusterOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -812,6 +831,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -835,6 +855,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -855,6 +876,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -883,6 +905,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -903,6 +926,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -918,6 +942,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { onChanged(); return getUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -937,6 +962,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * 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..b624b6b2b6 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface PartialUpdateClusterRequestOrBuilder @@ -38,6 +38,7 @@ public interface PartialUpdateClusterRequestOrBuilder * @return Whether the cluster field is set. */ boolean hasCluster(); + /** * * @@ -52,6 +53,7 @@ public interface PartialUpdateClusterRequestOrBuilder * @return The cluster. */ com.google.bigtable.admin.v2.Cluster getCluster(); + /** * * @@ -78,6 +80,7 @@ public interface PartialUpdateClusterRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -91,6 +94,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..f1dce83e41 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class PartialUpdateInstanceRequest extends com.google.protobuf.Gene // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.PartialUpdateInstanceRequest) PartialUpdateInstanceRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use PartialUpdateInstanceRequest.newBuilder() to construct. private PartialUpdateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,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 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasInstance() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -100,6 +103,7 @@ public com.google.bigtable.admin.v2.Instance getInstance() { ? com.google.bigtable.admin.v2.Instance.getDefaultInstance() : instance_; } + /** * * @@ -120,6 +124,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 +142,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstanceOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -154,6 +160,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -349,6 +356,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -571,6 +579,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.Instance.Builder, com.google.bigtable.admin.v2.InstanceOrBuilder> instanceBuilder_; + /** * * @@ -587,6 +596,7 @@ public Builder mergeFrom( public boolean hasInstance() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -609,6 +619,7 @@ public com.google.bigtable.admin.v2.Instance getInstance() { return instanceBuilder_.getMessage(); } } + /** * * @@ -633,6 +644,7 @@ public Builder setInstance(com.google.bigtable.admin.v2.Instance value) { onChanged(); return this; } + /** * * @@ -654,6 +666,7 @@ public Builder setInstance(com.google.bigtable.admin.v2.Instance.Builder builder onChanged(); return this; } + /** * * @@ -683,6 +696,7 @@ public Builder mergeInstance(com.google.bigtable.admin.v2.Instance value) { } return this; } + /** * * @@ -704,6 +718,7 @@ public Builder clearInstance() { onChanged(); return this; } + /** * * @@ -720,6 +735,7 @@ public com.google.bigtable.admin.v2.Instance.Builder getInstanceBuilder() { onChanged(); return getInstanceFieldBuilder().getBuilder(); } + /** * * @@ -740,6 +756,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstanceOrBuilder() { : instance_; } } + /** * * @@ -774,6 +791,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstanceOrBuilder() { com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -790,6 +808,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstanceOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -812,6 +831,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -836,6 +856,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -857,6 +878,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -886,6 +908,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -907,6 +930,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -923,6 +947,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { onChanged(); return getUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -943,6 +968,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * 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..30f79f2d34 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface PartialUpdateInstanceRequestOrBuilder @@ -38,6 +38,7 @@ public interface PartialUpdateInstanceRequestOrBuilder * @return Whether the instance field is set. */ boolean hasInstance(); + /** * * @@ -52,6 +53,7 @@ public interface PartialUpdateInstanceRequestOrBuilder * @return The instance. */ com.google.bigtable.admin.v2.Instance getInstance(); + /** * * @@ -79,6 +81,7 @@ public interface PartialUpdateInstanceRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -93,6 +96,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..a309d52588 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 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. 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..11a08c806c --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ProtoSchema.java @@ -0,0 +1,599 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/table.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Represents a protobuf schema.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.ProtoSchema} + */ +public final class ProtoSchema extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ProtoSchema) + ProtoSchemaOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ProtoSchema.newBuilder() to construct. + private ProtoSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProtoSchema() { + protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; + } + + @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.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_ProtoSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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() != com.google.protobuf.ByteString.EMPTY) { + 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..1a789f0f91 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ProtoSchemaOrBuilder.java @@ -0,0 +1,53 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/table.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..9b0088d58e 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class RestoreInfo extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.RestoreInfo) RestoreInfoOrBuilder { private static final long serialVersionUID = 0L; + // Use RestoreInfo.newBuilder() to construct. private RestoreInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -79,6 +80,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 +113,7 @@ public SourceInfoCase getSourceInfoCase() { public static final int SOURCE_TYPE_FIELD_NUMBER = 1; private int sourceType_ = 0; + /** * * @@ -126,6 +129,7 @@ public SourceInfoCase getSourceInfoCase() { public int getSourceTypeValue() { return sourceType_; } + /** * * @@ -145,6 +149,7 @@ public com.google.bigtable.admin.v2.RestoreSourceType getSourceType() { } public static final int BACKUP_INFO_FIELD_NUMBER = 2; + /** * * @@ -161,6 +166,7 @@ public com.google.bigtable.admin.v2.RestoreSourceType getSourceType() { public boolean hasBackupInfo() { return sourceInfoCase_ == 2; } + /** * * @@ -180,6 +186,7 @@ public com.google.bigtable.admin.v2.BackupInfo getBackupInfo() { } return com.google.bigtable.admin.v2.BackupInfo.getDefaultInstance(); } + /** * * @@ -384,6 +391,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -610,6 +618,7 @@ public Builder clearSourceInfo() { private int bitField0_; private int sourceType_ = 0; + /** * * @@ -625,6 +634,7 @@ public Builder clearSourceInfo() { public int getSourceTypeValue() { return sourceType_; } + /** * * @@ -643,6 +653,7 @@ public Builder setSourceTypeValue(int value) { onChanged(); return this; } + /** * * @@ -660,6 +671,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 +693,7 @@ public Builder setSourceType(com.google.bigtable.admin.v2.RestoreSourceType valu onChanged(); return this; } + /** * * @@ -704,6 +717,7 @@ public Builder clearSourceType() { com.google.bigtable.admin.v2.BackupInfo.Builder, com.google.bigtable.admin.v2.BackupInfoOrBuilder> backupInfoBuilder_; + /** * * @@ -720,6 +734,7 @@ public Builder clearSourceType() { public boolean hasBackupInfo() { return sourceInfoCase_ == 2; } + /** * * @@ -746,6 +761,7 @@ public com.google.bigtable.admin.v2.BackupInfo getBackupInfo() { return com.google.bigtable.admin.v2.BackupInfo.getDefaultInstance(); } } + /** * * @@ -769,6 +785,7 @@ public Builder setBackupInfo(com.google.bigtable.admin.v2.BackupInfo value) { sourceInfoCase_ = 2; return this; } + /** * * @@ -789,6 +806,7 @@ public Builder setBackupInfo(com.google.bigtable.admin.v2.BackupInfo.Builder bui sourceInfoCase_ = 2; return this; } + /** * * @@ -822,6 +840,7 @@ public Builder mergeBackupInfo(com.google.bigtable.admin.v2.BackupInfo value) { sourceInfoCase_ = 2; return this; } + /** * * @@ -848,6 +867,7 @@ public Builder clearBackupInfo() { } return this; } + /** * * @@ -861,6 +881,7 @@ public Builder clearBackupInfo() { public com.google.bigtable.admin.v2.BackupInfo.Builder getBackupInfoBuilder() { return getBackupInfoFieldBuilder().getBuilder(); } + /** * * @@ -882,6 +903,7 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getBackupInfoOrBuilder() return com.google.bigtable.admin.v2.BackupInfo.getDefaultInstance(); } } + /** * * 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..d53bbc4723 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface RestoreInfoOrBuilder @@ -36,6 +36,7 @@ public interface RestoreInfoOrBuilder * @return The enum numeric value on the wire for sourceType. */ int getSourceTypeValue(); + /** * * @@ -62,6 +63,7 @@ public interface RestoreInfoOrBuilder * @return Whether the backupInfo field is set. */ boolean hasBackupInfo(); + /** * * @@ -75,6 +77,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..231fe2225f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -62,6 +62,7 @@ public enum RestoreSourceType implements com.google.protobuf.ProtocolMessageEnum * RESTORE_SOURCE_TYPE_UNSPECIFIED = 0; */ public static final int RESTORE_SOURCE_TYPE_UNSPECIFIED_VALUE = 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..db8f6f9406 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class RestoreTableMetadata extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.RestoreTableMetadata) RestoreTableMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use RestoreTableMetadata.newBuilder() to construct. private RestoreTableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -83,6 +84,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 +119,7 @@ public SourceInfoCase getSourceInfoCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -140,6 +143,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -166,6 +170,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int SOURCE_TYPE_FIELD_NUMBER = 2; private int sourceType_ = 0; + /** * * @@ -181,6 +186,7 @@ public com.google.protobuf.ByteString getNameBytes() { public int getSourceTypeValue() { return sourceType_; } + /** * * @@ -200,6 +206,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 +216,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 +229,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 +243,7 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getBackupInfoOrBuilder() @SuppressWarnings("serial") private volatile java.lang.Object optimizeTableOperationName_ = ""; + /** * * @@ -265,6 +275,7 @@ public java.lang.String getOptimizeTableOperationName() { return s; } } + /** * * @@ -299,6 +310,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 +328,7 @@ public com.google.protobuf.ByteString getOptimizeTableOperationNameBytes() { public boolean hasProgress() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -335,6 +348,7 @@ public com.google.bigtable.admin.v2.OperationProgress getProgress() { ? com.google.bigtable.admin.v2.OperationProgress.getDefaultInstance() : progress_; } + /** * * @@ -574,6 +588,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -861,6 +876,7 @@ public Builder clearSourceInfo() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -883,6 +899,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -905,6 +922,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -926,6 +944,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -943,6 +962,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -967,6 +987,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private int sourceType_ = 0; + /** * * @@ -982,6 +1003,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public int getSourceTypeValue() { return sourceType_; } + /** * * @@ -1000,6 +1022,7 @@ public Builder setSourceTypeValue(int value) { onChanged(); return this; } + /** * * @@ -1017,6 +1040,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 +1062,7 @@ public Builder setSourceType(com.google.bigtable.admin.v2.RestoreSourceType valu onChanged(); return this; } + /** * * @@ -1061,6 +1086,7 @@ public Builder clearSourceType() { com.google.bigtable.admin.v2.BackupInfo.Builder, com.google.bigtable.admin.v2.BackupInfoOrBuilder> backupInfoBuilder_; + /** * .google.bigtable.admin.v2.BackupInfo backup_info = 3; * @@ -1070,6 +1096,7 @@ public Builder clearSourceType() { public boolean hasBackupInfo() { return sourceInfoCase_ == 3; } + /** * .google.bigtable.admin.v2.BackupInfo backup_info = 3; * @@ -1089,6 +1116,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 +1131,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 +1143,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 +1168,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 +1186,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(); } + /** .google.bigtable.admin.v2.BackupInfo backup_info = 3; */ @java.lang.Override public com.google.bigtable.admin.v2.BackupInfoOrBuilder getBackupInfoOrBuilder() { @@ -1171,6 +1204,7 @@ 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< com.google.bigtable.admin.v2.BackupInfo, @@ -1197,6 +1231,7 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getBackupInfoOrBuilder() } private java.lang.Object optimizeTableOperationName_ = ""; + /** * * @@ -1227,6 +1262,7 @@ public java.lang.String getOptimizeTableOperationName() { return (java.lang.String) ref; } } + /** * * @@ -1257,6 +1293,7 @@ public com.google.protobuf.ByteString getOptimizeTableOperationNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1286,6 +1323,7 @@ public Builder setOptimizeTableOperationName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1311,6 +1349,7 @@ public Builder clearOptimizeTableOperationName() { onChanged(); return this; } + /** * * @@ -1348,6 +1387,7 @@ public Builder setOptimizeTableOperationNameBytes(com.google.protobuf.ByteString com.google.bigtable.admin.v2.OperationProgress.Builder, com.google.bigtable.admin.v2.OperationProgressOrBuilder> progressBuilder_; + /** * * @@ -1364,6 +1404,7 @@ public Builder setOptimizeTableOperationNameBytes(com.google.protobuf.ByteString public boolean hasProgress() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1386,6 +1427,7 @@ public com.google.bigtable.admin.v2.OperationProgress getProgress() { return progressBuilder_.getMessage(); } } + /** * * @@ -1410,6 +1452,7 @@ public Builder setProgress(com.google.bigtable.admin.v2.OperationProgress value) onChanged(); return this; } + /** * * @@ -1432,6 +1475,7 @@ public Builder setProgress( onChanged(); return this; } + /** * * @@ -1461,6 +1505,7 @@ public Builder mergeProgress(com.google.bigtable.admin.v2.OperationProgress valu } return this; } + /** * * @@ -1482,6 +1527,7 @@ public Builder clearProgress() { onChanged(); return this; } + /** * * @@ -1498,6 +1544,7 @@ public com.google.bigtable.admin.v2.OperationProgress.Builder getProgressBuilder onChanged(); return getProgressFieldBuilder().getBuilder(); } + /** * * @@ -1518,6 +1565,7 @@ public com.google.bigtable.admin.v2.OperationProgressOrBuilder getProgressOrBuil : progress_; } } + /** * * 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..087618b675 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface RestoreTableMetadataOrBuilder @@ -36,6 +36,7 @@ public interface RestoreTableMetadataOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -61,6 +62,7 @@ public interface RestoreTableMetadataOrBuilder * @return The enum numeric value on the wire for sourceType. */ int getSourceTypeValue(); + /** * * @@ -80,12 +82,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 +113,7 @@ public interface RestoreTableMetadataOrBuilder * @return The optimizeTableOperationName. */ java.lang.String getOptimizeTableOperationName(); + /** * * @@ -144,6 +149,7 @@ public interface RestoreTableMetadataOrBuilder * @return Whether the progress field is set. */ boolean hasProgress(); + /** * * @@ -158,6 +164,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..c718613310 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class RestoreTableRequest extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.RestoreTableRequest) RestoreTableRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use RestoreTableRequest.newBuilder() to construct. private RestoreTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -81,6 +82,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 +117,7 @@ public SourceCase getSourceCase() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -141,6 +144,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -172,6 +176,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object tableId_ = ""; + /** * * @@ -198,6 +203,7 @@ public java.lang.String getTableId() { return s; } } + /** * * @@ -226,6 +232,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { } public static final int BACKUP_FIELD_NUMBER = 3; + /** * * @@ -241,6 +248,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { public boolean hasBackup() { return sourceCase_ == 3; } + /** * * @@ -269,6 +277,7 @@ public java.lang.String getBackup() { return s; } } + /** * * @@ -488,6 +497,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -730,6 +740,7 @@ public Builder clearSource() { private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -755,6 +766,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -780,6 +792,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -804,6 +817,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -824,6 +838,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -851,6 +866,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object tableId_ = ""; + /** * * @@ -876,6 +892,7 @@ public java.lang.String getTableId() { return (java.lang.String) ref; } } + /** * * @@ -901,6 +918,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -925,6 +943,7 @@ public Builder setTableId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -945,6 +964,7 @@ public Builder clearTableId() { onChanged(); return this; } + /** * * @@ -987,6 +1007,7 @@ public Builder setTableIdBytes(com.google.protobuf.ByteString value) { public boolean hasBackup() { return sourceCase_ == 3; } + /** * * @@ -1016,6 +1037,7 @@ public java.lang.String getBackup() { return (java.lang.String) ref; } } + /** * * @@ -1045,6 +1067,7 @@ public com.google.protobuf.ByteString getBackupBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1067,6 +1090,7 @@ public Builder setBackup(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1087,6 +1111,7 @@ public Builder clearBackup() { } return this; } + /** * * 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..468cf74338 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface RestoreTableRequestOrBuilder @@ -39,6 +39,7 @@ public interface RestoreTableRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -70,6 +71,7 @@ public interface RestoreTableRequestOrBuilder * @return The tableId. */ java.lang.String getTableId(); + /** * * @@ -99,6 +101,7 @@ public interface RestoreTableRequestOrBuilder * @return Whether the backup field is set. */ boolean hasBackup(); + /** * * @@ -112,6 +115,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..0899cd365b --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SchemaBundle.java @@ -0,0 +1,1245 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/table.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * A named collection of related schemas.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.SchemaBundle} + */ +public final class SchemaBundle extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.SchemaBundle) + SchemaBundleOrBuilder { + private static final long serialVersionUID = 0L; + + // Use SchemaBundle.newBuilder() to construct. + private SchemaBundle(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SchemaBundle() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SchemaBundle(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (typeCase_ == 2) { + output.writeMessage(2, (com.google.bigtable.admin.v2.ProtoSchema) type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (typeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.admin.v2.ProtoSchema) type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getProtoSchemaFieldBuilder().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.SingleFieldBuilderV3< + 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 getProtoSchemaFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.ProtoSchema, + com.google.bigtable.admin.v2.ProtoSchema.Builder, + com.google.bigtable.admin.v2.ProtoSchemaOrBuilder> + getProtoSchemaFieldBuilder() { + if (protoSchemaBuilder_ == null) { + if (!(typeCase_ == 2)) { + type_ = com.google.bigtable.admin.v2.ProtoSchema.getDefaultInstance(); + } + protoSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..ad1dbecc83 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SchemaBundleName.java @@ -0,0 +1,261 @@ +/* + * 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.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..599e536862 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SchemaBundleOrBuilder.java @@ -0,0 +1,127 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/table.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..56cad08a4a 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -39,6 +39,7 @@ public final class Snapshot extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Snapshot) SnapshotOrBuilder { private static final long serialVersionUID = 0L; + // Use Snapshot.newBuilder() to construct. private Snapshot(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -126,6 +127,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_NOT_KNOWN = 0; */ public static final int STATE_NOT_KNOWN_VALUE = 0; + /** * * @@ -136,6 +138,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * READY = 1; */ public static final int READY_VALUE = 1; + /** * * @@ -237,6 +240,7 @@ private State(int value) { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -262,6 +266,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -290,6 +295,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 +313,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasSourceTable() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -326,6 +333,7 @@ public com.google.bigtable.admin.v2.Table getSourceTable() { ? com.google.bigtable.admin.v2.Table.getDefaultInstance() : sourceTable_; } + /** * * @@ -346,6 +354,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 +376,7 @@ public long getDataSizeBytes() { public static final int CREATE_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp createTime_; + /** * * @@ -383,6 +393,7 @@ public long getDataSizeBytes() { public boolean hasCreateTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -399,6 +410,7 @@ public boolean hasCreateTime() { public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } + /** * * @@ -416,6 +428,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public static final int DELETE_TIME_FIELD_NUMBER = 5; private com.google.protobuf.Timestamp deleteTime_; + /** * * @@ -433,6 +446,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public boolean hasDeleteTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -450,6 +464,7 @@ public boolean hasDeleteTime() { public com.google.protobuf.Timestamp getDeleteTime() { return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; } + /** * * @@ -468,6 +483,7 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { public static final int STATE_FIELD_NUMBER = 6; private int state_ = 0; + /** * * @@ -485,6 +501,7 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { public int getStateValue() { return state_; } + /** * * @@ -509,6 +526,7 @@ public com.google.bigtable.admin.v2.Snapshot.State getState() { @SuppressWarnings("serial") private volatile java.lang.Object description_ = ""; + /** * * @@ -532,6 +550,7 @@ public java.lang.String getDescription() { return s; } } + /** * * @@ -782,6 +801,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1080,6 +1100,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -1104,6 +1125,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -1128,6 +1150,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1151,6 +1174,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1170,6 +1194,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -1201,6 +1226,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder> sourceTableBuilder_; + /** * * @@ -1217,6 +1243,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasSourceTable() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1239,6 +1266,7 @@ public com.google.bigtable.admin.v2.Table getSourceTable() { return sourceTableBuilder_.getMessage(); } } + /** * * @@ -1263,6 +1291,7 @@ public Builder setSourceTable(com.google.bigtable.admin.v2.Table value) { onChanged(); return this; } + /** * * @@ -1284,6 +1313,7 @@ public Builder setSourceTable(com.google.bigtable.admin.v2.Table.Builder builder onChanged(); return this; } + /** * * @@ -1313,6 +1343,7 @@ public Builder mergeSourceTable(com.google.bigtable.admin.v2.Table value) { } return this; } + /** * * @@ -1334,6 +1365,7 @@ public Builder clearSourceTable() { onChanged(); return this; } + /** * * @@ -1350,6 +1382,7 @@ public com.google.bigtable.admin.v2.Table.Builder getSourceTableBuilder() { onChanged(); return getSourceTableFieldBuilder().getBuilder(); } + /** * * @@ -1370,6 +1403,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getSourceTableOrBuilder() { : sourceTable_; } } + /** * * @@ -1399,6 +1433,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getSourceTableOrBuilder() { } private long dataSizeBytes_; + /** * * @@ -1417,6 +1452,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getSourceTableOrBuilder() { public long getDataSizeBytes() { return dataSizeBytes_; } + /** * * @@ -1439,6 +1475,7 @@ public Builder setDataSizeBytes(long value) { onChanged(); return this; } + /** * * @@ -1466,6 +1503,7 @@ public Builder clearDataSizeBytes() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** * * @@ -1482,6 +1520,7 @@ public Builder clearDataSizeBytes() { public boolean hasCreateTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1504,6 +1543,7 @@ public com.google.protobuf.Timestamp getCreateTime() { return createTimeBuilder_.getMessage(); } } + /** * * @@ -1528,6 +1568,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1549,6 +1590,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1578,6 +1620,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1599,6 +1642,7 @@ public Builder clearCreateTime() { onChanged(); return this; } + /** * * @@ -1615,6 +1659,7 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } + /** * * @@ -1635,6 +1680,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { : createTime_; } } + /** * * @@ -1669,6 +1715,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> deleteTimeBuilder_; + /** * * @@ -1685,6 +1732,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public boolean hasDeleteTime() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1707,6 +1755,7 @@ public com.google.protobuf.Timestamp getDeleteTime() { return deleteTimeBuilder_.getMessage(); } } + /** * * @@ -1731,6 +1780,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1752,6 +1802,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1781,6 +1832,7 @@ public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1802,6 +1854,7 @@ public Builder clearDeleteTime() { onChanged(); return this; } + /** * * @@ -1818,6 +1871,7 @@ public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { onChanged(); return getDeleteTimeFieldBuilder().getBuilder(); } + /** * * @@ -1838,6 +1892,7 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { : deleteTime_; } } + /** * * @@ -1867,6 +1922,7 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { } private int state_ = 0; + /** * * @@ -1884,6 +1940,7 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { public int getStateValue() { return state_; } + /** * * @@ -1904,6 +1961,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -1923,6 +1981,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 +2005,7 @@ public Builder setState(com.google.bigtable.admin.v2.Snapshot.State value) { onChanged(); return this; } + /** * * @@ -1967,6 +2027,7 @@ public Builder clearState() { } private java.lang.Object description_ = ""; + /** * * @@ -1989,6 +2050,7 @@ public java.lang.String getDescription() { return (java.lang.String) ref; } } + /** * * @@ -2011,6 +2073,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2032,6 +2095,7 @@ public Builder setDescription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2049,6 +2113,7 @@ public Builder clearDescription() { onChanged(); return this; } + /** * * 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..bc2756dc03 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 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. 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..07fac78ef0 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface SnapshotOrBuilder @@ -38,6 +38,7 @@ public interface SnapshotOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -67,6 +68,7 @@ public interface SnapshotOrBuilder * @return Whether the sourceTable field is set. */ boolean hasSourceTable(); + /** * * @@ -81,6 +83,7 @@ public interface SnapshotOrBuilder * @return The sourceTable. */ com.google.bigtable.admin.v2.Table getSourceTable(); + /** * * @@ -123,6 +126,7 @@ public interface SnapshotOrBuilder * @return Whether the createTime field is set. */ boolean hasCreateTime(); + /** * * @@ -136,6 +140,7 @@ public interface SnapshotOrBuilder * @return The createTime. */ com.google.protobuf.Timestamp getCreateTime(); + /** * * @@ -162,6 +167,7 @@ public interface SnapshotOrBuilder * @return Whether the deleteTime field is set. */ boolean hasDeleteTime(); + /** * * @@ -176,6 +182,7 @@ public interface SnapshotOrBuilder * @return The deleteTime. */ com.google.protobuf.Timestamp getDeleteTime(); + /** * * @@ -203,6 +210,7 @@ public interface SnapshotOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -230,6 +238,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..a434b68cbe 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -38,6 +38,7 @@ public final class SnapshotTableMetadata extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.SnapshotTableMetadata) SnapshotTableMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use SnapshotTableMetadata.newBuilder() to construct. private SnapshotTableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,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 +86,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -101,6 +104,7 @@ public com.google.bigtable.admin.v2.SnapshotTableRequest getOriginalRequest() { ? com.google.bigtable.admin.v2.SnapshotTableRequest.getDefaultInstance() : originalRequest_; } + /** * * @@ -119,6 +123,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 +139,7 @@ public com.google.bigtable.admin.v2.SnapshotTableRequestOrBuilder getOriginalReq public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -149,6 +155,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -165,6 +172,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -180,6 +188,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -195,6 +204,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -401,6 +411,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -649,6 +660,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.SnapshotTableRequest.Builder, com.google.bigtable.admin.v2.SnapshotTableRequestOrBuilder> originalRequestBuilder_; + /** * * @@ -663,6 +675,7 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -683,6 +696,7 @@ public com.google.bigtable.admin.v2.SnapshotTableRequest getOriginalRequest() { return originalRequestBuilder_.getMessage(); } } + /** * * @@ -705,6 +719,7 @@ public Builder setOriginalRequest(com.google.bigtable.admin.v2.SnapshotTableRequ onChanged(); return this; } + /** * * @@ -725,6 +740,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -753,6 +769,7 @@ public Builder mergeOriginalRequest(com.google.bigtable.admin.v2.SnapshotTableRe } return this; } + /** * * @@ -772,6 +789,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -786,6 +804,7 @@ public com.google.bigtable.admin.v2.SnapshotTableRequest.Builder getOriginalRequ onChanged(); return getOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -805,6 +824,7 @@ public com.google.bigtable.admin.v2.SnapshotTableRequest.Builder getOriginalRequ : originalRequest_; } } + /** * * @@ -837,6 +857,7 @@ public com.google.bigtable.admin.v2.SnapshotTableRequest.Builder getOriginalRequ com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -851,6 +872,7 @@ public com.google.bigtable.admin.v2.SnapshotTableRequest.Builder getOriginalRequ public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -871,6 +893,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -893,6 +916,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -912,6 +936,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -939,6 +964,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -958,6 +984,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -972,6 +999,7 @@ public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { onChanged(); return getRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -990,6 +1018,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -1022,6 +1051,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -1036,6 +1066,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1056,6 +1087,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -1078,6 +1110,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1097,6 +1130,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1124,6 +1158,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1143,6 +1178,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -1157,6 +1193,7 @@ public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { onChanged(); return getFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1175,6 +1212,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * 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..6f46369d06 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface SnapshotTableMetadataOrBuilder @@ -36,6 +36,7 @@ public interface SnapshotTableMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -48,6 +49,7 @@ public interface SnapshotTableMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.SnapshotTableRequest getOriginalRequest(); + /** * * @@ -71,6 +73,7 @@ public interface SnapshotTableMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -83,6 +86,7 @@ public interface SnapshotTableMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -106,6 +110,7 @@ public interface SnapshotTableMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -118,6 +123,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..39b4a697ad 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -39,6 +39,7 @@ public final class SnapshotTableRequest extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.SnapshotTableRequest) SnapshotTableRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use SnapshotTableRequest.newBuilder() to construct. private SnapshotTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -77,6 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -104,6 +106,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -136,6 +139,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object cluster_ = ""; + /** * * @@ -163,6 +167,7 @@ public java.lang.String getCluster() { return s; } } + /** * * @@ -195,6 +200,7 @@ public com.google.protobuf.ByteString getClusterBytes() { @SuppressWarnings("serial") private volatile java.lang.Object snapshotId_ = ""; + /** * * @@ -221,6 +227,7 @@ public java.lang.String getSnapshotId() { return s; } } + /** * * @@ -250,6 +257,7 @@ public com.google.protobuf.ByteString getSnapshotIdBytes() { public static final int TTL_FIELD_NUMBER = 4; private com.google.protobuf.Duration ttl_; + /** * * @@ -268,6 +276,7 @@ public com.google.protobuf.ByteString getSnapshotIdBytes() { public boolean hasTtl() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -286,6 +295,7 @@ public boolean hasTtl() { public com.google.protobuf.Duration getTtl() { return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; } + /** * * @@ -307,6 +317,7 @@ public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object description_ = ""; + /** * * @@ -330,6 +341,7 @@ public java.lang.String getDescription() { return s; } } + /** * * @@ -554,6 +566,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -818,6 +831,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -844,6 +858,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -870,6 +885,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -895,6 +911,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -916,6 +933,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -944,6 +962,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object cluster_ = ""; + /** * * @@ -970,6 +989,7 @@ public java.lang.String getCluster() { return (java.lang.String) ref; } } + /** * * @@ -996,6 +1016,7 @@ public com.google.protobuf.ByteString getClusterBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1021,6 +1042,7 @@ public Builder setCluster(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1042,6 +1064,7 @@ public Builder clearCluster() { onChanged(); return this; } + /** * * @@ -1070,6 +1093,7 @@ public Builder setClusterBytes(com.google.protobuf.ByteString value) { } private java.lang.Object snapshotId_ = ""; + /** * * @@ -1095,6 +1119,7 @@ public java.lang.String getSnapshotId() { return (java.lang.String) ref; } } + /** * * @@ -1120,6 +1145,7 @@ public com.google.protobuf.ByteString getSnapshotIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1144,6 +1170,7 @@ public Builder setSnapshotId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1164,6 +1191,7 @@ public Builder clearSnapshotId() { onChanged(); return this; } + /** * * @@ -1196,6 +1224,7 @@ public Builder setSnapshotIdBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> ttlBuilder_; + /** * * @@ -1213,6 +1242,7 @@ public Builder setSnapshotIdBytes(com.google.protobuf.ByteString value) { public boolean hasTtl() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1234,6 +1264,7 @@ public com.google.protobuf.Duration getTtl() { return ttlBuilder_.getMessage(); } } + /** * * @@ -1259,6 +1290,7 @@ public Builder setTtl(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -1281,6 +1313,7 @@ public Builder setTtl(com.google.protobuf.Duration.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -1311,6 +1344,7 @@ public Builder mergeTtl(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -1333,6 +1367,7 @@ public Builder clearTtl() { onChanged(); return this; } + /** * * @@ -1350,6 +1385,7 @@ public com.google.protobuf.Duration.Builder getTtlBuilder() { onChanged(); return getTtlFieldBuilder().getBuilder(); } + /** * * @@ -1369,6 +1405,7 @@ public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; } } + /** * * @@ -1398,6 +1435,7 @@ public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { } private java.lang.Object description_ = ""; + /** * * @@ -1420,6 +1458,7 @@ public java.lang.String getDescription() { return (java.lang.String) ref; } } + /** * * @@ -1442,6 +1481,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1463,6 +1503,7 @@ public Builder setDescription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1480,6 +1521,7 @@ public Builder clearDescription() { onChanged(); return this; } + /** * * 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..f2f86e359f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface SnapshotTableRequestOrBuilder @@ -40,6 +40,7 @@ public interface SnapshotTableRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -73,6 +74,7 @@ public interface SnapshotTableRequestOrBuilder * @return The cluster. */ java.lang.String getCluster(); + /** * * @@ -105,6 +107,7 @@ public interface SnapshotTableRequestOrBuilder * @return The snapshotId. */ java.lang.String getSnapshotId(); + /** * * @@ -136,6 +139,7 @@ public interface SnapshotTableRequestOrBuilder * @return Whether the ttl field is set. */ boolean hasTtl(); + /** * * @@ -151,6 +155,7 @@ public interface SnapshotTableRequestOrBuilder * @return The ttl. */ com.google.protobuf.Duration getTtl(); + /** * * @@ -177,6 +182,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..92c33aa09b 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class StandardReadRemoteWrites extends com.google.protobuf.Generate // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.StandardReadRemoteWrites) StandardReadRemoteWritesOrBuilder { private static final long serialVersionUID = 0L; + // Use StandardReadRemoteWrites.newBuilder() to construct. private StandardReadRemoteWrites(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -213,6 +214,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * 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..b4c535c119 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface StandardReadRemoteWritesOrBuilder 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..e72efcf2dd 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/common.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -72,6 +72,7 @@ public enum StorageType implements com.google.protobuf.ProtocolMessageEnum { * STORAGE_TYPE_UNSPECIFIED = 0; */ public static final int STORAGE_TYPE_UNSPECIFIED_VALUE = 0; + /** * * @@ -82,6 +83,7 @@ public enum StorageType implements com.google.protobuf.ProtocolMessageEnum { * SSD = 1; */ public static final int SSD_VALUE = 1; + /** * * 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..e23d9ecd73 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class Table extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Table) TableOrBuilder { private static final long serialVersionUID = 0L; + // Use Table.newBuilder() to construct. private Table(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -125,6 +126,7 @@ public enum TimestampGranularity implements com.google.protobuf.ProtocolMessageE * TIMESTAMP_GRANULARITY_UNSPECIFIED = 0; */ public static final int TIMESTAMP_GRANULARITY_UNSPECIFIED_VALUE = 0; + /** * * @@ -304,6 +306,7 @@ public enum View implements com.google.protobuf.ProtocolMessageEnum { * VIEW_UNSPECIFIED = 0; */ public static final int VIEW_UNSPECIFIED_VALUE = 0; + /** * * @@ -314,6 +317,7 @@ public enum View implements com.google.protobuf.ProtocolMessageEnum { * NAME_ONLY = 1; */ public static final int NAME_ONLY_VALUE = 1; + /** * * @@ -324,6 +328,7 @@ public enum View implements com.google.protobuf.ProtocolMessageEnum { * SCHEMA_VIEW = 2; */ public static final int SCHEMA_VIEW_VALUE = 2; + /** * * @@ -335,6 +340,7 @@ public enum View implements com.google.protobuf.ProtocolMessageEnum { * REPLICATION_VIEW = 3; */ public static final int REPLICATION_VIEW_VALUE = 3; + /** * * @@ -345,6 +351,7 @@ public enum View implements com.google.protobuf.ProtocolMessageEnum { * ENCRYPTION_VIEW = 5; */ public static final int ENCRYPTION_VIEW_VALUE = 5; + /** * * @@ -464,6 +471,7 @@ public interface ClusterStateOrBuilder * @return The enum numeric value on the wire for replicationState. */ int getReplicationStateValue(); + /** * * @@ -495,6 +503,7 @@ public interface ClusterStateOrBuilder * */ java.util.List getEncryptionInfoList(); + /** * * @@ -511,6 +520,7 @@ public interface ClusterStateOrBuilder * */ com.google.bigtable.admin.v2.EncryptionInfo getEncryptionInfo(int index); + /** * * @@ -527,6 +537,7 @@ public interface ClusterStateOrBuilder * */ int getEncryptionInfoCount(); + /** * * @@ -544,6 +555,7 @@ public interface ClusterStateOrBuilder */ java.util.List getEncryptionInfoOrBuilderList(); + /** * * @@ -561,6 +573,7 @@ public interface ClusterStateOrBuilder */ com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrBuilder(int index); } + /** * * @@ -575,6 +588,7 @@ public static final class ClusterState extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Table.ClusterState) ClusterStateOrBuilder { private static final long serialVersionUID = 0L; + // Use ClusterState.newBuilder() to construct. private ClusterState(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -697,6 +711,7 @@ public enum ReplicationState implements com.google.protobuf.ProtocolMessageEnum * STATE_NOT_KNOWN = 0; */ public static final int STATE_NOT_KNOWN_VALUE = 0; + /** * * @@ -709,6 +724,7 @@ public enum ReplicationState implements com.google.protobuf.ProtocolMessageEnum * INITIALIZING = 1; */ public static final int INITIALIZING_VALUE = 1; + /** * * @@ -720,6 +736,7 @@ public enum ReplicationState implements com.google.protobuf.ProtocolMessageEnum * PLANNED_MAINTENANCE = 2; */ public static final int PLANNED_MAINTENANCE_VALUE = 2; + /** * * @@ -731,6 +748,7 @@ public enum ReplicationState implements com.google.protobuf.ProtocolMessageEnum * UNPLANNED_MAINTENANCE = 3; */ public static final int UNPLANNED_MAINTENANCE_VALUE = 3; + /** * * @@ -743,6 +761,7 @@ public enum ReplicationState implements com.google.protobuf.ProtocolMessageEnum * READY = 4; */ public static final int READY_VALUE = 4; + /** * * @@ -852,6 +871,7 @@ private ReplicationState(int value) { public static final int REPLICATION_STATE_FIELD_NUMBER = 1; private int replicationState_ = 0; + /** * * @@ -869,6 +889,7 @@ private ReplicationState(int value) { public int getReplicationStateValue() { return replicationState_; } + /** * * @@ -896,6 +917,7 @@ public com.google.bigtable.admin.v2.Table.ClusterState.ReplicationState getRepli @SuppressWarnings("serial") private java.util.List encryptionInfo_; + /** * * @@ -915,6 +937,7 @@ public com.google.bigtable.admin.v2.Table.ClusterState.ReplicationState getRepli public java.util.List getEncryptionInfoList() { return encryptionInfo_; } + /** * * @@ -935,6 +958,7 @@ public java.util.List getEncryption getEncryptionInfoOrBuilderList() { return encryptionInfo_; } + /** * * @@ -954,6 +978,7 @@ public java.util.List getEncryption public int getEncryptionInfoCount() { return encryptionInfo_.size(); } + /** * * @@ -973,6 +998,7 @@ public int getEncryptionInfoCount() { public com.google.bigtable.admin.v2.EncryptionInfo getEncryptionInfo(int index) { return encryptionInfo_.get(index); } + /** * * @@ -1169,6 +1195,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1415,6 +1442,7 @@ public Builder mergeFrom( private int bitField0_; private int replicationState_ = 0; + /** * * @@ -1432,6 +1460,7 @@ public Builder mergeFrom( public int getReplicationStateValue() { return replicationState_; } + /** * * @@ -1452,6 +1481,7 @@ public Builder setReplicationStateValue(int value) { onChanged(); return this; } + /** * * @@ -1475,6 +1505,7 @@ public Builder setReplicationStateValue(int value) { ? com.google.bigtable.admin.v2.Table.ClusterState.ReplicationState.UNRECOGNIZED : result; } + /** * * @@ -1499,6 +1530,7 @@ public Builder setReplicationState( onChanged(); return this; } + /** * * @@ -1558,6 +1590,7 @@ public java.util.List getEncryption return encryptionInfoBuilder_.getMessageList(); } } + /** * * @@ -1580,6 +1613,7 @@ public int getEncryptionInfoCount() { return encryptionInfoBuilder_.getCount(); } } + /** * * @@ -1602,6 +1636,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo getEncryptionInfo(int index) return encryptionInfoBuilder_.getMessage(index); } } + /** * * @@ -1631,6 +1666,7 @@ public Builder setEncryptionInfo( } return this; } + /** * * @@ -1657,6 +1693,7 @@ public Builder setEncryptionInfo( } return this; } + /** * * @@ -1685,6 +1722,7 @@ public Builder addEncryptionInfo(com.google.bigtable.admin.v2.EncryptionInfo val } return this; } + /** * * @@ -1714,6 +1752,7 @@ public Builder addEncryptionInfo( } return this; } + /** * * @@ -1740,6 +1779,7 @@ public Builder addEncryptionInfo( } return this; } + /** * * @@ -1766,6 +1806,7 @@ public Builder addEncryptionInfo( } return this; } + /** * * @@ -1792,6 +1833,7 @@ public Builder addAllEncryptionInfo( } return this; } + /** * * @@ -1817,6 +1859,7 @@ public Builder clearEncryptionInfo() { } return this; } + /** * * @@ -1842,6 +1885,7 @@ public Builder removeEncryptionInfo(int index) { } return this; } + /** * * @@ -1861,6 +1905,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo.Builder getEncryptionInfoBuil int index) { return getEncryptionInfoFieldBuilder().getBuilder(index); } + /** * * @@ -1884,6 +1929,7 @@ public com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrB return encryptionInfoBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1907,6 +1953,7 @@ public com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrB return java.util.Collections.unmodifiableList(encryptionInfo_); } } + /** * * @@ -1926,6 +1973,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo.Builder addEncryptionInfoBuil return getEncryptionInfoFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.EncryptionInfo.getDefaultInstance()); } + /** * * @@ -1946,6 +1994,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo.Builder addEncryptionInfoBuil return getEncryptionInfoFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.EncryptionInfo.getDefaultInstance()); } + /** * * @@ -2070,6 +2119,7 @@ public interface AutomatedBackupPolicyOrBuilder * @return Whether the retentionPeriod field is set. */ boolean hasRetentionPeriod(); + /** * * @@ -2085,6 +2135,7 @@ public interface AutomatedBackupPolicyOrBuilder * @return The retentionPeriod. */ com.google.protobuf.Duration getRetentionPeriod(); + /** * * @@ -2113,6 +2164,7 @@ public interface AutomatedBackupPolicyOrBuilder * @return Whether the frequency field is set. */ boolean hasFrequency(); + /** * * @@ -2127,6 +2179,7 @@ public interface AutomatedBackupPolicyOrBuilder * @return The frequency. */ com.google.protobuf.Duration getFrequency(); + /** * * @@ -2140,6 +2193,7 @@ public interface AutomatedBackupPolicyOrBuilder */ com.google.protobuf.DurationOrBuilder getFrequencyOrBuilder(); } + /** * * @@ -2154,6 +2208,7 @@ public static final class AutomatedBackupPolicy extends com.google.protobuf.Gene // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Table.AutomatedBackupPolicy) AutomatedBackupPolicyOrBuilder { private static final long serialVersionUID = 0L; + // Use AutomatedBackupPolicy.newBuilder() to construct. private AutomatedBackupPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -2185,6 +2240,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_; + /** * * @@ -2203,6 +2259,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasRetentionPeriod() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2223,6 +2280,7 @@ public com.google.protobuf.Duration getRetentionPeriod() { ? com.google.protobuf.Duration.getDefaultInstance() : retentionPeriod_; } + /** * * @@ -2244,6 +2302,7 @@ public com.google.protobuf.DurationOrBuilder getRetentionPeriodOrBuilder() { public static final int FREQUENCY_FIELD_NUMBER = 2; private com.google.protobuf.Duration frequency_; + /** * * @@ -2261,6 +2320,7 @@ public com.google.protobuf.DurationOrBuilder getRetentionPeriodOrBuilder() { public boolean hasFrequency() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -2278,6 +2338,7 @@ public boolean hasFrequency() { public com.google.protobuf.Duration getFrequency() { return frequency_ == null ? com.google.protobuf.Duration.getDefaultInstance() : frequency_; } + /** * * @@ -2474,6 +2535,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -2701,6 +2763,7 @@ public Builder mergeFrom( com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> retentionPeriodBuilder_; + /** * * @@ -2718,6 +2781,7 @@ public Builder mergeFrom( public boolean hasRetentionPeriod() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2741,6 +2805,7 @@ public com.google.protobuf.Duration getRetentionPeriod() { return retentionPeriodBuilder_.getMessage(); } } + /** * * @@ -2766,6 +2831,7 @@ public Builder setRetentionPeriod(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -2788,6 +2854,7 @@ public Builder setRetentionPeriod(com.google.protobuf.Duration.Builder builderFo onChanged(); return this; } + /** * * @@ -2818,6 +2885,7 @@ public Builder mergeRetentionPeriod(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -2840,6 +2908,7 @@ public Builder clearRetentionPeriod() { onChanged(); return this; } + /** * * @@ -2857,6 +2926,7 @@ public com.google.protobuf.Duration.Builder getRetentionPeriodBuilder() { onChanged(); return getRetentionPeriodFieldBuilder().getBuilder(); } + /** * * @@ -2878,6 +2948,7 @@ public com.google.protobuf.DurationOrBuilder getRetentionPeriodOrBuilder() { : retentionPeriod_; } } + /** * * @@ -2913,6 +2984,7 @@ public com.google.protobuf.DurationOrBuilder getRetentionPeriodOrBuilder() { com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> frequencyBuilder_; + /** * * @@ -2929,6 +3001,7 @@ public com.google.protobuf.DurationOrBuilder getRetentionPeriodOrBuilder() { public boolean hasFrequency() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -2951,6 +3024,7 @@ public com.google.protobuf.Duration getFrequency() { return frequencyBuilder_.getMessage(); } } + /** * * @@ -2975,6 +3049,7 @@ public Builder setFrequency(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -2996,6 +3071,7 @@ public Builder setFrequency(com.google.protobuf.Duration.Builder builderForValue onChanged(); return this; } + /** * * @@ -3025,6 +3101,7 @@ public Builder mergeFrequency(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -3046,6 +3123,7 @@ public Builder clearFrequency() { onChanged(); return this; } + /** * * @@ -3062,6 +3140,7 @@ public com.google.protobuf.Duration.Builder getFrequencyBuilder() { onChanged(); return getFrequencyFieldBuilder().getBuilder(); } + /** * * @@ -3082,6 +3161,7 @@ public com.google.protobuf.DurationOrBuilder getFrequencyOrBuilder() { : frequency_; } } + /** * * @@ -3191,6 +3271,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 +3306,7 @@ public AutomatedBackupConfigCase getAutomatedBackupConfigCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -3250,6 +3332,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -3311,6 +3394,7 @@ private static final class ClusterStatesDefaultEntryHolder { public int getClusterStatesCount() { return internalGetClusterStates().getMap().size(); } + /** * * @@ -3333,6 +3417,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 +3425,7 @@ public boolean containsClusterStates(java.lang.String key) { getClusterStates() { return getClusterStatesMap(); } + /** * * @@ -3360,6 +3446,7 @@ public boolean containsClusterStates(java.lang.String key) { getClusterStatesMap() { return internalGetClusterStates().getMap(); } + /** * * @@ -3387,6 +3474,7 @@ public boolean containsClusterStates(java.lang.String key) { internalGetClusterStates().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -3448,6 +3536,7 @@ private static final class ColumnFamiliesDefaultEntryHolder { public int getColumnFamiliesCount() { return internalGetColumnFamilies().getMap().size(); } + /** * * @@ -3465,6 +3554,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 +3562,7 @@ public boolean containsColumnFamilies(java.lang.String key) { getColumnFamilies() { return getColumnFamiliesMap(); } + /** * * @@ -3487,6 +3578,7 @@ public boolean containsColumnFamilies(java.lang.String key) { getColumnFamiliesMap() { return internalGetColumnFamilies().getMap(); } + /** * * @@ -3509,6 +3601,7 @@ public boolean containsColumnFamilies(java.lang.String key) { internalGetColumnFamilies().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -3534,6 +3627,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 +3648,7 @@ public com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrThrow(java.l public int getGranularityValue() { return granularity_; } + /** * * @@ -3581,6 +3676,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 +3695,7 @@ public com.google.bigtable.admin.v2.Table.TimestampGranularity getGranularity() public boolean hasRestoreInfo() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -3619,6 +3716,7 @@ public com.google.bigtable.admin.v2.RestoreInfo getRestoreInfo() { ? com.google.bigtable.admin.v2.RestoreInfo.getDefaultInstance() : restoreInfo_; } + /** * * @@ -3640,6 +3738,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 +3756,7 @@ public com.google.bigtable.admin.v2.RestoreInfoOrBuilder getRestoreInfoOrBuilder public boolean hasChangeStreamConfig() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -3676,6 +3776,7 @@ public com.google.bigtable.admin.v2.ChangeStreamConfig getChangeStreamConfig() { ? com.google.bigtable.admin.v2.ChangeStreamConfig.getDefaultInstance() : changeStreamConfig_; } + /** * * @@ -3696,6 +3797,7 @@ public com.google.bigtable.admin.v2.ChangeStreamConfigOrBuilder getChangeStreamC public static final int DELETION_PROTECTION_FIELD_NUMBER = 9; private boolean deletionProtection_ = false; + /** * * @@ -3720,6 +3822,7 @@ public boolean getDeletionProtection() { } public static final int AUTOMATED_BACKUP_POLICY_FIELD_NUMBER = 13; + /** * * @@ -3737,6 +3840,7 @@ public boolean getDeletionProtection() { public boolean hasAutomatedBackupPolicy() { return automatedBackupConfigCase_ == 13; } + /** * * @@ -3757,6 +3861,7 @@ public com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy getAutomatedBack } return com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.getDefaultInstance(); } + /** * * @@ -3777,6 +3882,224 @@ public com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy getAutomatedBack return com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.getDefaultInstance(); } + 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_ & 0x00000004) != 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 @@ -3816,6 +4139,9 @@ 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(15, getRowKeySchema()); + } getUnknownFields().writeTo(output); } @@ -3871,6 +4197,9 @@ public int getSerializedSize() { 13, (com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy) automatedBackupConfig_); } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getRowKeySchema()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3899,6 +4228,10 @@ public boolean equals(final java.lang.Object obj) { if (!getChangeStreamConfig().equals(other.getChangeStreamConfig())) return false; } if (getDeletionProtection() != other.getDeletionProtection()) 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 +4273,10 @@ public int hashCode() { } hash = (37 * hash) + DELETION_PROTECTION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeletionProtection()); + 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; @@ -4047,6 +4384,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -4116,6 +4454,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getRestoreInfoFieldBuilder(); getChangeStreamConfigFieldBuilder(); + getRowKeySchemaFieldBuilder(); } } @@ -4141,6 +4480,11 @@ public Builder clear() { if (automatedBackupPolicyBuilder_ != null) { automatedBackupPolicyBuilder_.clear(); } + rowKeySchema_ = null; + if (rowKeySchemaBuilder_ != null) { + rowKeySchemaBuilder_.dispose(); + rowKeySchemaBuilder_ = null; + } automatedBackupConfigCase_ = 0; automatedBackupConfig_ = null; return this; @@ -4209,6 +4553,11 @@ private void buildPartial0(com.google.bigtable.admin.v2.Table result) { if (((from_bitField0_ & 0x00000040) != 0)) { result.deletionProtection_ = deletionProtection_; } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.rowKeySchema_ = + rowKeySchemaBuilder_ == null ? rowKeySchema_ : rowKeySchemaBuilder_.build(); + to_bitField0_ |= 0x00000004; + } result.bitField0_ |= to_bitField0_; } @@ -4286,6 +4635,9 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Table other) { if (other.getDeletionProtection() != false) { setDeletionProtection(other.getDeletionProtection()); } + if (other.hasRowKeySchema()) { + mergeRowKeySchema(other.getRowKeySchema()); + } switch (other.getAutomatedBackupConfigCase()) { case AUTOMATED_BACKUP_POLICY: { @@ -4389,6 +4741,12 @@ public Builder mergeFrom( automatedBackupConfigCase_ = 13; break; } // case 106 + case 122: + { + input.readMessage(getRowKeySchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 122 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4423,6 +4781,7 @@ public Builder clearAutomatedBackupConfig() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -4447,6 +4806,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -4471,6 +4831,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4494,6 +4855,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4513,6 +4875,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -4558,7 +4921,8 @@ public com.google.bigtable.admin.v2.Table.ClusterState build( defaultEntry() { return ClusterStatesDefaultEntryHolder.defaultEntry; } - }; + } + ; private static final ClusterStatesConverter clusterStatesConverter = new ClusterStatesConverter(); @@ -4599,6 +4963,7 @@ public com.google.bigtable.admin.v2.Table.ClusterState build( public int getClusterStatesCount() { return internalGetClusterStates().ensureBuilderMap().size(); } + /** * * @@ -4621,6 +4986,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 +4994,7 @@ public boolean containsClusterStates(java.lang.String key) { getClusterStates() { return getClusterStatesMap(); } + /** * * @@ -4648,6 +5015,7 @@ public boolean containsClusterStates(java.lang.String key) { getClusterStatesMap() { return internalGetClusterStates().getImmutableMap(); } + /** * * @@ -4675,6 +5043,7 @@ public boolean containsClusterStates(java.lang.String key) { map = internalGetMutableClusterStates().ensureBuilderMap(); return map.containsKey(key) ? clusterStatesConverter.build(map.get(key)) : defaultValue; } + /** * * @@ -4709,6 +5078,7 @@ public Builder clearClusterStates() { internalGetMutableClusterStates().clear(); return this; } + /** * * @@ -4731,6 +5101,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 +5109,7 @@ public Builder removeClusterStates(java.lang.String key) { bitField0_ |= 0x00000002; return internalGetMutableClusterStates().ensureMessageMap(); } + /** * * @@ -4765,6 +5137,7 @@ public Builder putClusterStates( bitField0_ |= 0x00000002; return this; } + /** * * @@ -4792,6 +5165,7 @@ public Builder putAllClusterStates( bitField0_ |= 0x00000002; return this; } + /** * * @@ -4843,7 +5217,8 @@ public com.google.bigtable.admin.v2.ColumnFamily build( defaultEntry() { return ColumnFamiliesDefaultEntryHolder.defaultEntry; } - }; + } + ; private static final ColumnFamiliesConverter columnFamiliesConverter = new ColumnFamiliesConverter(); @@ -4884,6 +5259,7 @@ public com.google.bigtable.admin.v2.ColumnFamily build( public int getColumnFamiliesCount() { return internalGetColumnFamilies().ensureBuilderMap().size(); } + /** * * @@ -4901,6 +5277,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 +5285,7 @@ public boolean containsColumnFamilies(java.lang.String key) { getColumnFamilies() { return getColumnFamiliesMap(); } + /** * * @@ -4923,6 +5301,7 @@ public boolean containsColumnFamilies(java.lang.String key) { getColumnFamiliesMap() { return internalGetColumnFamilies().getImmutableMap(); } + /** * * @@ -4945,6 +5324,7 @@ public boolean containsColumnFamilies(java.lang.String key) { internalGetMutableColumnFamilies().ensureBuilderMap(); return map.containsKey(key) ? columnFamiliesConverter.build(map.get(key)) : defaultValue; } + /** * * @@ -4974,6 +5354,7 @@ public Builder clearColumnFamilies() { internalGetMutableColumnFamilies().clear(); return this; } + /** * * @@ -4991,6 +5372,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 +5380,7 @@ public Builder removeColumnFamilies(java.lang.String key) { bitField0_ |= 0x00000004; return internalGetMutableColumnFamilies().ensureMessageMap(); } + /** * * @@ -5020,6 +5403,7 @@ public Builder putColumnFamilies( bitField0_ |= 0x00000004; return this; } + /** * * @@ -5042,6 +5426,7 @@ public Builder putAllColumnFamilies( bitField0_ |= 0x00000004; return this; } + /** * * @@ -5069,6 +5454,7 @@ public com.google.bigtable.admin.v2.ColumnFamily.Builder putColumnFamiliesBuilde } private int granularity_ = 0; + /** * * @@ -5089,6 +5475,7 @@ public com.google.bigtable.admin.v2.ColumnFamily.Builder putColumnFamiliesBuilde public int getGranularityValue() { return granularity_; } + /** * * @@ -5112,6 +5499,7 @@ public Builder setGranularityValue(int value) { onChanged(); return this; } + /** * * @@ -5136,6 +5524,7 @@ public com.google.bigtable.admin.v2.Table.TimestampGranularity getGranularity() ? com.google.bigtable.admin.v2.Table.TimestampGranularity.UNRECOGNIZED : result; } + /** * * @@ -5162,6 +5551,7 @@ public Builder setGranularity(com.google.bigtable.admin.v2.Table.TimestampGranul onChanged(); return this; } + /** * * @@ -5191,6 +5581,7 @@ public Builder clearGranularity() { com.google.bigtable.admin.v2.RestoreInfo.Builder, com.google.bigtable.admin.v2.RestoreInfoOrBuilder> restoreInfoBuilder_; + /** * * @@ -5208,6 +5599,7 @@ public Builder clearGranularity() { public boolean hasRestoreInfo() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -5231,6 +5623,7 @@ public com.google.bigtable.admin.v2.RestoreInfo getRestoreInfo() { return restoreInfoBuilder_.getMessage(); } } + /** * * @@ -5256,6 +5649,7 @@ public Builder setRestoreInfo(com.google.bigtable.admin.v2.RestoreInfo value) { onChanged(); return this; } + /** * * @@ -5279,6 +5673,7 @@ public Builder setRestoreInfo( onChanged(); return this; } + /** * * @@ -5309,6 +5704,7 @@ public Builder mergeRestoreInfo(com.google.bigtable.admin.v2.RestoreInfo value) } return this; } + /** * * @@ -5331,6 +5727,7 @@ public Builder clearRestoreInfo() { onChanged(); return this; } + /** * * @@ -5348,6 +5745,7 @@ public com.google.bigtable.admin.v2.RestoreInfo.Builder getRestoreInfoBuilder() onChanged(); return getRestoreInfoFieldBuilder().getBuilder(); } + /** * * @@ -5369,6 +5767,7 @@ public com.google.bigtable.admin.v2.RestoreInfoOrBuilder getRestoreInfoOrBuilder : restoreInfo_; } } + /** * * @@ -5404,6 +5803,7 @@ public com.google.bigtable.admin.v2.RestoreInfoOrBuilder getRestoreInfoOrBuilder com.google.bigtable.admin.v2.ChangeStreamConfig.Builder, com.google.bigtable.admin.v2.ChangeStreamConfigOrBuilder> changeStreamConfigBuilder_; + /** * * @@ -5420,6 +5820,7 @@ public com.google.bigtable.admin.v2.RestoreInfoOrBuilder getRestoreInfoOrBuilder public boolean hasChangeStreamConfig() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -5442,6 +5843,7 @@ public com.google.bigtable.admin.v2.ChangeStreamConfig getChangeStreamConfig() { return changeStreamConfigBuilder_.getMessage(); } } + /** * * @@ -5466,6 +5868,7 @@ public Builder setChangeStreamConfig(com.google.bigtable.admin.v2.ChangeStreamCo onChanged(); return this; } + /** * * @@ -5488,6 +5891,7 @@ public Builder setChangeStreamConfig( onChanged(); return this; } + /** * * @@ -5518,6 +5922,7 @@ public Builder mergeChangeStreamConfig(com.google.bigtable.admin.v2.ChangeStream } return this; } + /** * * @@ -5539,6 +5944,7 @@ public Builder clearChangeStreamConfig() { onChanged(); return this; } + /** * * @@ -5555,6 +5961,7 @@ public com.google.bigtable.admin.v2.ChangeStreamConfig.Builder getChangeStreamCo onChanged(); return getChangeStreamConfigFieldBuilder().getBuilder(); } + /** * * @@ -5576,6 +5983,7 @@ public com.google.bigtable.admin.v2.ChangeStreamConfig.Builder getChangeStreamCo : changeStreamConfig_; } } + /** * * @@ -5605,6 +6013,7 @@ public com.google.bigtable.admin.v2.ChangeStreamConfig.Builder getChangeStreamCo } private boolean deletionProtection_; + /** * * @@ -5627,6 +6036,7 @@ public com.google.bigtable.admin.v2.ChangeStreamConfig.Builder getChangeStreamCo public boolean getDeletionProtection() { return deletionProtection_; } + /** * * @@ -5653,6 +6063,7 @@ public Builder setDeletionProtection(boolean value) { onChanged(); return this; } + /** * * @@ -5683,6 +6094,7 @@ public Builder clearDeletionProtection() { com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.Builder, com.google.bigtable.admin.v2.Table.AutomatedBackupPolicyOrBuilder> automatedBackupPolicyBuilder_; + /** * * @@ -5700,6 +6112,7 @@ public Builder clearDeletionProtection() { public boolean hasAutomatedBackupPolicy() { return automatedBackupConfigCase_ == 13; } + /** * * @@ -5727,6 +6140,7 @@ public com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy getAutomatedBack return com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.getDefaultInstance(); } } + /** * * @@ -5752,6 +6166,7 @@ public Builder setAutomatedBackupPolicy( automatedBackupConfigCase_ = 13; return this; } + /** * * @@ -5774,6 +6189,7 @@ public Builder setAutomatedBackupPolicy( automatedBackupConfigCase_ = 13; return this; } + /** * * @@ -5811,6 +6227,7 @@ public Builder mergeAutomatedBackupPolicy( automatedBackupConfigCase_ = 13; return this; } + /** * * @@ -5838,6 +6255,7 @@ public Builder clearAutomatedBackupPolicy() { } return this; } + /** * * @@ -5853,6 +6271,7 @@ public Builder clearAutomatedBackupPolicy() { getAutomatedBackupPolicyBuilder() { return getAutomatedBackupPolicyFieldBuilder().getBuilder(); } + /** * * @@ -5876,6 +6295,7 @@ public Builder clearAutomatedBackupPolicy() { return com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.getDefaultInstance(); } } + /** * * @@ -5912,6 +6332,696 @@ public Builder clearAutomatedBackupPolicy() { return automatedBackupPolicyBuilder_; } + private com.google.bigtable.admin.v2.Type.Struct rowKeySchema_; + 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> + 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_ & 0x00000100) != 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_ |= 0x00000100; + 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_ |= 0x00000100; + 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_ & 0x00000100) != 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_ |= 0x00000100; + 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_ & ~0x00000100); + 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_ |= 0x00000100; + onChanged(); + return getRowKeySchemaFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type.Struct, + com.google.bigtable.admin.v2.Type.Struct.Builder, + com.google.bigtable.admin.v2.Type.StructOrBuilder> + getRowKeySchemaFieldBuilder() { + if (rowKeySchemaBuilder_ == null) { + rowKeySchemaBuilder_ = + 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>( + getRowKeySchema(), getParentForChildren(), isClean()); + rowKeySchema_ = null; + } + return rowKeySchemaBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); 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..5a6e3693da 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 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. 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..778e0ed9ae 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface TableOrBuilder @@ -38,6 +38,7 @@ public interface TableOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -69,6 +70,7 @@ public interface TableOrBuilder * */ int getClusterStatesCount(); + /** * * @@ -85,10 +87,12 @@ public interface TableOrBuilder * */ boolean containsClusterStates(java.lang.String key); + /** Use {@link #getClusterStatesMap()} instead. */ @java.lang.Deprecated java.util.Map getClusterStates(); + /** * * @@ -106,6 +110,7 @@ public interface TableOrBuilder */ java.util.Map getClusterStatesMap(); + /** * * @@ -126,6 +131,7 @@ com.google.bigtable.admin.v2.Table.ClusterState getClusterStatesOrDefault( java.lang.String key, /* nullable */ com.google.bigtable.admin.v2.Table.ClusterState defaultValue); + /** * * @@ -154,6 +160,7 @@ com.google.bigtable.admin.v2.Table.ClusterState getClusterStatesOrDefault( * map<string, .google.bigtable.admin.v2.ColumnFamily> column_families = 3; */ int getColumnFamiliesCount(); + /** * * @@ -165,9 +172,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 +188,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 +204,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( java.lang.String key, /* nullable */ com.google.bigtable.admin.v2.ColumnFamily defaultValue); + /** * * @@ -223,6 +234,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * @return The enum numeric value on the wire for granularity. */ int getGranularityValue(); + /** * * @@ -256,6 +268,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * @return Whether the restoreInfo field is set. */ boolean hasRestoreInfo(); + /** * * @@ -271,6 +284,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * @return The restoreInfo. */ com.google.bigtable.admin.v2.RestoreInfo getRestoreInfo(); + /** * * @@ -299,6 +313,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * @return Whether the changeStreamConfig field is set. */ boolean hasChangeStreamConfig(); + /** * * @@ -313,6 +328,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * @return The changeStreamConfig. */ com.google.bigtable.admin.v2.ChangeStreamConfig getChangeStreamConfig(); + /** * * @@ -360,6 +376,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * @return Whether the automatedBackupPolicy field is set. */ boolean hasAutomatedBackupPolicy(); + /** * * @@ -374,6 +391,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * @return The automatedBackupPolicy. */ com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy getAutomatedBackupPolicy(); + /** * * @@ -388,5 +406,207 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( com.google.bigtable.admin.v2.Table.AutomatedBackupPolicyOrBuilder getAutomatedBackupPolicyOrBuilder(); + /** + * + * + *
    +   * 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 ca63194f29..2df3825470 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/table.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public final class TableProto { @@ -104,6 +104,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_admin_v2_BackupInfo_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_bigtable_admin_v2_BackupInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_ProtoSchema_descriptor; + static final com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_admin_v2_SchemaBundle_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -113,138 +121,194 @@ 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}\"\273\004\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\"7\n\005State\022\025\n\021STATE_UNSPE" - + "CIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002:u\352Ar\n#" - + "bigtableadmin.googleapis.com/Backup\022Kpro" - + "jects/{project}/instances/{instance}/clu" - + "sters/{cluster}/backups/{backup}\"\300\001\n\nBac" - + "kupInfo\022\023\n\006backup\030\001 \001(\tB\003\340A\003\0223\n\nstart_ti" - + "me\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\0221\n\010end_time\030\003 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\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\021RestoreSo" - + "urceType\022#\n\037RESTORE_SOURCE_TYPE_UNSPECIF" - + "IED\020\000\022\n\n\006BACKUP\020\001B\374\002\n\034com.google.bigtabl" - + "e.admin.v2B\nTableProtoP\001Z=google.golang." - + "org/genproto/googleapis/bigtable/admin/v" - + "2;admin\252\002\036Google.Cloud.Bigtable.Admin.V2" - + "\312\002\036Google\\Cloud\\Bigtable\\Admin\\V2\352\002\"Goog" - + "le::Cloud::Bigtable::Admin::V2\352A\246\001\n(clou" - + "dkms.googleapis.com/CryptoKeyVersion\022zpr" - + "ojects/{project}/locations/{location}/ke" - + "yRings/{key_ring}/cryptoKeys/{crypto_key" - + "}/cryptoKeyVersions/{crypto_key_version}" - + "b\006proto3" + + "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\"\225\014\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\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=.g" + + "oogle.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\204\001\n" + + "\025AutomatedBackupPolicy\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" + + "\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.googleapis.com/Tab" + + "le\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(\01323.google.bigtab" + + "le.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.bigtable.admin.v2.Auth" + + "orizedView.SubsetView.FamilySubsetsEntry\032l\n" + + "\022FamilySubsetsEntry\022\013\n" + + "\003key\030\001 \001(\t\022E\n" + + "\005value\030\002" + + " \001(\01326.google.bigtable.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/{ins" + + "tance}/tables/{table}/authorizedViews/{a" + + "uthorized_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.bigtable.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(.goog" + + "le.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}/instances/{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(.googl" + + "e.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/{project}/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" + + "\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}/inst" + + "ances/{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/big" + + "table/admin/apiv2/adminpb;adminpb\252\002\036Goog" + + "le.Cloud.Bigtable.Admin.V2\312\002\036Google\\Clou" + + "d\\Bigtable\\Admin\\V2\352\002\"Google::Cloud::Bigtable::Admin::V2\352A\246\001\n" + + "(cloudkms.googleapis.com/CryptoKeyVersion\022zprojects/{projec" + + "t}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVer" + + "sions/{crypto_key_version}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -287,6 +351,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ChangeStreamConfig", "DeletionProtection", "AutomatedBackupPolicy", + "RowKeySchema", "AutomatedBackupConfig", }); internal_static_google_bigtable_admin_v2_Table_ClusterState_descriptor = @@ -424,6 +489,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SizeBytes", "State", "EncryptionInfo", + "BackupType", + "HotToStandardTime", }); internal_static_google_bigtable_admin_v2_BackupInfo_descriptor = getDescriptor().getMessageTypes().get(9); @@ -433,6 +500,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Backup", "StartTime", "EndTime", "SourceTable", "SourceBackup", }); + internal_static_google_bigtable_admin_v2_ProtoSchema_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_bigtable_admin_v2_ProtoSchema_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_ProtoSchema_descriptor, + new java.lang.String[] { + "ProtoDescriptors", + }); + internal_static_google_bigtable_admin_v2_SchemaBundle_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_bigtable_admin_v2_SchemaBundle_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_SchemaBundle_descriptor, + new java.lang.String[] { + "Name", "ProtoSchema", "Etag", "Type", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); 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 ab4866e061..5188fc860f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/types.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -28,30 +28,23 @@ * 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. - * This might involve composing a series of steps into an "encoding chain," for - * example to convert from INT64 -> STRING -> raw bytes. In most cases, a "link" - * in the encoding chain will be based an on existing GoogleSQL conversion - * function like `CAST`. + * an `Encoding` which describes how to convert to or from the underlying data. * - * Each link in the encoding chain also defines the following properties: - * * Natural sort: 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 to a fixed-width STRING does *not* - * preserve sort order when dealing with negative numbers. - * INT64(1) > INT64(-1), but STRING("-00001") > STRING("00001). - * - The overall encoding chain has this property if *every* link does. - * * 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. - * - The overall encoding chain has this property if *any* link does. - * * Compatibility: Which other systems have matching encoding schemes? For - * example, does this encoding have a GoogleSQL equivalent? HBase? Java? + * 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.admin.v2.Type} @@ -61,6 +54,7 @@ public final class Type extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type) TypeOrBuilder { private static final long serialVersionUID = 0L; + // Use Type.newBuilder() to construct. private Type(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -98,7 +92,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; @@ -106,11 +100,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; @@ -118,17 +113,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(); } + /** * * @@ -144,6 +141,7 @@ public static final class Bytes extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Bytes) BytesOrBuilder { private static final long serialVersionUID = 0L; + // Use Bytes.newBuilder() to construct. private Bytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -189,6 +187,7 @@ public interface EncodingOrBuilder * @return Whether the raw field is set. */ boolean hasRaw(); + /** * * @@ -201,6 +200,7 @@ public interface EncodingOrBuilder * @return The raw. */ com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw getRaw(); + /** * * @@ -214,11 +214,12 @@ 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} @@ -228,6 +229,7 @@ public static final class Encoding extends com.google.protobuf.GeneratedMessageV // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Bytes.Encoding) EncodingOrBuilder { private static final long serialVersionUID = 0L; + // Use Encoding.newBuilder() to construct. private Encoding(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -260,14 +262,16 @@ 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"
    -       * * Natural sort? 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} @@ -277,6 +281,7 @@ public static final class Raw extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Bytes.Encoding.Raw) RawOrBuilder { private static final long serialVersionUID = 0L; + // Use Raw.newBuilder() to construct. private Raw(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -459,14 +464,16 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * *
    -         * Leaves the value "as-is"
    -         * * Natural sort? 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} @@ -703,6 +710,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. @@ -734,6 +742,7 @@ public EncodingCase getEncodingCase() { } public static final int RAW_FIELD_NUMBER = 1; + /** * * @@ -749,6 +758,7 @@ public EncodingCase getEncodingCase() { public boolean hasRaw() { return encodingCase_ == 1; } + /** * * @@ -767,6 +777,7 @@ public com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw getRaw() { } return com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); } + /** * * @@ -959,11 +970,12 @@ protected Builder newBuilderForType( 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} @@ -1180,6 +1192,7 @@ public Builder clearEncoding() { com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.Builder, com.google.bigtable.admin.v2.Type.Bytes.Encoding.RawOrBuilder> rawBuilder_; + /** * * @@ -1195,6 +1208,7 @@ public Builder clearEncoding() { public boolean hasRaw() { return encodingCase_ == 1; } + /** * * @@ -1220,6 +1234,7 @@ public com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw getRaw() { return com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); } } + /** * * @@ -1242,6 +1257,7 @@ public Builder setRaw(com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw value encodingCase_ = 1; return this; } + /** * * @@ -1262,6 +1278,7 @@ public Builder setRaw( encodingCase_ = 1; return this; } + /** * * @@ -1295,6 +1312,7 @@ public Builder mergeRaw(com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw val encodingCase_ = 1; return this; } + /** * * @@ -1320,6 +1338,7 @@ public Builder clearRaw() { } return this; } + /** * * @@ -1332,6 +1351,7 @@ public Builder clearRaw() { public com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.Builder getRawBuilder() { return getRawFieldBuilder().getBuilder(); } + /** * * @@ -1352,6 +1372,7 @@ public com.google.bigtable.admin.v2.Type.Bytes.Encoding.RawOrBuilder getRawOrBui return com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); } } + /** * * @@ -1452,11 +1473,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; @@ -1467,11 +1489,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; @@ -1484,11 +1507,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; @@ -1664,6 +1688,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1870,11 +1895,12 @@ public Builder mergeFrom( 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; @@ -1884,11 +1910,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; @@ -1904,11 +1931,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; @@ -1926,11 +1954,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; @@ -1946,11 +1975,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; @@ -1974,11 +2004,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; @@ -1993,11 +2024,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; @@ -2007,11 +2039,12 @@ public com.google.bigtable.admin.v2.Type.Bytes.Encoding.Builder getEncodingBuild onChanged(); return getEncodingFieldBuilder().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; @@ -2025,11 +2058,12 @@ 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; @@ -2124,7 +2158,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; @@ -2132,11 +2166,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; @@ -2144,17 +2179,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(); } + /** * * @@ -2170,6 +2207,7 @@ public static final class String extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.String) StringOrBuilder { private static final long serialVersionUID = 0L; + // Use String.newBuilder() to construct. private String(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -2207,44 +2245,97 @@ public interface EncodingOrBuilder * * *
    -       * Use `Utf8Raw` encoding.
    +       * Deprecated: if set, converts to an empty `utf8_bytes`.
            * 
    * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * * + * @deprecated google.bigtable.admin.v2.Type.String.Encoding.utf8_raw is deprecated. See + * google/bigtable/admin/v2/types.proto;l=102 * @return Whether the utf8Raw field is set. */ + @java.lang.Deprecated boolean hasUtf8Raw(); + /** * * *
    -       * Use `Utf8Raw` encoding.
    +       * Deprecated: if set, converts to an empty `utf8_bytes`.
            * 
    * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * * + * @deprecated google.bigtable.admin.v2.Type.String.Encoding.utf8_raw is deprecated. See + * google/bigtable/admin/v2/types.proto;l=102 * @return The utf8Raw. */ + @java.lang.Deprecated com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw getUtf8Raw(); + /** * * *
    -       * Use `Utf8Raw` encoding.
    +       * Deprecated: if set, converts to an empty `utf8_bytes`.
            * 
    * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * */ + @java.lang.Deprecated com.google.bigtable.admin.v2.Type.String.Encoding.Utf8RawOrBuilder getUtf8RawOrBuilder(); + /** + * + * + *
    +       * Use `Utf8Bytes` encoding.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * + * @return Whether the utf8Bytes field is set. + */ + boolean hasUtf8Bytes(); + + /** + * + * + *
    +       * Use `Utf8Bytes` encoding.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * + * @return The utf8Bytes. + */ + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes getUtf8Bytes(); + + /** + * + * + *
    +       * Use `Utf8Bytes` encoding.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8BytesOrBuilder getUtf8BytesOrBuilder(); + 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} @@ -2254,6 +2345,7 @@ public static final class Encoding extends com.google.protobuf.GeneratedMessageV // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.String.Encoding) EncodingOrBuilder { private static final long serialVersionUID = 0L; + // Use Encoding.newBuilder() to construct. private Encoding(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -2282,30 +2374,28 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.bigtable.admin.v2.Type.String.Encoding.Builder.class); } + @java.lang.Deprecated public interface Utf8RawOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) com.google.protobuf.MessageOrBuilder {} + /** * * *
    -       * UTF-8 encoding
    -       * * Natural sort? No (ASCII characters only)
    -       * * Self-delimiting? No
    -       * * Compatibility?
    -       *    - BigQuery Federation `TEXT` encoding
    -       *    - HBase `Bytes.toBytes`
    -       *    - Java `String#getBytes(StandardCharsets.UTF_8)`
    +       * Deprecated: prefer the equivalent `Utf8Bytes`.
            * 
    * * Protobuf type {@code google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw} */ + @java.lang.Deprecated public static final class Utf8Raw extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) Utf8RawOrBuilder { private static final long serialVersionUID = 0L; + // Use Utf8Raw.newBuilder() to construct. private Utf8Raw(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -2488,17 +2578,12 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * *
    -         * UTF-8 encoding
    -         * * Natural sort? No (ASCII characters only)
    -         * * Self-delimiting? No
    -         * * Compatibility?
    -         *    - BigQuery Federation `TEXT` encoding
    -         *    - HBase `Bytes.toBytes`
    -         *    - Java `String#getBytes(StandardCharsets.UTF_8)`
    +         * Deprecated: prefer the equivalent `Utf8Bytes`.
              * 
    * * Protobuf type {@code google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw} @@ -2725,6701 +2810,26595 @@ public com.google.protobuf.Parser getParserForType() { } } - 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 { - UTF8_RAW(1), - 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 UTF8_RAW; - case 0: - return ENCODING_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public EncodingCase getEncodingCase() { - return EncodingCase.forNumber(encodingCase_); - } + public interface Utf8BytesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) + com.google.protobuf.MessageOrBuilder {} - public static final int UTF8_RAW_FIELD_NUMBER = 1; - /** - * - * - *
    -       * Use `Utf8Raw` encoding.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; - * - * @return Whether the utf8Raw field is set. - */ - @java.lang.Override - public boolean hasUtf8Raw() { - return encodingCase_ == 1; - } /** * * *
    -       * Use `Utf8Raw` encoding.
    -       * 
    + * UTF-8 encoding. * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; + * Sorted mode: + * - All values are supported. + * - Code point order is preserved. * - * @return The utf8Raw. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw getUtf8Raw() { - if (encodingCase_ == 1) { - return (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_; - } - return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); - } - /** + * Distinct mode: all values are supported. * + * Compatible with: * - *
    -       * Use `Utf8Raw` encoding.
    +       *  - BigQuery `TEXT` encoding
    +       *  - HBase `Bytes.toBytes`
    +       *  - Java `String#getBytes(StandardCharsets.UTF_8)`
            * 
    * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; + * Protobuf type {@code google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes} */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8RawOrBuilder - getUtf8RawOrBuilder() { - if (encodingCase_ == 1) { - return (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_; + public static final class Utf8Bytes extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) + Utf8BytesOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Utf8Bytes.newBuilder() to construct. + private Utf8Bytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); - } - private byte memoizedIsInitialized = -1; + private Utf8Bytes() {} - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Utf8Bytes(); + } - memoizedIsInitialized = 1; - return true; - } + 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 - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (encodingCase_ == 1) { - output.writeMessage( - 1, (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) 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_String_Encoding_Utf8Bytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.class, + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.Builder.class); } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private byte memoizedIsInitialized = -1; - size = 0; - if (encodingCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { + memoizedIsInitialized = 1; return true; } - if (!(obj instanceof com.google.bigtable.admin.v2.Type.String.Encoding)) { - return super.equals(obj); - } - com.google.bigtable.admin.v2.Type.String.Encoding other = - (com.google.bigtable.admin.v2.Type.String.Encoding) obj; - if (!getEncodingCase().equals(other.getEncodingCase())) return false; - switch (encodingCase_) { - case 1: - if (!getUtf8Raw().equals(other.getUtf8Raw())) return false; - break; - case 0: - default: + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); } - 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) + UTF8_RAW_FIELD_NUMBER; - hash = (53 * hash) + getUtf8Raw().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.bigtable.admin.v2.Type.String.Encoding parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.bigtable.admin.v2.Type.String.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.String.Encoding parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.bigtable.admin.v2.Type.String.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.String.Encoding parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.bigtable.admin.v2.Type.String.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.String.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.String.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 int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - 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); - } + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - 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( - PARSER, input, extensionRegistry); - } + @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.String.Encoding.Utf8Bytes)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes other = + (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) obj; - 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); - } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - 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( - PARSER, input, extensionRegistry); - } + @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; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + public static com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public static com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static Builder newBuilder( - com.google.bigtable.admin.v2.Type.String.Encoding prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public static com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + public static com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @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.String.Encoding} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.String.Encoding) - com.google.bigtable.admin.v2.Type.String.EncodingOrBuilder { - 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; + public static com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_String_Encoding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.String.Encoding.class, - com.google.bigtable.admin.v2.Type.String.Encoding.Builder.class); + public static com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - // Construct using com.google.bigtable.admin.v2.Type.String.Encoding.newBuilder() - private Builder() {} + 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); + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + 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( + PARSER, input, extensionRegistry); } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (utf8RawBuilder_ != null) { - utf8RawBuilder_.clear(); - } - encodingCase_ = 0; - encoding_ = null; - return this; + 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); } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_String_Encoding_descriptor; + public static com.google.bigtable.admin.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( + PARSER, input, extensionRegistry); } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.String.Encoding getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance(); + 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); } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.String.Encoding build() { - com.google.bigtable.admin.v2.Type.String.Encoding result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + 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( + PARSER, input, extensionRegistry); } @java.lang.Override - public com.google.bigtable.admin.v2.Type.String.Encoding buildPartial() { - com.google.bigtable.admin.v2.Type.String.Encoding result = - new com.google.bigtable.admin.v2.Type.String.Encoding(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; + public Builder newBuilderForType() { + return newBuilder(); } - private void buildPartial0(com.google.bigtable.admin.v2.Type.String.Encoding result) { - int from_bitField0_ = bitField0_; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - private void buildPartialOneofs(com.google.bigtable.admin.v2.Type.String.Encoding result) { - result.encodingCase_ = encodingCase_; - result.encoding_ = this.encoding_; - if (encodingCase_ == 1 && utf8RawBuilder_ != null) { - result.encoding_ = utf8RawBuilder_.build(); - } + public static Builder newBuilder( + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override - public Builder clone() { - return super.clone(); + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + /** + * + * + *
    +         * 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 + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8BytesOrBuilder { + 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 - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Bytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.class, + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.Builder.class); + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + // Construct using + // com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.newBuilder() + private Builder() {} - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } - @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); + @java.lang.Override + public Builder clear() { + super.clear(); return this; } - } - public Builder mergeFrom(com.google.bigtable.admin.v2.Type.String.Encoding other) { - if (other == com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance()) - return this; - switch (other.getEncodingCase()) { - case UTF8_RAW: - { - mergeUtf8Raw(other.getUtf8Raw()); - break; - } - case ENCODING_NOT_SET: - { - break; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Bytes_descriptor; } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + @java.lang.Override + public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); + } - @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(); + @java.lang.Override + public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes build() { + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getUtf8RawFieldBuilder().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_; + @java.lang.Override + public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes buildPartial() { + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes result = + new com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes(this); + onBuilt(); + return result; + } - public EncodingCase getEncodingCase() { - return EncodingCase.forNumber(encodingCase_); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public Builder clearEncoding() { - encodingCase_ = 0; - encoding_ = null; - onChanged(); - return this; - } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - private int bitField0_; + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - private com.google.protobuf.SingleFieldBuilderV3< - 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_; - /** - * - * - *
    -         * Use `Utf8Raw` encoding.
    -         * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; - * - * @return Whether the utf8Raw field is set. - */ - @java.lang.Override - public boolean hasUtf8Raw() { - return encodingCase_ == 1; - } - /** - * - * - *
    -         * Use `Utf8Raw` encoding.
    -         * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; - * - * @return The utf8Raw. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw getUtf8Raw() { - if (utf8RawBuilder_ == null) { - if (encodingCase_ == 1) { - return (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_; - } - return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); - } else { - if (encodingCase_ == 1) { - return utf8RawBuilder_.getMessage(); - } - return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - } - /** - * - * - *
    -         * Use `Utf8Raw` encoding.
    -         * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; - */ - public Builder setUtf8Raw(com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw value) { - if (utf8RawBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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) { + return mergeFrom((com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) other); + } else { + super.mergeFrom(other); + return this; } - encoding_ = value; + } + + public Builder mergeFrom( + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes other) { + if (other + == com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); - } else { - utf8RawBuilder_.setMessage(value); + return this; } - encodingCase_ = 1; - return this; - } - /** - * - * - *
    -         * Use `Utf8Raw` encoding.
    -         * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; - */ - public Builder setUtf8Raw( - com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.Builder builderForValue) { - if (utf8RawBuilder_ == null) { - encoding_ = builderForValue.build(); - onChanged(); - } else { - utf8RawBuilder_.setMessage(builderForValue.build()); + + @java.lang.Override + public final boolean isInitialized() { + return true; } - encodingCase_ = 1; - return this; - } - /** - * - * - *
    -         * Use `Utf8Raw` encoding.
    -         * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; - */ - public Builder mergeUtf8Raw( - com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw value) { - if (utf8RawBuilder_ == null) { - if (encodingCase_ == 1 - && encoding_ - != com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw - .getDefaultInstance()) { - encoding_ = - com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.newBuilder( - (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_) - .mergeFrom(value) - .buildPartial(); - } else { - encoding_ = value; - } - onChanged(); - } else { - if (encodingCase_ == 1) { - utf8RawBuilder_.mergeFrom(value); - } else { - utf8RawBuilder_.setMessage(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(); } - } - encodingCase_ = 1; - return this; - } - /** - * - * - *
    -         * Use `Utf8Raw` encoding.
    -         * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; - */ - public Builder clearUtf8Raw() { - if (utf8RawBuilder_ == null) { - if (encodingCase_ == 1) { - encodingCase_ = 0; - encoding_ = null; + 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(); - } - } else { - if (encodingCase_ == 1) { - encodingCase_ = 0; - encoding_ = null; - } - utf8RawBuilder_.clear(); + } // finally + return this; } - return this; - } - /** - * - * - *
    -         * Use `Utf8Raw` encoding.
    -         * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; - */ - public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.Builder - getUtf8RawBuilder() { - return getUtf8RawFieldBuilder().getBuilder(); - } - /** - * - * - *
    -         * Use `Utf8Raw` encoding.
    -         * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8RawOrBuilder - getUtf8RawOrBuilder() { - if ((encodingCase_ == 1) && (utf8RawBuilder_ != null)) { - return utf8RawBuilder_.getMessageOrBuilder(); - } else { - if (encodingCase_ == 1) { - return (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_; - } - return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } - } - /** - * - * - *
    -         * Use `Utf8Raw` encoding.
    -         * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - 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() { - if (utf8RawBuilder_ == null) { - if (!(encodingCase_ == 1)) { - encoding_ = - com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); - } - utf8RawBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - 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>( - (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_, - getParentForChildren(), - isClean()); - encoding_ = null; + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } - encodingCase_ = 1; - onChanged(); - return utf8RawBuilder_; + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) + private static final com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes(); } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public static com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + getDefaultInstance() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.String.Encoding) - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Utf8Bytes 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(class_scope:google.bigtable.admin.v2.Type.String.Encoding) - private static final com.google.bigtable.admin.v2.Type.String.Encoding DEFAULT_INSTANCE; + public static com.google.protobuf.Parser parser() { + return PARSER; + } - static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.String.Encoding(); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public static com.google.bigtable.admin.v2.Type.String.Encoding getDefaultInstance() { - return DEFAULT_INSTANCE; + @java.lang.Override + public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + getDefaultInstanceForType() { + 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(); - } - }; + private int encodingCase_ = 0; - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @SuppressWarnings("serial") + private java.lang.Object encoding_; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public enum EncodingCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + @java.lang.Deprecated + UTF8_RAW(1), + UTF8_BYTES(2), + ENCODING_NOT_SET(0); + private final int value; - @java.lang.Override - public com.google.bigtable.admin.v2.Type.String.Encoding getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - 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.
    -     * 
    - * - * .google.bigtable.admin.v2.Type.String.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.String.Encoding encoding = 1; - * - * @return The encoding. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.String.Encoding getEncoding() { - return encoding_ == null - ? com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance() - : encoding_; - } - /** - * - * - *
    -     * The encoding to use when converting to/from lower level types.
    -     * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.String.EncodingOrBuilder getEncodingOrBuilder() { - return encoding_ == null - ? com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance() - : encoding_; - } + private EncodingCase(int value) { + this.value = value; + } - private byte memoizedIsInitialized = -1; + /** + * @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 final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static EncodingCase forNumber(int value) { + switch (value) { + case 1: + return UTF8_RAW; + case 2: + return UTF8_BYTES; + case 0: + return ENCODING_NOT_SET; + default: + return null; + } + } - memoizedIsInitialized = 1; - return true; - } + public int getNumber() { + return this.value; + } + }; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getEncoding()); + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static final int UTF8_RAW_FIELD_NUMBER = 1; - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEncoding()); + /** + * + * + *
    +       * Deprecated: if set, converts to an empty `utf8_bytes`.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + * + * @deprecated google.bigtable.admin.v2.Type.String.Encoding.utf8_raw is deprecated. See + * google/bigtable/admin/v2/types.proto;l=102 + * @return Whether the utf8Raw field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasUtf8Raw() { + return encodingCase_ == 1; } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + /** + * + * + *
    +       * Deprecated: if set, converts to an empty `utf8_bytes`.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + * + * @deprecated google.bigtable.admin.v2.Type.String.Encoding.utf8_raw is deprecated. See + * google/bigtable/admin/v2/types.proto;l=102 + * @return The utf8Raw. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw getUtf8Raw() { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_; + } + return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); } - if (!(obj instanceof com.google.bigtable.admin.v2.Type.String)) { - return super.equals(obj); + + /** + * + * + *
    +       * Deprecated: if set, converts to an empty `utf8_bytes`.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8RawOrBuilder + getUtf8RawOrBuilder() { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_; + } + return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); } - com.google.bigtable.admin.v2.Type.String other = - (com.google.bigtable.admin.v2.Type.String) obj; - if (hasEncoding() != other.hasEncoding()) return false; - if (hasEncoding()) { - if (!getEncoding().equals(other.getEncoding())) return false; + public static final int UTF8_BYTES_FIELD_NUMBER = 2; + + /** + * + * + *
    +       * Use `Utf8Bytes` encoding.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * + * @return Whether the utf8Bytes field is set. + */ + @java.lang.Override + public boolean hasUtf8Bytes() { + return encodingCase_ == 2; } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + /** + * + * + *
    +       * Use `Utf8Bytes` encoding.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * + * @return The utf8Bytes. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes getUtf8Bytes() { + if (encodingCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEncoding()) { - hash = (37 * hash) + ENCODING_FIELD_NUMBER; - hash = (53 * hash) + getEncoding().hashCode(); + + /** + * + * + *
    +       * Use `Utf8Bytes` encoding.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8BytesOrBuilder + getUtf8BytesOrBuilder() { + if (encodingCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.bigtable.admin.v2.Type.String parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private byte memoizedIsInitialized = -1; - public static com.google.bigtable.admin.v2.Type.String parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @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.String parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + memoizedIsInitialized = 1; + return true; + } - public static com.google.bigtable.admin.v2.Type.String 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 void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (encodingCase_ == 1) { + output.writeMessage( + 1, (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_); + } + if (encodingCase_ == 2) { + output.writeMessage( + 2, (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) encoding_); + } + getUnknownFields().writeTo(output); + } - public static com.google.bigtable.admin.v2.Type.String parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - public static com.google.bigtable.admin.v2.Type.String parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + size = 0; + if (encodingCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_); + } + if (encodingCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) encoding_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - 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); - } + @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.String.Encoding)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.String.Encoding other = + (com.google.bigtable.admin.v2.Type.String.Encoding) obj; - 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( - PARSER, input, extensionRegistry); - } + if (!getEncodingCase().equals(other.getEncodingCase())) return false; + switch (encodingCase_) { + case 1: + if (!getUtf8Raw().equals(other.getUtf8Raw())) return false; + break; + case 2: + if (!getUtf8Bytes().equals(other.getUtf8Bytes())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - 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); - } + @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) + UTF8_RAW_FIELD_NUMBER; + hash = (53 * hash) + getUtf8Raw().hashCode(); + break; + case 2: + hash = (37 * hash) + UTF8_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getUtf8Bytes().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - 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( - PARSER, input, extensionRegistry); - } + public static com.google.bigtable.admin.v2.Type.String.Encoding parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - 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); - } + public static com.google.bigtable.admin.v2.Type.String.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.String parseFrom( - com.google.protobuf.CodedInputStream 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.String.Encoding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + public static com.google.bigtable.admin.v2.Type.String.Encoding parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public static com.google.bigtable.admin.v2.Type.String.Encoding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static Builder newBuilder(com.google.bigtable.admin.v2.Type.String prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public static com.google.bigtable.admin.v2.Type.String.Encoding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + 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); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
    -     * String
    -     * Values of type `String` are stored in `Value.string_value`.
    -     * 
    - * - * Protobuf type {@code google.bigtable.admin.v2.Type.String} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.String) - com.google.bigtable.admin.v2.Type.StringOrBuilder { - 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; + 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( + PARSER, input, extensionRegistry); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_String_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.String.class, - com.google.bigtable.admin.v2.Type.String.Builder.class); + 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); } - // Construct using com.google.bigtable.admin.v2.Type.String.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + 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( + PARSER, input, extensionRegistry); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + 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); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEncodingFieldBuilder(); - } + 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( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - encoding_ = null; - if (encodingBuilder_ != null) { - encodingBuilder_.dispose(); - encodingBuilder_ = null; - } - return this; + public Builder newBuilderForType() { + return newBuilder(); } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_String_descriptor; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.String getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); + public static Builder newBuilder( + com.google.bigtable.admin.v2.Type.String.Encoding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override - public com.google.bigtable.admin.v2.Type.String build() { - com.google.bigtable.admin.v2.Type.String result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - public com.google.bigtable.admin.v2.Type.String buildPartial() { - com.google.bigtable.admin.v2.Type.String result = - new com.google.bigtable.admin.v2.Type.String(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - private void buildPartial0(com.google.bigtable.admin.v2.Type.String result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.encoding_ = encodingBuilder_ == null ? encoding_ : encodingBuilder_.build(); - to_bitField0_ |= 0x00000001; + /** + * + * + *
    +       * 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 + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.String.Encoding) + com.google.bigtable.admin.v2.Type.String.EncodingOrBuilder { + 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; } - result.bitField0_ |= to_bitField0_; - } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_String_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.String.Encoding.class, + com.google.bigtable.admin.v2.Type.String.Encoding.Builder.class); + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + // Construct using com.google.bigtable.admin.v2.Type.String.Encoding.newBuilder() + private Builder() {} - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (utf8RawBuilder_ != null) { + utf8RawBuilder_.clear(); + } + if (utf8BytesBuilder_ != null) { + utf8BytesBuilder_.clear(); + } + encodingCase_ = 0; + encoding_ = null; + return this; + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, 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_String_Encoding_descriptor; + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + @java.lang.Override + public com.google.bigtable.admin.v2.Type.String.Encoding getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance(); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.admin.v2.Type.String) { - return mergeFrom((com.google.bigtable.admin.v2.Type.String) other); - } else { - super.mergeFrom(other); - return this; + @java.lang.Override + public com.google.bigtable.admin.v2.Type.String.Encoding build() { + com.google.bigtable.admin.v2.Type.String.Encoding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - } - public Builder mergeFrom(com.google.bigtable.admin.v2.Type.String other) { - if (other == com.google.bigtable.admin.v2.Type.String.getDefaultInstance()) return this; - if (other.hasEncoding()) { - mergeEncoding(other.getEncoding()); + @java.lang.Override + public com.google.bigtable.admin.v2.Type.String.Encoding buildPartial() { + com.google.bigtable.admin.v2.Type.String.Encoding result = + new com.google.bigtable.admin.v2.Type.String.Encoding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + private void buildPartial0(com.google.bigtable.admin.v2.Type.String.Encoding result) { + int from_bitField0_ = 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(); + private void buildPartialOneofs(com.google.bigtable.admin.v2.Type.String.Encoding result) { + result.encodingCase_ = encodingCase_; + result.encoding_ = this.encoding_; + if (encodingCase_ == 1 && utf8RawBuilder_ != null) { + result.encoding_ = utf8RawBuilder_.build(); + } + if (encodingCase_ == 2 && utf8BytesBuilder_ != null) { + result.encoding_ = utf8BytesBuilder_.build(); + } } - 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_; + @java.lang.Override + public Builder clone() { + return super.clone(); + } - private com.google.bigtable.admin.v2.Type.String.Encoding encoding_; - private com.google.protobuf.SingleFieldBuilderV3< - 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.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.String.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.String.Encoding encoding = 1; - * - * @return The encoding. - */ - public com.google.bigtable.admin.v2.Type.String.Encoding getEncoding() { - if (encodingBuilder_ == null) { - return encoding_ == null - ? com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance() - : encoding_; - } else { - return encodingBuilder_.getMessage(); + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); } - } - /** - * - * - *
    -       * The encoding to use when converting to/from lower level types.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; - */ - public Builder setEncoding(com.google.bigtable.admin.v2.Type.String.Encoding value) { - if (encodingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - encoding_ = value; - } else { - encodingBuilder_.setMessage(value); + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
    -       * The encoding to use when converting to/from lower level types.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; - */ - public Builder setEncoding( - com.google.bigtable.admin.v2.Type.String.Encoding.Builder builderForValue) { - if (encodingBuilder_ == null) { - encoding_ = builderForValue.build(); - } else { - encodingBuilder_.setMessage(builderForValue.build()); + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
    -       * The encoding to use when converting to/from lower level types.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; - */ - public Builder mergeEncoding(com.google.bigtable.admin.v2.Type.String.Encoding value) { - if (encodingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && encoding_ != null - && encoding_ - != com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance()) { - getEncodingBuilder().mergeFrom(value); + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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 { - encoding_ = value; + super.mergeFrom(other); + return this; } - } else { - encodingBuilder_.mergeFrom(value); } - if (encoding_ != null) { - bitField0_ |= 0x00000001; + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.String.Encoding other) { + if (other == com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance()) + return this; + switch (other.getEncodingCase()) { + case UTF8_RAW: + { + mergeUtf8Raw(other.getUtf8Raw()); + break; + } + case UTF8_BYTES: + { + mergeUtf8Bytes(other.getUtf8Bytes()); + break; + } + case ENCODING_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); + return this; } - return this; - } - /** - * - * - *
    -       * The encoding to use when converting to/from lower level types.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.String.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.String.Encoding encoding = 1; - */ - public com.google.bigtable.admin.v2.Type.String.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.String.Encoding encoding = 1; - */ - public com.google.bigtable.admin.v2.Type.String.EncodingOrBuilder getEncodingOrBuilder() { - if (encodingBuilder_ != null) { - return encodingBuilder_.getMessageOrBuilder(); - } else { - return encoding_ == null - ? com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance() - : encoding_; - } - } - /** - * - * - *
    -       * The encoding to use when converting to/from lower level types.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - 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() { - if (encodingBuilder_ == null) { - encodingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - 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>( - getEncoding(), getParentForChildren(), isClean()); - encoding_ = null; + + @java.lang.Override + public final boolean isInitialized() { + return true; } - return encodingBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } + @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(getUtf8RawFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getUtf8BytesFieldBuilder().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; + } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } + private int encodingCase_ = 0; + private java.lang.Object encoding_; - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.String) - } + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } - // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.String) - private static final com.google.bigtable.admin.v2.Type.String DEFAULT_INSTANCE; + public Builder clearEncoding() { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + return this; + } - static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.String(); - } + private int bitField0_; - public static com.google.bigtable.admin.v2.Type.String getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.SingleFieldBuilderV3< + 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_; - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public String 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.String getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface Int64OrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Int64) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
    -     * 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. - */ - boolean hasEncoding(); - /** - * - * - *
    -     * The encoding to use when converting to/from lower level types.
    -     * 
    - * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - * - * @return The encoding. - */ - com.google.bigtable.admin.v2.Type.Int64.Encoding getEncoding(); - /** - * - * - *
    -     * The encoding to use when converting to/from lower level types.
    -     * 
    - * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - */ - com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder getEncodingOrBuilder(); - } - /** - * - * - *
    -   * Int64
    -   * Values of type `Int64` are stored in `Value.int_value`.
    -   * 
    - * - * Protobuf type {@code google.bigtable.admin.v2.Type.Int64} - */ - public static final class Int64 extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Int64) - Int64OrBuilder { - private static final long serialVersionUID = 0L; - // Use Int64.newBuilder() to construct. - private Int64(com.google.protobuf.GeneratedMessageV3.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 - 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); - } - - public interface EncodingOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Int64.Encoding) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
    -       * Use `BigEndianBytes` encoding.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - * - * @return Whether the bigEndianBytes field is set. - */ - boolean hasBigEndianBytes(); - /** - * - * - *
    -       * Use `BigEndianBytes` encoding.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - * - * @return The bigEndianBytes. - */ - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes getBigEndianBytes(); - /** - * - * - *
    -       * Use `BigEndianBytes` encoding.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - */ - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder - getBigEndianBytesOrBuilder(); - - com.google.bigtable.admin.v2.Type.Int64.Encoding.EncodingCase getEncodingCase(); - } - /** - * - * - *
    -     * Rules used to convert to/from lower level types.
    -     * 
    - * - * Protobuf type {@code google.bigtable.admin.v2.Type.Int64.Encoding} - */ - public static final class Encoding extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Int64.Encoding) - EncodingOrBuilder { - private static final long serialVersionUID = 0L; - // Use Encoding.newBuilder() to construct. - private Encoding(com.google.protobuf.GeneratedMessageV3.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 - 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 interface BigEndianBytesOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) - com.google.protobuf.MessageOrBuilder { + /** + * + * + *
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
    +         * 
    + * + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + * + * @deprecated google.bigtable.admin.v2.Type.String.Encoding.utf8_raw is deprecated. See + * google/bigtable/admin/v2/types.proto;l=102 + * @return Whether the utf8Raw field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasUtf8Raw() { + return encodingCase_ == 1; + } /** * * *
    -         * The underlying `Bytes` type, which may be able to encode further.
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
              * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * * - * @return Whether the bytesType field is set. + * @deprecated google.bigtable.admin.v2.Type.String.Encoding.utf8_raw is deprecated. See + * google/bigtable/admin/v2/types.proto;l=102 + * @return The utf8Raw. */ - boolean hasBytesType(); + @java.lang.Override + @java.lang.Deprecated + public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw getUtf8Raw() { + if (utf8RawBuilder_ == null) { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_; + } + return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); + } else { + if (encodingCase_ == 1) { + return utf8RawBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); + } + } + /** * * *
    -         * The underlying `Bytes` type, which may be able to encode further.
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
              * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - * - * @return The bytesType. + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * */ - com.google.bigtable.admin.v2.Type.Bytes getBytesType(); + @java.lang.Deprecated + public Builder setUtf8Raw(com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw value) { + if (utf8RawBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + utf8RawBuilder_.setMessage(value); + } + encodingCase_ = 1; + return this; + } + /** * * *
    -         * The underlying `Bytes` type, which may be able to encode further.
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
              * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * */ - com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder(); - } - /** - * - * - *
    -       * Encodes the value as an 8-byte big endian twos complement `Bytes`
    -       * value.
    -       * * Natural sort? No (positive values only)
    -       * * Self-delimiting? Yes
    -       * * Compatibility?
    -       *    - BigQuery Federation `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 - implements - // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) - BigEndianBytesOrBuilder { - private static final long serialVersionUID = 0L; - // Use BigEndianBytes.newBuilder() to construct. - private BigEndianBytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); + @java.lang.Deprecated + public Builder setUtf8Raw( + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.Builder builderForValue) { + if (utf8RawBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + utf8RawBuilder_.setMessage(builderForValue.build()); + } + encodingCase_ = 1; + return this; } - 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; + /** + * + * + *
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
    +         * 
    + * + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder mergeUtf8Raw( + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw value) { + if (utf8RawBuilder_ == null) { + if (encodingCase_ == 1 + && encoding_ + != com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw + .getDefaultInstance()) { + encoding_ = + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.newBuilder( + (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 1) { + utf8RawBuilder_.mergeFrom(value); + } else { + utf8RawBuilder_.setMessage(value); + } + } + encodingCase_ = 1; + 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_BigEndianBytes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.class, - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder.class); + /** + * + * + *
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
    +         * 
    + * + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearUtf8Raw() { + if (utf8RawBuilder_ == null) { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + } + utf8RawBuilder_.clear(); + } + return this; } - private int bitField0_; - public static final int BYTES_TYPE_FIELD_NUMBER = 1; - private com.google.bigtable.admin.v2.Type.Bytes bytesType_; /** * * *
    -         * The underlying `Bytes` type, which may be able to encode further.
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
              * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - * - * @return Whether the bytesType field is set. + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * */ - @java.lang.Override - public boolean hasBytesType() { - return ((bitField0_ & 0x00000001) != 0); + @java.lang.Deprecated + public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.Builder + getUtf8RawBuilder() { + return getUtf8RawFieldBuilder().getBuilder(); } + /** * * *
    -         * The underlying `Bytes` type, which may be able to encode further.
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
              * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - * - * @return The bytesType. + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Bytes getBytesType() { - return bytesType_ == null - ? com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance() - : bytesType_; + @java.lang.Deprecated + public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8RawOrBuilder + getUtf8RawOrBuilder() { + if ((encodingCase_ == 1) && (utf8RawBuilder_ != null)) { + return utf8RawBuilder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_; + } + return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); + } } + /** * * *
    -         * The underlying `Bytes` type, which may be able to encode further.
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
              * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { - return bytesType_ == null - ? com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance() - : bytesType_; + private com.google.protobuf.SingleFieldBuilderV3< + 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() { + if (utf8RawBuilder_ == null) { + if (!(encodingCase_ == 1)) { + encoding_ = + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); + } + utf8RawBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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>( + (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 1; + onChanged(); + return utf8RawBuilder_; } - private byte memoizedIsInitialized = -1; + private com.google.protobuf.SingleFieldBuilderV3< + 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_; + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * + * @return Whether the utf8Bytes field is set. + */ @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 boolean hasUtf8Bytes() { + return encodingCase_ == 2; } + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * + * @return The utf8Bytes. + */ @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getBytesType()); + public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes getUtf8Bytes() { + if (utf8BytesBuilder_ == null) { + if (encodingCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); + } else { + if (encodingCase_ == 2) { + return utf8BytesBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); } - 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, getBytesType()); + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + public Builder setUtf8Bytes( + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes value) { + if (utf8BytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + utf8BytesBuilder_.setMessage(value); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + encodingCase_ = 2; + return this; } - @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.BigEndianBytes)) { - return super.equals(obj); - } - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes other = - (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) obj; - - if (hasBytesType() != other.hasBytesType()) return false; - if (hasBytesType()) { - if (!getBytesType().equals(other.getBytesType())) return false; + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + public Builder setUtf8Bytes( + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.Builder builderForValue) { + if (utf8BytesBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + utf8BytesBuilder_.setMessage(builderForValue.build()); } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + encodingCase_ = 2; + return this; } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBytesType()) { - hash = (37 * hash) + BYTES_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getBytesType().hashCode(); + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + public Builder mergeUtf8Bytes( + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes value) { + if (utf8BytesBuilder_ == null) { + if (encodingCase_ == 2 + && encoding_ + != com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes + .getDefaultInstance()) { + encoding_ = + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.newBuilder( + (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 2) { + utf8BytesBuilder_.mergeFrom(value); + } else { + utf8BytesBuilder_.setMessage(value); + } } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + encodingCase_ = 2; + return this; } - public static com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes 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.BigEndianBytes 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.BigEndianBytes 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.BigEndianBytes parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes 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.BigEndianBytes 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.BigEndianBytes 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.Encoding.BigEndianBytes - 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.Encoding.BigEndianBytes - 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.Encoding.BigEndianBytes 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.Encoding.BigEndianBytes 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(); + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + public Builder clearUtf8Bytes() { + if (utf8BytesBuilder_ == null) { + if (encodingCase_ == 2) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 2) { + encodingCase_ = 0; + encoding_ = null; + } + utf8BytesBuilder_.clear(); + } + return this; } - public static Builder newBuilder( - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.Builder + getUtf8BytesBuilder() { + return getUtf8BytesFieldBuilder().getBuilder(); } + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8BytesOrBuilder + getUtf8BytesOrBuilder() { + if ((encodingCase_ == 2) && (utf8BytesBuilder_ != null)) { + return utf8BytesBuilder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); + } } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** * * *
    -         * Encodes the value as an 8-byte big endian twos complement `Bytes`
    -         * value.
    -         * * Natural sort? No (positive values only)
    -         * * Self-delimiting? Yes
    -         * * Compatibility?
    -         *    - BigQuery Federation `BINARY` encoding
    -         *    - HBase `Bytes.toBytes`
    -         *    - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
    +         * Use `Utf8Bytes` encoding.
              * 
    * - * Protobuf type {@code google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes} + * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder { - 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 - internalGetFieldAccessorTable() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_BigEndianBytes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.class, - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder.class); + private com.google.protobuf.SingleFieldBuilderV3< + 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() { + if (utf8BytesBuilder_ == null) { + if (!(encodingCase_ == 2)) { + encoding_ = + com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); + } + utf8BytesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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>( + (com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; } + encodingCase_ = 2; + onChanged(); + return utf8BytesBuilder_; + } - // Construct using - // com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBytesTypeFieldBuilder(); - } - } + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.String.Encoding) + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - bytesType_ = null; - if (bytesTypeBuilder_ != null) { - bytesTypeBuilder_.dispose(); - bytesTypeBuilder_ = null; - } - return this; - } + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.String.Encoding) + private static final com.google.bigtable.admin.v2.Type.String.Encoding DEFAULT_INSTANCE; - @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_BigEndianBytes_descriptor; - } + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.String.Encoding(); + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes - getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes - .getDefaultInstance(); - } + public static com.google.bigtable.admin.v2.Type.String.Encoding getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes build() { - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + 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(); } - return result; - } + }; - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes buildPartial() { - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes result = - new com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - private void buildPartial0( - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.bytesType_ = - bytesTypeBuilder_ == null ? bytesType_ : bytesTypeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + @java.lang.Override + public com.google.bigtable.admin.v2.Type.String.Encoding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + private int bitField0_; + public static final int ENCODING_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.Type.String.Encoding encoding_; - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.String.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 clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; + * + * @return The encoding. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.String.Encoding getEncoding() { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance() + : encoding_; + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.String.EncodingOrBuilder getEncodingOrBuilder() { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance() + : encoding_; + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) { - return mergeFrom( - (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) other); - } else { - super.mergeFrom(other); - return this; - } - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public Builder mergeFrom( - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes other) { - if (other - == com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes - .getDefaultInstance()) return this; - if (other.hasBytesType()) { - mergeBytesType(other.getBytesType()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public final boolean isInitialized() { - 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 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(getBytesTypeFieldBuilder().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; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - private int bitField0_; + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEncoding()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - private com.google.bigtable.admin.v2.Type.Bytes bytesType_; - 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_; - /** - * - * - *
    -           * The underlying `Bytes` type, which may be able to encode further.
    -           * 
    - * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - * - * @return Whether the bytesType field is set. - */ - public boolean hasBytesType() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
    -           * The underlying `Bytes` type, which may be able to encode further.
    -           * 
    - * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - * - * @return The bytesType. - */ - public com.google.bigtable.admin.v2.Type.Bytes getBytesType() { - if (bytesTypeBuilder_ == null) { - return bytesType_ == null - ? com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance() - : bytesType_; - } else { - return bytesTypeBuilder_.getMessage(); - } - } - /** - * - * - *
    -           * The underlying `Bytes` type, which may be able to encode further.
    -           * 
    - * - * .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(); - } - bytesType_ = value; - } else { - bytesTypeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
    -           * The underlying `Bytes` type, which may be able to encode further.
    -           * 
    - * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - */ - public Builder setBytesType( - com.google.bigtable.admin.v2.Type.Bytes.Builder builderForValue) { - if (bytesTypeBuilder_ == null) { - bytesType_ = builderForValue.build(); - } else { - bytesTypeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
    -           * The underlying `Bytes` type, which may be able to encode further.
    -           * 
    - * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - */ - public Builder mergeBytesType(com.google.bigtable.admin.v2.Type.Bytes value) { - if (bytesTypeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && bytesType_ != null - && bytesType_ != com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance()) { - getBytesTypeBuilder().mergeFrom(value); - } else { - bytesType_ = value; - } - } else { - bytesTypeBuilder_.mergeFrom(value); - } - if (bytesType_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * - * - *
    -           * The underlying `Bytes` type, which may be able to encode further.
    -           * 
    - * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - */ - public Builder clearBytesType() { - bitField0_ = (bitField0_ & ~0x00000001); - bytesType_ = null; - if (bytesTypeBuilder_ != null) { - bytesTypeBuilder_.dispose(); - bytesTypeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
    -           * The underlying `Bytes` type, which may be able to encode further.
    -           * 
    - * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - */ - public com.google.bigtable.admin.v2.Type.Bytes.Builder getBytesTypeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getBytesTypeFieldBuilder().getBuilder(); - } - /** - * - * - *
    -           * The underlying `Bytes` type, which may be able to encode further.
    -           * 
    - * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - */ - public com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { - if (bytesTypeBuilder_ != null) { - return bytesTypeBuilder_.getMessageOrBuilder(); - } else { - return bytesType_ == null - ? com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance() - : bytesType_; - } - } - /** - * - * - *
    -           * The underlying `Bytes` type, which may be able to encode further.
    -           * 
    - * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - */ - 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) { - 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>( - getBytesType(), getParentForChildren(), isClean()); - bytesType_ = null; - } - return bytesTypeBuilder_; - } + @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.String)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.String other = + (com.google.bigtable.admin.v2.Type.String) obj; - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } + 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 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(); + if (hasEncoding()) { + hash = (37 * hash) + ENCODING_FIELD_NUMBER; + hash = (53 * hash) + getEncoding().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) - } + public static com.google.bigtable.admin.v2.Type.String parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) - private static final com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes - DEFAULT_INSTANCE; + public static com.google.bigtable.admin.v2.Type.String 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.admin.v2.Type.Int64.Encoding.BigEndianBytes(); - } + public static com.google.bigtable.admin.v2.Type.String 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.BigEndianBytes - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static com.google.bigtable.admin.v2.Type.String 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 BigEndianBytes 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.String 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.admin.v2.Type.String 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.admin.v2.Type.String parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + 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( + PARSER, input, extensionRegistry); + } - private int encodingCase_ = 0; + 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); + } - @SuppressWarnings("serial") - private java.lang.Object encoding_; + 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( + PARSER, input, extensionRegistry); + } - public enum EncodingCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - BIG_ENDIAN_BYTES(1), - ENCODING_NOT_SET(0); - private final int value; + 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); + } - 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 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( + PARSER, input, extensionRegistry); + } - public static EncodingCase forNumber(int value) { - switch (value) { - case 1: - return BIG_ENDIAN_BYTES; - case 0: - return ENCODING_NOT_SET; - default: - return null; - } - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public int getNumber() { - return this.value; - } - }; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - public EncodingCase getEncodingCase() { - return EncodingCase.forNumber(encodingCase_); + public static Builder newBuilder(com.google.bigtable.admin.v2.Type.String 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; + } + + /** + * + * + *
    +     * String
    +     * Values of type `String` are stored in `Value.string_value`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.String} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.String) + com.google.bigtable.admin.v2.Type.StringOrBuilder { + 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; } - 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; + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_String_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.String.class, + com.google.bigtable.admin.v2.Type.String.Builder.class); } - /** - * - * - *
    -       * 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_; + + // Construct using com.google.bigtable.admin.v2.Type.String.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(); } - 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_; + public Builder clear() { + super.clear(); + bitField0_ = 0; + encoding_ = null; + if (encodingBuilder_ != null) { + encodingBuilder_.dispose(); + encodingBuilder_ = null; } - return com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); + return this; } - 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 com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_String_descriptor; } @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_); - } - getUnknownFields().writeTo(output); + public com.google.bigtable.admin.v2.Type.String getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); } @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_); + public com.google.bigtable.admin.v2.Type.String build() { + com.google.bigtable.admin.v2.Type.String result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + return result; } @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)) { - return super.equals(obj); + public com.google.bigtable.admin.v2.Type.String buildPartial() { + com.google.bigtable.admin.v2.Type.String result = + new com.google.bigtable.admin.v2.Type.String(this); + if (bitField0_ != 0) { + buildPartial0(result); } - com.google.bigtable.admin.v2.Type.Int64.Encoding other = - (com.google.bigtable.admin.v2.Type.Int64.Encoding) obj; + onBuilt(); + return result; + } - if (!getEncodingCase().equals(other.getEncodingCase())) return false; - switch (encodingCase_) { - case 1: - if (!getBigEndianBytes().equals(other.getBigEndianBytes())) return false; - break; - case 0: - default: + private void buildPartial0(com.google.bigtable.admin.v2.Type.String result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.encoding_ = encodingBuilder_ == null ? encoding_ : encodingBuilder_.build(); + to_bitField0_ |= 0x00000001; } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + result.bitField0_ |= to_bitField0_; } @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 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + public Builder clone() { + return super.clone(); } - public static com.google.bigtable.admin.v2.Type.Int64.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.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); + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); } - 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); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - 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 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - 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 parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + @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.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 addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - 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); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.String) { + return mergeFrom((com.google.bigtable.admin.v2.Type.String) other); + } else { + super.mergeFrom(other); + return this; + } } - 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 Builder mergeFrom(com.google.bigtable.admin.v2.Type.String other) { + if (other == com.google.bigtable.admin.v2.Type.String.getDefaultInstance()) return this; + if (other.hasEncoding()) { + mergeEncoding(other.getEncoding()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - 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 final boolean isInitialized() { + return true; } - public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( + @java.lang.Override + public Builder mergeFrom( 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(); + 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; } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + private int bitField0_; - public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Int64.Encoding prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + private com.google.bigtable.admin.v2.Type.String.Encoding encoding_; + private com.google.protobuf.SingleFieldBuilderV3< + 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_; - @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.String.Encoding encoding = 1; + * + * @return Whether the encoding field is set. + */ + public boolean hasEncoding() { + return ((bitField0_ & 0x00000001) != 0); } - @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.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * - * Protobuf type {@code google.bigtable.admin.v2.Type.Int64.Encoding} + * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; + * + * @return The 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; + public com.google.bigtable.admin.v2.Type.String.Encoding getEncoding() { + if (encodingBuilder_ == null) { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance() + : encoding_; + } else { + return encodingBuilder_.getMessage(); } + } - @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); + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; + */ + public Builder setEncoding(com.google.bigtable.admin.v2.Type.String.Encoding value) { + if (encodingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + } else { + encodingBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - // Construct using com.google.bigtable.admin.v2.Type.Int64.Encoding.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; + */ + public Builder setEncoding( + com.google.bigtable.admin.v2.Type.String.Encoding.Builder builderForValue) { + if (encodingBuilder_ == null) { + encoding_ = builderForValue.build(); + } else { + encodingBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (bigEndianBytesBuilder_ != null) { - bigEndianBytesBuilder_.clear(); + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; + */ + public Builder mergeEncoding(com.google.bigtable.admin.v2.Type.String.Encoding value) { + if (encodingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && encoding_ != null + && encoding_ + != com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance()) { + getEncodingBuilder().mergeFrom(value); + } else { + encoding_ = value; } - 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; + } else { + encodingBuilder_.mergeFrom(value); } - - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.Encoding getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance(); + if (encoding_ != null) { + bitField0_ |= 0x00000001; + 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); - } - 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); - } - buildPartialOneofs(result); - onBuilt(); - return result; + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; + */ + public Builder clearEncoding() { + bitField0_ = (bitField0_ & ~0x00000001); + encoding_ = null; + if (encodingBuilder_ != null) { + encodingBuilder_.dispose(); + encodingBuilder_ = null; } + onChanged(); + return this; + } - private void buildPartial0(com.google.bigtable.admin.v2.Type.Int64.Encoding result) { - int from_bitField0_ = bitField0_; - } + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; + */ + public com.google.bigtable.admin.v2.Type.String.Encoding.Builder getEncodingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getEncodingFieldBuilder().getBuilder(); + } - 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(); - } + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; + */ + public com.google.bigtable.admin.v2.Type.String.EncodingOrBuilder getEncodingOrBuilder() { + if (encodingBuilder_ != null) { + return encodingBuilder_.getMessageOrBuilder(); + } else { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance() + : encoding_; } + } - @java.lang.Override - public Builder clone() { - return super.clone(); + /** + * + * + *
    +       * 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< + 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() { + if (encodingBuilder_ == null) { + encodingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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>( + getEncoding(), getParentForChildren(), isClean()); + encoding_ = null; } + return encodingBuilder_; + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.String) + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.String) + private static final com.google.bigtable.admin.v2.Type.String DEFAULT_INSTANCE; - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.String(); + } - @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; - } - } + public static com.google.bigtable.admin.v2.Type.String getDefaultInstance() { + return DEFAULT_INSTANCE; + } - 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; - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public String 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(); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + }; - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @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; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - private int encodingCase_ = 0; - private java.lang.Object encoding_; + @java.lang.Override + public com.google.bigtable.admin.v2.Type.String getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - public EncodingCase getEncodingCase() { - return EncodingCase.forNumber(encodingCase_); - } + public interface Int64OrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Int64) + com.google.protobuf.MessageOrBuilder { - public Builder clearEncoding() { - encodingCase_ = 0; - encoding_ = 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; + * + * @return Whether the encoding field is set. + */ + boolean hasEncoding(); - private int bitField0_; + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + * + * @return The encoding. + */ + com.google.bigtable.admin.v2.Type.Int64.Encoding getEncoding(); + + /** + * + * + *
    +     * 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(); + } + + /** + * + * + *
    +   * Int64
    +   * Values of type `Int64` are stored in `Value.int_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Int64} + */ + public static final class Int64 extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Int64) + Int64OrBuilder { + private static final long serialVersionUID = 0L; + + // Use Int64.newBuilder() to construct. + private Int64(com.google.protobuf.GeneratedMessageV3.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 + 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); + } + + public interface EncodingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Int64.Encoding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +       * Use `BigEndianBytes` encoding.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + * + * @return Whether the bigEndianBytes field is set. + */ + boolean hasBigEndianBytes(); + + /** + * + * + *
    +       * Use `BigEndianBytes` encoding.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + * + * @return The bigEndianBytes. + */ + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes getBigEndianBytes(); + + /** + * + * + *
    +       * Use `BigEndianBytes` encoding.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + */ + 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 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 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Int64.Encoding) + EncodingOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Encoding.newBuilder() to construct. + private Encoding(com.google.protobuf.GeneratedMessageV3.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 + 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 interface BigEndianBytesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) + com.google.protobuf.MessageOrBuilder { - 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.
    +         * Deprecated: ignored if set.
              * 
    * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; * - * @return Whether the bigEndianBytes field is set. + * @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 - public boolean hasBigEndianBytes() { - return encodingCase_ == 1; - } + @java.lang.Deprecated + boolean hasBytesType(); + /** * * *
    -         * Use `BigEndianBytes` encoding.
    +         * Deprecated: ignored if set.
              * 
    * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; * - * @return The bigEndianBytes. + * @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 - 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(); - } - } + @java.lang.Deprecated + com.google.bigtable.admin.v2.Type.Bytes getBytesType(); + /** * * *
    -         * Use `BigEndianBytes` encoding.
    +         * Deprecated: ignored if set.
              * 
    * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ - 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; + @java.lang.Deprecated + com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder(); + } + + /** + * + * + *
    +       * 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 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) + BigEndianBytesOrBuilder { + private static final long serialVersionUID = 0L; + + // Use BigEndianBytes.newBuilder() to construct. + private BigEndianBytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - /** - * - * - *
    -         * 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; + + private BigEndianBytes() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigEndianBytes(); } - /** - * - * - *
    -         * 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; + + 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; } - /** - * - * - *
    -         * 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; + + @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_BigEndianBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.class, + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder.class); } + + private int bitField0_; + public static final int BYTES_TYPE_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.Type.Bytes bytesType_; + /** * * *
    -         * Use `BigEndianBytes` encoding.
    +         * Deprecated: ignored if set.
              * 
    * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 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. */ - public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder - getBigEndianBytesBuilder() { - return getBigEndianBytesFieldBuilder().getBuilder(); + @java.lang.Override + @java.lang.Deprecated + public boolean hasBytesType() { + return ((bitField0_ & 0x00000001) != 0); } + /** * * *
    -         * Use `BigEndianBytes` encoding.
    +         * Deprecated: ignored if set.
              * 
    * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 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 - 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(); - } + @java.lang.Deprecated + public com.google.bigtable.admin.v2.Type.Bytes getBytesType() { + return bytesType_ == null + ? com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance() + : bytesType_; } + /** * * *
    -         * Use `BigEndianBytes` encoding.
    +         * Deprecated: ignored if set.
              * 
    * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ - 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_; + @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() + : bytesType_; } + private byte memoizedIsInitialized = -1; + @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + 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 final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getBytesType()); + } + getUnknownFields().writeTo(output); } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Int64.Encoding) - } - - // @@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; - - static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Int64.Encoding(); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - public static com.google.bigtable.admin.v2.Type.Int64.Encoding getDefaultInstance() { - return DEFAULT_INSTANCE; - } + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBytesType()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + 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(); - } - }; + @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.BigEndianBytes)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes other = + (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) obj; - public static com.google.protobuf.Parser parser() { - return PARSER; - } + if (hasBytesType() != other.hasBytesType()) return false; + if (hasBytesType()) { + if (!getBytesType().equals(other.getBytesType())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBytesType()) { + hash = (37 * hash) + BYTES_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getBytesType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - @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.BigEndianBytes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - 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_; - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private byte memoizedIsInitialized = -1; + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @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.BigEndianBytes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @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 com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + 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); + } - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEncoding()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + 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( + PARSER, input, extensionRegistry); + } - @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; + 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); + } - if (hasEncoding() != other.hasEncoding()) return false; - if (hasEncoding()) { - if (!getEncoding().equals(other.getEncoding())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + public static com.google.bigtable.admin.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( + PARSER, input, extensionRegistry); + } - @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; - } + 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); + } - 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.Int64.Encoding.BigEndianBytes parseFrom( + com.google.protobuf.CodedInputStream 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 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 newBuilderForType() { + return newBuilder(); + } - 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 Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - 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.Int64 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static Builder newBuilder( + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - 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 Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - 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); - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - 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); - } + /** + * + * + *
    +         * 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 + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder { + 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; + } - 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); - } + @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_BigEndianBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.class, + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder.class); + } - 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); - } + // Construct using + // com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - 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); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - 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); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBytesTypeFieldBuilder(); + } + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bytesType_ = null; + if (bytesTypeBuilder_ != null) { + bytesTypeBuilder_.dispose(); + bytesTypeBuilder_ = null; + } + return this; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @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_BigEndianBytes_descriptor; + } - public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Int64 prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + .getDefaultInstance(); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes build() { + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @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 + public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes buildPartial() { + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes result = + new com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - @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); - } + private void buildPartial0( + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bytesType_ = + bytesTypeBuilder_ == null ? bytesType_ : bytesTypeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } - // Construct using com.google.bigtable.admin.v2.Type.Int64.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEncodingFieldBuilder(); - } - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @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 clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @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; - } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - @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 com.google.bigtable.admin.v2.Type.Int64 build() { - com.google.bigtable.admin.v2.Type.Int64 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); + } - @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); - } - onBuilt(); - return result; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) { + return mergeFrom( + (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) other); + } else { + super.mergeFrom(other); + return this; + } + } - 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_; - } + public Builder mergeFrom( + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes other) { + if (other + == com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + .getDefaultInstance()) return this; + if (other.hasBytesType()) { + mergeBytesType(other.getBytesType()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, 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(getBytesTypeFieldBuilder().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; + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + private int bitField0_; - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + private com.google.bigtable.admin.v2.Type.Bytes bytesType_; + 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_; - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .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); + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .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 + ? com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance() + : bytesType_; + } else { + return bytesTypeBuilder_.getMessage(); + } + } - @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); - return this; - } - } + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .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) { + throw new NullPointerException(); + } + bytesType_ = value; + } else { + bytesTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + 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; - } + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .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) { + bytesType_ = builderForValue.build(); + } else { + bytesTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .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) + && bytesType_ != null + && bytesType_ != com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance()) { + getBytesTypeBuilder().mergeFrom(value); + } else { + bytesType_ = value; + } + } else { + bytesTypeBuilder_.mergeFrom(value); + } + if (bytesType_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + 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(); + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder clearBytesType() { + bitField0_ = (bitField0_ & ~0x00000001); + bytesType_ = null; + if (bytesTypeBuilder_ != null) { + bytesTypeBuilder_.dispose(); + bytesTypeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .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(); + } + + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .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(); + } else { + return bytesType_ == null + ? com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance() + : bytesType_; + } + } + + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; + */ + 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) { + 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>( + getBytesType(), getParentForChildren(), isClean()); + bytesType_ = null; + } + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) + private static final com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes(); + } + + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigEndianBytes 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.Int64.Encoding.BigEndianBytes + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - 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_; + public interface OrderedCodeBytesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) + com.google.protobuf.MessageOrBuilder {} - 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); - } - /** + * 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. * - *
    -       * The encoding to use when converting to/from lower level types.
    +       * Distinct mode: all values are supported.
            * 
    * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - * - * @return The encoding. + * Protobuf type {@code google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes} */ - 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(); + public static final class OrderedCodeBytes extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) + OrderedCodeBytesOrBuilder { + private static final long serialVersionUID = 0L; + + // Use OrderedCodeBytes.newBuilder() to construct. + private OrderedCodeBytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - /** - * - * - *
    -       * 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); + + private OrderedCodeBytes() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OrderedCodeBytes(); } - 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()); + + 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; } - 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); - } else { - encoding_ = value; - } - } else { - encodingBuilder_.mergeFrom(value); + + @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_OrderedCodeBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.class, + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder.class); } - if (encoding_ != null) { - bitField0_ |= 0x00000001; - onChanged(); + + 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; } - 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; + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); } - 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_; + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - } - /** - * - * - *
    -       * 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; + + @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; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - return encodingBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } + @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; + } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } + 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); + } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Int64) - } + 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); + } - // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Int64) - private static final com.google.bigtable.admin.v2.Type.Int64 DEFAULT_INSTANCE; + 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); + } - static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Int64(); - } + 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); + } - public static com.google.bigtable.admin.v2.Type.Int64 getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes 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 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.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.protobuf.Parser parser() { - return PARSER; - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + 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.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } - public interface AggregateOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Aggregate) - com.google.protobuf.MessageOrBuilder { + 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.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
    -     * Type of the inputs that are accumulated by this `Aggregate`, which must
    -     * specify a full encoding.
    -     * Use `AddInput` mutations to accumulate new inputs.
    -     * 
    - * - * .google.bigtable.admin.v2.Type input_type = 1; - * - * @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.
    -     * Use `AddInput` mutations to accumulate new inputs.
    -     * 
    - * - * .google.bigtable.admin.v2.Type input_type = 1; - * - * @return The inputType. - */ - com.google.bigtable.admin.v2.Type getInputType(); - /** - * - * - *
    -     * Type of the inputs that are accumulated by this `Aggregate`, which must
    -     * specify a full encoding.
    -     * Use `AddInput` mutations to accumulate new inputs.
    -     * 
    - * - * .google.bigtable.admin.v2.Type input_type = 1; - */ - com.google.bigtable.admin.v2.TypeOrBuilder getInputTypeOrBuilder(); + 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.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - /** - * - * - *
    -     * 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.
    -     * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @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.
    -     * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateType. - */ - com.google.bigtable.admin.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.
    -     * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.bigtable.admin.v2.TypeOrBuilder getStateTypeOrBuilder(); + 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.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
    -     * Sum aggregator.
    -     * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - * - * @return Whether the sum field is set. - */ - boolean hasSum(); - /** - * - * - *
    -     * Sum aggregator.
    -     * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - * - * @return The sum. - */ - com.google.bigtable.admin.v2.Type.Aggregate.Sum getSum(); - /** - * - * - *
    -     * Sum aggregator.
    -     * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - */ - com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder(); + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - com.google.bigtable.admin.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` .
    -   * 
    - * - * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate} - */ - public static final class Aggregate extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Aggregate) - AggregateOrBuilder { - private static final long serialVersionUID = 0L; - // Use Aggregate.newBuilder() to construct. - private Aggregate(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - private Aggregate() {} + public static Builder newBuilder( + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Aggregate(); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - 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 Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Aggregate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Aggregate.class, - com.google.bigtable.admin.v2.Type.Aggregate.Builder.class); - } + /** + * + * + *
    +         * 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.GeneratedMessageV3.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 interface SumOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Aggregate.Sum) - com.google.protobuf.MessageOrBuilder {} - /** - * - * - *
    -     * Computes the sum of the input values.
    -     * Allowed input: `Int64`
    -     * State: same as input
    -     * 
    - * - * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.Sum} - */ - public static final class Sum extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Aggregate.Sum) - SumOrBuilder { - private static final long serialVersionUID = 0L; - // Use Sum.newBuilder() to construct. - private Sum(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } + @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_OrderedCodeBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.class, + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder + .class); + } - private Sum() {} + // Construct using + // com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.newBuilder() + private Builder() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Sum(); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } - 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 + 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_Aggregate_Sum_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Aggregate.Sum.class, - com.google.bigtable.admin.v2.Type.Aggregate.Sum.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; + } - private byte memoizedIsInitialized = -1; + @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(); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @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; + } - memoizedIsInitialized = 1; - return true; - } + @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; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @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.Aggregate.Sum)) { - return super.equals(obj); - } - com.google.bigtable.admin.v2.Type.Aggregate.Sum other = - (com.google.bigtable.admin.v2.Type.Aggregate.Sum) obj; + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - @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; - } + @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.Aggregate.Sum parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @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; + } + } - public static com.google.bigtable.admin.v2.Type.Aggregate.Sum parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + 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; + } - public static com.google.bigtable.admin.v2.Type.Aggregate.Sum parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static com.google.bigtable.admin.v2.Type.Aggregate.Sum 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 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; + } - public static com.google.bigtable.admin.v2.Type.Aggregate.Sum parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public static com.google.bigtable.admin.v2.Type.Aggregate.Sum parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } - 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); - } + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) + } - 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( - PARSER, input, extensionRegistry); - } + // @@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; - 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); - } + static { + DEFAULT_INSTANCE = + new com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes(); + } - 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( - PARSER, input, extensionRegistry); - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - 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); - } + 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.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( - PARSER, input, extensionRegistry); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Aggregate.Sum prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + private int encodingCase_ = 0; - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(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; + } + + /** + * @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 BIG_ENDIAN_BYTES; + case 2: + 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 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 - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public boolean hasBigEndianBytes() { + return encodingCase_ == 1; } + /** * * *
    -       * Computes the sum of the input values.
    -       * Allowed input: `Int64`
    -       * State: same as input
    +       * Use `BigEndianBytes` encoding.
            * 
    * - * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.Sum} + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + * + * @return The bigEndianBytes. */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Aggregate.Sum) - com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder { - 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 + 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(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Aggregate_Sum_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Aggregate.Sum.class, - com.google.bigtable.admin.v2.Type.Aggregate.Sum.Builder.class); + /** + * + * + *
    +       * 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(); + } - // Construct using com.google.bigtable.admin.v2.Type.Aggregate.Sum.newBuilder() - private Builder() {} + public static final int ORDERED_CODE_BYTES_FIELD_NUMBER = 2; - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } + /** + * + * + *
    +       * 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; + } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; + /** + * + * + *
    +       * 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_; } + return com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Aggregate_Sum_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) { + 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 - public com.google.bigtable.admin.v2.Type.Aggregate.Sum getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Aggregate.Sum build() { - com.google.bigtable.admin.v2.Type.Aggregate.Sum result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Aggregate.Sum buildPartial() { - com.google.bigtable.admin.v2.Type.Aggregate.Sum result = - new com.google.bigtable.admin.v2.Type.Aggregate.Sum(this); - onBuilt(); - return result; - } + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public Builder clone() { - return super.clone(); + @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_); } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + if (encodingCase_ == 2) { + output.writeMessage( + 2, (com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_); } + getUnknownFields().writeTo(output); + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + 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 Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + if (encodingCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_); } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.admin.v2.Type.Aggregate.Sum) { - return mergeFrom((com.google.bigtable.admin.v2.Type.Aggregate.Sum) other); - } else { - super.mergeFrom(other); - return this; - } + 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; - public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Aggregate.Sum other) { - if (other == com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + 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 boolean isInitialized() { - return true; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - - @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; + 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; + } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } + 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); + } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Aggregate.Sum) + 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); } - // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Aggregate.Sum) - private static final com.google.bigtable.admin.v2.Type.Aggregate.Sum DEFAULT_INSTANCE; + 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); + } - static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Aggregate.Sum(); + 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.Aggregate.Sum getDefaultInstance() { - 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 static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Sum 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.Int64.Encoding parseFrom( + java.io.InputStream 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.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 com.google.protobuf.Parser getParserForType() { - return PARSER; + 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); } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Aggregate.Sum getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + 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); } - } - private int bitField0_; - private int aggregatorCase_ = 0; + 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); + } - @SuppressWarnings("serial") - private java.lang.Object aggregator_; + 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); + } - public enum AggregatorCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SUM(4), - AGGREGATOR_NOT_SET(0); - private final int value; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - private AggregatorCase(int value) { - this.value = value; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - /** - * @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 AggregatorCase valueOf(int value) { - return forNumber(value); + + public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Int64.Encoding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - public static AggregatorCase forNumber(int value) { - switch (value) { - case 4: - return SUM; - case 0: - return AGGREGATOR_NOT_SET; - default: - return null; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - public int getNumber() { - return this.value; + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - }; - public AggregatorCase getAggregatorCase() { - return AggregatorCase.forNumber(aggregatorCase_); - } + /** + * + * + *
    +       * 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.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; + } - public static final int INPUT_TYPE_FIELD_NUMBER = 1; - private com.google.bigtable.admin.v2.Type inputType_; - /** - * - * - *
    -     * Type of the inputs that are accumulated by this `Aggregate`, which must
    -     * specify a full encoding.
    -     * Use `AddInput` mutations to accumulate new inputs.
    -     * 
    - * - * .google.bigtable.admin.v2.Type input_type = 1; - * - * @return Whether the inputType field is set. - */ - @java.lang.Override - public boolean hasInputType() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
    -     * Type of the inputs that are accumulated by this `Aggregate`, which must
    -     * specify a full encoding.
    -     * Use `AddInput` mutations to accumulate new inputs.
    -     * 
    - * - * .google.bigtable.admin.v2.Type input_type = 1; - * - * @return The inputType. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type getInputType() { - return inputType_ == null - ? com.google.bigtable.admin.v2.Type.getDefaultInstance() - : inputType_; - } - /** - * - * - *
    -     * Type of the inputs that are accumulated by this `Aggregate`, which must
    -     * specify a full encoding.
    -     * Use `AddInput` mutations to accumulate new inputs.
    -     * 
    - * - * .google.bigtable.admin.v2.Type input_type = 1; - */ - @java.lang.Override - public com.google.bigtable.admin.v2.TypeOrBuilder getInputTypeOrBuilder() { - return inputType_ == null - ? com.google.bigtable.admin.v2.Type.getDefaultInstance() - : inputType_; - } + @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); + } - public static final int STATE_TYPE_FIELD_NUMBER = 2; - private com.google.bigtable.admin.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.
    -     * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateType field is set. - */ - @java.lang.Override - 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.
    -     * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateType. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type getStateType() { - return stateType_ == null - ? com.google.bigtable.admin.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.
    -     * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.bigtable.admin.v2.TypeOrBuilder getStateTypeOrBuilder() { - return stateType_ == null - ? com.google.bigtable.admin.v2.Type.getDefaultInstance() - : stateType_; - } + // Construct using com.google.bigtable.admin.v2.Type.Int64.Encoding.newBuilder() + private Builder() {} - public static final int SUM_FIELD_NUMBER = 4; - /** - * - * - *
    -     * Sum aggregator.
    -     * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - * - * @return Whether the sum field is set. - */ - @java.lang.Override - public boolean hasSum() { - return aggregatorCase_ == 4; - } - /** - * - * - *
    -     * Sum aggregator.
    -     * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - * - * @return The sum. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Aggregate.Sum getSum() { - if (aggregatorCase_ == 4) { - return (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_; - } - return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); - } - /** - * - * - *
    -     * Sum aggregator.
    -     * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder() { - if (aggregatorCase_ == 4) { - return (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_; - } - return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } - private byte memoizedIsInitialized = -1; + @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; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @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; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getInputType()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getStateType()); - } - if (aggregatorCase_ == 4) { - output.writeMessage(4, (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_); - } - getUnknownFields().writeTo(output); - } + @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; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + @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; + } - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputType()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStateType()); - } - if (aggregatorCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + private void buildPartial0(com.google.bigtable.admin.v2.Type.Int64.Encoding result) { + int from_bitField0_ = bitField0_; + } - @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.Aggregate)) { - return super.equals(obj); - } - com.google.bigtable.admin.v2.Type.Aggregate other = - (com.google.bigtable.admin.v2.Type.Aggregate) obj; - - if (hasInputType() != other.hasInputType()) return false; - if (hasInputType()) { - if (!getInputType().equals(other.getInputType())) return false; - } - if (hasStateType() != other.hasStateType()) return false; - if (hasStateType()) { - if (!getStateType().equals(other.getStateType())) return false; - } - if (!getAggregatorCase().equals(other.getAggregatorCase())) return false; - switch (aggregatorCase_) { - case 4: - if (!getSum().equals(other.getSum())) 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 (hasInputType()) { - hash = (37 * hash) + INPUT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getInputType().hashCode(); - } - if (hasStateType()) { - hash = (37 * hash) + STATE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getStateType().hashCode(); - } - switch (aggregatorCase_) { - case 4: - hash = (37 * hash) + SUM_FIELD_NUMBER; - hash = (53 * hash) + getSum().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + 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(); + } + } - public static com.google.bigtable.admin.v2.Type.Aggregate 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.Aggregate 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.Aggregate 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.Aggregate 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.Aggregate 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.Aggregate 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.Aggregate parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @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; + } + } - 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( - PARSER, input, extensionRegistry); - } + 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; + } - 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); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - 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( - 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: + { + input.readMessage( + getBigEndianBytesFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + getOrderedCodeBytesFieldBuilder().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; + } - 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); - } + private int encodingCase_ = 0; + private java.lang.Object encoding_; - 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( - PARSER, input, extensionRegistry); - } + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + public Builder clearEncoding() { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + return this; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + private int bitField0_; - public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Aggregate prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + 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_; - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
    -     * A 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` .
    -     * 
    - * - * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Aggregate) - com.google.bigtable.admin.v2.Type.AggregateOrBuilder { - 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 - internalGetFieldAccessorTable() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Aggregate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Aggregate.class, - com.google.bigtable.admin.v2.Type.Aggregate.Builder.class); - } - - // Construct using com.google.bigtable.admin.v2.Type.Aggregate.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInputTypeFieldBuilder(); - getStateTypeFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - inputType_ = null; - if (inputTypeBuilder_ != null) { - inputTypeBuilder_.dispose(); - inputTypeBuilder_ = null; - } - stateType_ = null; - if (stateTypeBuilder_ != null) { - stateTypeBuilder_.dispose(); - stateTypeBuilder_ = null; - } - if (sumBuilder_ != null) { - sumBuilder_.clear(); + /** + * + * + *
    +         * 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; } - aggregatorCase_ = 0; - aggregator_ = 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_Aggregate_descriptor; - } - - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Aggregate getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); - } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Aggregate build() { - com.google.bigtable.admin.v2.Type.Aggregate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
    +         * 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 result; - } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Aggregate buildPartial() { - com.google.bigtable.admin.v2.Type.Aggregate result = - new com.google.bigtable.admin.v2.Type.Aggregate(this); - if (bitField0_ != 0) { - buildPartial0(result); + /** + * + * + *
    +         * 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; } - buildPartialOneofs(result); - onBuilt(); - return result; - } - private void buildPartial0(com.google.bigtable.admin.v2.Type.Aggregate result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.inputType_ = inputTypeBuilder_ == null ? inputType_ : inputTypeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.stateType_ = stateTypeBuilder_ == null ? stateType_ : stateTypeBuilder_.build(); - to_bitField0_ |= 0x00000002; + /** + * + * + *
    +         * 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; } - result.bitField0_ |= to_bitField0_; - } - private void buildPartialOneofs(com.google.bigtable.admin.v2.Type.Aggregate result) { - result.aggregatorCase_ = aggregatorCase_; - result.aggregator_ = this.aggregator_; - if (aggregatorCase_ == 4 && sumBuilder_ != null) { - result.aggregator_ = sumBuilder_.build(); + /** + * + * + *
    +         * 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 clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + /** + * + * + *
    +         * 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; + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + /** + * + * + *
    +         * 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(); + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + /** + * + * + *
    +         * 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(); + } + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + /** + * + * + *
    +         * 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_; + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + private com.google.protobuf.SingleFieldBuilderV3< + 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_; - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.admin.v2.Type.Aggregate) { - return mergeFrom((com.google.bigtable.admin.v2.Type.Aggregate) other); - } else { - super.mergeFrom(other); - return this; + /** + * + * + *
    +         * 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; } - } - public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Aggregate other) { - if (other == com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance()) return this; - if (other.hasInputType()) { - mergeInputType(other.getInputType()); - } - if (other.hasStateType()) { - mergeStateType(other.getStateType()); - } - switch (other.getAggregatorCase()) { - case SUM: - { - mergeSum(other.getSum()); - break; + /** + * + * + *
    +         * 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_; } - case AGGREGATOR_NOT_SET: - { - break; + 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(); + } } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + /** + * + * + *
    +         * 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 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 `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; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getInputTypeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getStateTypeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 34: - { - input.readMessage(getSumFieldBuilder().getBuilder(), extensionRegistry); - aggregatorCase_ = 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 aggregatorCase_ = 0; - private java.lang.Object aggregator_; - - public AggregatorCase getAggregatorCase() { - return AggregatorCase.forNumber(aggregatorCase_); - } - - public Builder clearAggregator() { - aggregatorCase_ = 0; - aggregator_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.bigtable.admin.v2.Type inputType_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type, - com.google.bigtable.admin.v2.Type.Builder, - com.google.bigtable.admin.v2.TypeOrBuilder> - inputTypeBuilder_; - /** - * - * - *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    -       * Use `AddInput` mutations to accumulate new inputs.
    -       * 
    - * - * .google.bigtable.admin.v2.Type input_type = 1; - * - * @return Whether the inputType field is set. - */ - public boolean hasInputType() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    -       * Use `AddInput` mutations to accumulate new inputs.
    -       * 
    - * - * .google.bigtable.admin.v2.Type input_type = 1; - * - * @return The inputType. - */ - public com.google.bigtable.admin.v2.Type getInputType() { - if (inputTypeBuilder_ == null) { - return inputType_ == null - ? com.google.bigtable.admin.v2.Type.getDefaultInstance() - : inputType_; - } else { - return inputTypeBuilder_.getMessage(); + /** + * + * + *
    +         * 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; } - } - /** - * - * - *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    -       * Use `AddInput` mutations to accumulate new inputs.
    -       * 
    - * - * .google.bigtable.admin.v2.Type input_type = 1; - */ - public Builder setInputType(com.google.bigtable.admin.v2.Type value) { - if (inputTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + + /** + * + * + *
    +         * 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(); } - inputType_ = value; - } else { - inputTypeBuilder_.setMessage(value); + return this; } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    -       * Use `AddInput` mutations to accumulate new inputs.
    -       * 
    - * - * .google.bigtable.admin.v2.Type input_type = 1; - */ - public Builder setInputType(com.google.bigtable.admin.v2.Type.Builder builderForValue) { - if (inputTypeBuilder_ == null) { - inputType_ = builderForValue.build(); - } else { - inputTypeBuilder_.setMessage(builderForValue.build()); + + /** + * + * + *
    +         * 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 getOrderedCodeBytesFieldBuilder().getBuilder(); } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    -       * Use `AddInput` mutations to accumulate new inputs.
    -       * 
    - * - * .google.bigtable.admin.v2.Type input_type = 1; - */ - public Builder mergeInputType(com.google.bigtable.admin.v2.Type value) { - if (inputTypeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && inputType_ != null - && inputType_ != com.google.bigtable.admin.v2.Type.getDefaultInstance()) { - getInputTypeBuilder().mergeFrom(value); + + /** + * + * + *
    +         * 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 { - inputType_ = value; + 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(); } - } else { - inputTypeBuilder_.mergeFrom(value); } - if (inputType_ != null) { - bitField0_ |= 0x00000001; + + /** + * + * + *
    +         * Use `OrderedCodeBytes` encoding.
    +         * 
    + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + 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> + getOrderedCodeBytesFieldBuilder() { + if (orderedCodeBytesBuilder_ == null) { + if (!(encodingCase_ == 2)) { + encoding_ = + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + orderedCodeBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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_; } - return this; - } - /** - * - * - *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    -       * Use `AddInput` mutations to accumulate new inputs.
    -       * 
    - * - * .google.bigtable.admin.v2.Type input_type = 1; - */ - public Builder clearInputType() { - bitField0_ = (bitField0_ & ~0x00000001); - inputType_ = null; - if (inputTypeBuilder_ != null) { - inputTypeBuilder_.dispose(); - inputTypeBuilder_ = null; + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } - onChanged(); - return this; - } - /** - * - * - *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    -       * Use `AddInput` mutations to accumulate new inputs.
    -       * 
    - * - * .google.bigtable.admin.v2.Type input_type = 1; - */ - public com.google.bigtable.admin.v2.Type.Builder getInputTypeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getInputTypeFieldBuilder().getBuilder(); + + @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) } - /** - * - * - *
    +
    +      // @@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;
    +
    +      static {
    +        DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Int64.Encoding();
    +      }
    +
    +      public static com.google.bigtable.admin.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.admin.v2.Type.Int64.Encoding getDefaultInstanceForType() {
    +        return DEFAULT_INSTANCE;
    +      }
    +    }
    +
    +    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; + } + + @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; + } + + 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.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.Int64 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Int64 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.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(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEncodingFieldBuilder(); + } + } + + @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_Int64_descriptor; + } + + @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 com.google.bigtable.admin.v2.Type.Int64 build() { + com.google.bigtable.admin.v2.Type.Int64 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + 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); + } + 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; + } + 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) { + 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.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; + } + + @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(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_; + + 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 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); + } + + /** + * + * + *
    +       * 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 getEncodingFieldBuilder().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.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; + + 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() { + @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.admin.v2.Type.Int64 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + 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); + } + + private Bool() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Bool(); + } + + 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; + } + + @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); + } + + 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.Bool)) { + return super.equals(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; + } + + @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.Bool parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Bool 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( + 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) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Bool 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.Bool 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.Bool 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.Bool 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.Bool 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.Bool 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.Bool 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; + } + + /** + * + * + *
    +     * bool
    +     * Values of type `Bool` are stored in `Value.bool_value`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Bool} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@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_Bool_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_Bool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.Bool.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Bool_descriptor; + } + + @java.lang.Override + 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.Bool build() { + com.google.bigtable.admin.v2.Type.Bool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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); + 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.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.Bool other) { + if (other == com.google.bigtable.admin.v2.Type.Bool.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.Bool) + } + + // @@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.Bool(); + } + + 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() { + @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(); + } + }; + + 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.Bool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Float32OrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Float32) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +   * Float32
    +   * Values of type `Float32` are stored in `Value.float_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Float32} + */ + public static final class Float32 extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Float32) + Float32OrBuilder { + private static final long serialVersionUID = 0L; + + // Use Float32.newBuilder() to construct. + private Float32(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Float32() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Float32(); + } + + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Float32_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Float32.class, + com.google.bigtable.admin.v2.Type.Float32.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.Float32)) { + return super.equals(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; + } + + @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.Float32 parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Float32 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( + 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) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Float32 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.Float32 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.Float32 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.Float32 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.Float32 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.Float32 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.Float32 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; + } + + /** + * + * + *
    +     * Float32
    +     * Values of type `Float32` are stored in `Value.float_value`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Float32} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@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_Float32_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_Float32_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.Float32.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Float32_descriptor; + } + + @java.lang.Override + 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.Float32 build() { + com.google.bigtable.admin.v2.Type.Float32 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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); + 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); + } 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; + 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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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(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.Float32(); + } + + 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() { + @java.lang.Override + public Float32 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.Float32 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Float64OrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Float64) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +   * Float64
    +   * Values of type `Float64` are stored in `Value.float_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Float64} + */ + public static final class Float64 extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.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); + } + + private Float64() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Float64(); + } + + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Float64_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Float64.class, + com.google.bigtable.admin.v2.Type.Float64.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.Float64)) { + return super.equals(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; + } + + @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.Float64 parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Float64 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( + 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) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Float64 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.Float64 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.Float64 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.Float64 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.Float64 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.Float64 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.Float64 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; + } + + /** + * + * + *
    +     * Float64
    +     * Values of type `Float64` are stored in `Value.float_value`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Float64} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@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_Float64_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_Float64_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.Float64.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Float64_descriptor; + } + + @java.lang.Override + 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.Float64 build() { + com.google.bigtable.admin.v2.Type.Float64 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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); + 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); + } 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; + 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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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(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.Float64(); + } + + 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() { + @java.lang.Override + public Float64 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.Float64 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TimestampOrBuilder + extends + // @@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(); + } + + /** + * + * + *
    +   * Timestamp
    +   * Values of type `Timestamp` are stored in `Value.timestamp_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Timestamp} + */ + public static final class Timestamp extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Timestamp) + TimestampOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Timestamp.newBuilder() to construct. + private Timestamp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Timestamp() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Timestamp(); + } + + 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.GeneratedMessageV3.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); + } + + public interface EncodingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Timestamp.Encoding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +       * 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(); + + /** + * + * + *
    +       * 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(); + + /** + * + * + *
    +       * 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(); + } + + /** + * + * + *
    +     * Rules used to convert to or from lower level types.
    +     * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Timestamp.Encoding} + */ + public static final class Encoding extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Timestamp.Encoding) + EncodingOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Encoding.newBuilder() to construct. + private Encoding(com.google.protobuf.GeneratedMessageV3.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_Timestamp_Encoding_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_Timestamp_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Timestamp.Encoding.class, + com.google.bigtable.admin.v2.Type.Timestamp.Encoding.Builder.class); + } + + 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 { + UNIX_MICROS_INT64(1), + 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 UNIX_MICROS_INT64; + 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 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 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 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 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 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) 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.Int64.Encoding) 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.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 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 { + 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.Timestamp.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.GeneratedMessageV3.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.Timestamp.Encoding} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.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); + } + + // Construct using com.google.bigtable.admin.v2.Type.Timestamp.Encoding.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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; + } + + @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.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.Timestamp.Encoding build() { + com.google.bigtable.admin.v2.Type.Timestamp.Encoding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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; + } + + private void buildPartial0(com.google.bigtable.admin.v2.Type.Timestamp.Encoding result) { + int from_bitField0_ = bitField0_; + } + + 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 + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.Encoding) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Timestamp.Encoding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + 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 + 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( + getUnixMicrosInt64FieldBuilder().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 EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } + + public Builder clearEncoding() { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + 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> + unixMicrosInt64Builder_; + + /** + * + * + *
    +         * 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; + } + + /** + * + * + *
    +         * 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(); + } + } + + /** + * + * + *
    +         * 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; + } + + /** + * + * + *
    +         * 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; + } + + /** + * + * + *
    +         * 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; + } + + /** + * + * + *
    +         * 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; + } + + /** + * + * + *
    +         * 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 getUnixMicrosInt64FieldBuilder().getBuilder(); + } + + /** + * + * + *
    +         * 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(); + } + } + + /** + * + * + *
    +         * 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.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> + getUnixMicrosInt64FieldBuilder() { + if (unixMicrosInt64Builder_ == null) { + if (!(encodingCase_ == 1)) { + encoding_ = com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance(); + } + unixMicrosInt64Builder_ = + 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>( + (com.google.bigtable.admin.v2.Type.Int64.Encoding) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 1; + onChanged(); + return unixMicrosInt64Builder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.Encoding) + } + + // @@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; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Timestamp.Encoding(); + } + + public static com.google.bigtable.admin.v2.Type.Timestamp.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.Timestamp.Encoding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int ENCODING_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.Type.Timestamp.Encoding encoding_; + + /** + * + * + *
    +     * 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); + } + + /** + * + * + *
    +     * 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_; + } + + /** + * + * + *
    +     * 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_; + } + + 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.Timestamp)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Timestamp other = + (com.google.bigtable.admin.v2.Type.Timestamp) 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; + } + + @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; + } + + public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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); + } + + public static com.google.bigtable.admin.v2.Type.Timestamp 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( + 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) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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); + } + + public static com.google.bigtable.admin.v2.Type.Timestamp 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.Timestamp 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.Timestamp 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 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.Timestamp 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.Timestamp 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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEncodingFieldBuilder(); + } + } + + @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_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; + } + + @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); + } + 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; + } + 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.Timestamp) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Timestamp) 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; + 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(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_; + + private com.google.bigtable.admin.v2.Type.Timestamp.Encoding encoding_; + private com.google.protobuf.SingleFieldBuilderV3< + 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 { + 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.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 getEncodingFieldBuilder().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.SingleFieldBuilderV3< + 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> + getEncodingFieldBuilder() { + if (encodingBuilder_ == null) { + encodingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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(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.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Date) + DateOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Date.newBuilder() to construct. + private Date(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Date() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new 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.GeneratedMessageV3.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.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`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Date} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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.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 Struct() { + fields_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Struct(); + } + + 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.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); + } + + 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.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); + } + + private Field() { + fieldName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Field(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Field_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_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()); + } + 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()); + } + 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.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; + } + + @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); + } + + // Construct using com.google.bigtable.admin.v2.Type.Struct.Field.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTypeFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object 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.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); + } + + /** + * + * + *
    +         * 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 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_; + } + } + + /** + * + * + *
    +         * 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_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Struct.Encoding) + EncodingOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Encoding.newBuilder() to construct. + private Encoding(com.google.protobuf.GeneratedMessageV3.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_Struct_Encoding_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_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.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) + SingletonOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Singleton.newBuilder() to construct. + private Singleton(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Singleton() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) + DelimitedBytesOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DelimitedBytes.newBuilder() to construct. + private DelimitedBytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DelimitedBytes() { + delimiter_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DelimitedBytes(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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() != com.google.protobuf.ByteString.EMPTY) { + 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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) + OrderedCodeBytesOrBuilder { + private static final long serialVersionUID = 0L; + + // Use OrderedCodeBytes.newBuilder() to construct. + private OrderedCodeBytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OrderedCodeBytes() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getSingletonFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + getDelimitedBytesFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + getOrderedCodeBytesFieldBuilder().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.SingleFieldBuilderV3< + 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 getSingletonFieldBuilder().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.SingleFieldBuilderV3< + 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> + getSingletonFieldBuilder() { + if (singletonBuilder_ == null) { + if (!(encodingCase_ == 1)) { + encoding_ = + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } + singletonBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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.SingleFieldBuilderV3< + 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 getDelimitedBytesFieldBuilder().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.SingleFieldBuilderV3< + 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> + getDelimitedBytesFieldBuilder() { + if (delimitedBytesBuilder_ == null) { + if (!(encodingCase_ == 2)) { + encoding_ = + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + .getDefaultInstance(); + } + delimitedBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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.SingleFieldBuilderV3< + 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 getOrderedCodeBytesFieldBuilder().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.SingleFieldBuilderV3< + 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> + getOrderedCodeBytesFieldBuilder() { + if (orderedCodeBytesBuilder_ == null) { + if (!(encodingCase_ == 3)) { + encoding_ = + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + orderedCodeBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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); + } + + // Construct using com.google.bigtable.admin.v2.Type.Struct.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFieldsFieldBuilder(); + getEncodingFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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_); + } + } + } + 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(getEncodingFieldBuilder().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.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(); + } 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 getFieldsFieldBuilder().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 getFieldsFieldBuilder() + .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 getFieldsFieldBuilder() + .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 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_; + } + + private com.google.bigtable.admin.v2.Type.Struct.Encoding encoding_; + private com.google.protobuf.SingleFieldBuilderV3< + 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 getEncodingFieldBuilder().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.SingleFieldBuilderV3< + 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> + getEncodingFieldBuilder() { + if (encodingBuilder_ == null) { + encodingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Proto) + ProtoOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Proto.newBuilder() to construct. + private Proto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Proto() { + schemaBundleId_ = ""; + messageName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Proto(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(schemaBundleId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(messageName_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(schemaBundleId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(messageName_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.Proto) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Proto) other); + } else { + super.mergeFrom(other); + return this; + } + } + + 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(); + } + if (!other.getMessageName().isEmpty()) { + messageName_ = other.messageName_; + 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: + { + 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; + } + } + + /** + * + * + *
    +       * 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; + } + + /** + * + * + *
    +       * 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; + } + + /** + * + * + *
    +       * 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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.Proto) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Proto) + private static final com.google.bigtable.admin.v2.Type.Proto DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Proto(); + } + + 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; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Proto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EnumOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Enum) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The ID of the schema bundle that this enum is defined in.
    +     * 
    + * + * 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.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Enum) + EnumOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Enum.newBuilder() to construct. + private Enum(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Enum() { + schemaBundleId_ = ""; + enumName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Enum(); + } + + 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 + protected com.google.protobuf.GeneratedMessageV3.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 ID of the schema bundle that this enum 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 enum 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 ENUM_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object enumName_ = ""; + + /** + * + * + *
    +     * 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.Override + 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 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. + */ + @java.lang.Override + 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; + + @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(schemaBundleId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(enumName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, enumName_); + } + 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(schemaBundleId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(enumName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, enumName_); + } + 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.Enum)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Enum other = (com.google.bigtable.admin.v2.Type.Enum) obj; + + if (!getSchemaBundleId().equals(other.getSchemaBundleId())) return false; + if (!getEnumName().equals(other.getEnumName())) 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) + 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.Enum parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Enum parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Enum parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Enum 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.Enum 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.Enum 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.Enum 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.Enum 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.Enum 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.Enum prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * A 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 Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@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_Enum_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_Enum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + 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.Enum.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + 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_Enum_descriptor; + } + + @java.lang.Override + 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.Enum build() { + com.google.bigtable.admin.v2.Type.Enum result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.Type.Enum result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schemaBundleId_ = schemaBundleId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enumName_ = enumName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.Enum) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Enum) other); + } else { + super.mergeFrom(other); + return this; + } + } + + 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(); + } + 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: + { + 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 ID of the schema bundle that this enum 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 enum 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 enum 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 enum 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 enum 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 enumName_ = ""; + + /** + * + * + *
    +       * 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. + */ + 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 (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * 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. + */ + 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 (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * 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 enumName to set. + * @return This builder for chaining. + */ + public Builder setEnumName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + enumName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The fully qualified name of the protobuf enum message, including package.
    +       * In the format of "foo.bar.EnumMessage".
    +       * 
    + * + * string enum_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnumName() { + enumName_ = getDefaultInstance().getEnumName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +       * 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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.Enum) + } + + // @@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.Enum(); + } + + 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() { + @java.lang.Override + public Enum 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.Enum getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ArrayOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Array) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The type of the elements in the array. This must not be `Array`.
    +     * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + * + * @return Whether the elementType field is set. + */ + boolean hasElementType(); + + /** + * + * + *
    +     * The type of the elements in the array. This must not be `Array`.
    +     * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + * + * @return The elementType. + */ + com.google.bigtable.admin.v2.Type getElementType(); + + /** + * + * + *
    +     * The type of the elements in the array. This must not be `Array`.
    +     * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + */ + com.google.bigtable.admin.v2.TypeOrBuilder getElementTypeOrBuilder(); + } + + /** + * + * + *
    +   * An ordered list of elements of a given type.
    +   * Values of type `Array` are stored in `Value.array_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Array} + */ + public static final class Array extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Array) + ArrayOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Array.newBuilder() to construct. + private Array(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Array_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Array.class, + com.google.bigtable.admin.v2.Type.Array.Builder.class); + } + + private int bitField0_; + public static final int ELEMENT_TYPE_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.Type elementType_; + + /** + * + * + *
    +     * The type of the elements in the array. This must not be `Array`.
    +     * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + * + * @return Whether the elementType field is set. + */ + @java.lang.Override + public boolean hasElementType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * The type of the elements in the array. This must not be `Array`.
    +     * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + * + * @return The elementType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type getElementType() { + return elementType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : elementType_; + } + + /** + * + * + *
    +     * The type of the elements in the array. This must not be `Array`.
    +     * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.TypeOrBuilder getElementTypeOrBuilder() { + return elementType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : elementType_; + } + + 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, getElementType()); + } + 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, getElementType()); + } + 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.Array)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Array other = (com.google.bigtable.admin.v2.Type.Array) obj; + + if (hasElementType() != other.hasElementType()) return false; + if (hasElementType()) { + if (!getElementType().equals(other.getElementType())) 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 (hasElementType()) { + hash = (37 * hash) + ELEMENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getElementType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.Type.Array parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Array 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.Array parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Array 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.Array parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Array 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.Array 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.Array 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.Array 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.Array 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.Array 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.Array 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.Array 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; + } + + /** + * + * + *
    +     * An ordered list of elements of a given type.
    +     * Values of type `Array` are stored in `Value.array_value`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Array} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Array) + com.google.bigtable.admin.v2.Type.ArrayOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Array_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Array.class, + com.google.bigtable.admin.v2.Type.Array.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.Type.Array.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getElementTypeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + elementType_ = null; + if (elementTypeBuilder_ != null) { + elementTypeBuilder_.dispose(); + elementTypeBuilder_ = 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_Array_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Array getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Array build() { + com.google.bigtable.admin.v2.Type.Array result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Array buildPartial() { + com.google.bigtable.admin.v2.Type.Array result = + new com.google.bigtable.admin.v2.Type.Array(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.Type.Array result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.elementType_ = + elementTypeBuilder_ == null ? elementType_ : elementTypeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Array) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Array) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Array other) { + if (other == com.google.bigtable.admin.v2.Type.Array.getDefaultInstance()) return this; + if (other.hasElementType()) { + mergeElementType(other.getElementType()); + } + 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(getElementTypeFieldBuilder().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 elementType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder> + elementTypeBuilder_; + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + * + * @return Whether the elementType field is set. + */ + public boolean hasElementType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + * + * @return The elementType. + */ + public com.google.bigtable.admin.v2.Type getElementType() { + if (elementTypeBuilder_ == null) { + return elementType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : elementType_; + } else { + return elementTypeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + */ + public Builder setElementType(com.google.bigtable.admin.v2.Type value) { + if (elementTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + elementType_ = value; + } else { + elementTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + */ + public Builder setElementType(com.google.bigtable.admin.v2.Type.Builder builderForValue) { + if (elementTypeBuilder_ == null) { + elementType_ = builderForValue.build(); + } else { + elementTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + */ + public Builder mergeElementType(com.google.bigtable.admin.v2.Type value) { + if (elementTypeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && elementType_ != null + && elementType_ != com.google.bigtable.admin.v2.Type.getDefaultInstance()) { + getElementTypeBuilder().mergeFrom(value); + } else { + elementType_ = value; + } + } else { + elementTypeBuilder_.mergeFrom(value); + } + if (elementType_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + */ + public Builder clearElementType() { + bitField0_ = (bitField0_ & ~0x00000001); + elementType_ = null; + if (elementTypeBuilder_ != null) { + elementTypeBuilder_.dispose(); + elementTypeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + */ + public com.google.bigtable.admin.v2.Type.Builder getElementTypeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getElementTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + */ + public com.google.bigtable.admin.v2.TypeOrBuilder getElementTypeOrBuilder() { + if (elementTypeBuilder_ != null) { + return elementTypeBuilder_.getMessageOrBuilder(); + } else { + return elementType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : elementType_; + } + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.admin.v2.Type element_type = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder> + getElementTypeFieldBuilder() { + if (elementTypeBuilder_ == null) { + elementTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder>( + getElementType(), getParentForChildren(), isClean()); + elementType_ = null; + } + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Array) + private static final com.google.bigtable.admin.v2.Type.Array DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Array(); + } + + public static com.google.bigtable.admin.v2.Type.Array getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Array 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.Array getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MapOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Map) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The type of a map key.
    +     * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +     * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + * + * @return Whether the keyType field is set. + */ + boolean hasKeyType(); + + /** + * + * + *
    +     * The type of a map key.
    +     * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +     * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + * + * @return The keyType. + */ + com.google.bigtable.admin.v2.Type getKeyType(); + + /** + * + * + *
    +     * The type of a map key.
    +     * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +     * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + */ + com.google.bigtable.admin.v2.TypeOrBuilder getKeyTypeOrBuilder(); + + /** + * + * + *
    +     * The type of the values in a map.
    +     * 
    + * + * .google.bigtable.admin.v2.Type value_type = 2; + * + * @return Whether the valueType field is set. + */ + boolean hasValueType(); + + /** + * + * + *
    +     * The type of the values in a map.
    +     * 
    + * + * .google.bigtable.admin.v2.Type value_type = 2; + * + * @return The valueType. + */ + com.google.bigtable.admin.v2.Type getValueType(); + + /** + * + * + *
    +     * The type of the values in a map.
    +     * 
    + * + * .google.bigtable.admin.v2.Type value_type = 2; + */ + com.google.bigtable.admin.v2.TypeOrBuilder getValueTypeOrBuilder(); + } + + /** + * + * + *
    +   * A mapping of keys to values of a given type.
    +   * Values of type `Map` are stored in a `Value.array_value` where each entry
    +   * is another `Value.array_value` with two elements (the key and the value,
    +   * in that order).
    +   * Normally encoded Map values won't have repeated keys, however, clients are
    +   * expected to handle the case in which they do. If the same key appears
    +   * multiple times, the _last_ value takes precedence.
    +   * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Map} + */ + public static final class Map extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Map) + MapOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Map.newBuilder() to construct. + private Map(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Map_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Map.class, + com.google.bigtable.admin.v2.Type.Map.Builder.class); + } + + private int bitField0_; + public static final int KEY_TYPE_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.Type keyType_; + + /** + * + * + *
    +     * The type of a map key.
    +     * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +     * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + * + * @return Whether the keyType field is set. + */ + @java.lang.Override + public boolean hasKeyType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * The type of a map key.
    +     * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +     * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + * + * @return The keyType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type getKeyType() { + return keyType_ == null ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : keyType_; + } + + /** + * + * + *
    +     * The type of a map key.
    +     * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +     * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.TypeOrBuilder getKeyTypeOrBuilder() { + return keyType_ == null ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : keyType_; + } + + public static final int VALUE_TYPE_FIELD_NUMBER = 2; + private com.google.bigtable.admin.v2.Type valueType_; + + /** + * + * + *
    +     * The type of the values in a map.
    +     * 
    + * + * .google.bigtable.admin.v2.Type value_type = 2; + * + * @return Whether the valueType field is set. + */ + @java.lang.Override + public boolean hasValueType() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +     * The type of the values in a map.
    +     * 
    + * + * .google.bigtable.admin.v2.Type value_type = 2; + * + * @return The valueType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type getValueType() { + return valueType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : valueType_; + } + + /** + * + * + *
    +     * The type of the values in a map.
    +     * 
    + * + * .google.bigtable.admin.v2.Type value_type = 2; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.TypeOrBuilder getValueTypeOrBuilder() { + return valueType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : valueType_; + } + + 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, getKeyType()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getValueType()); + } + 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, getKeyType()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getValueType()); + } + 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.Map)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Map other = (com.google.bigtable.admin.v2.Type.Map) obj; + + if (hasKeyType() != other.hasKeyType()) return false; + if (hasKeyType()) { + if (!getKeyType().equals(other.getKeyType())) return false; + } + if (hasValueType() != other.hasValueType()) return false; + if (hasValueType()) { + if (!getValueType().equals(other.getValueType())) 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 (hasKeyType()) { + hash = (37 * hash) + KEY_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getKeyType().hashCode(); + } + if (hasValueType()) { + hash = (37 * hash) + VALUE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getValueType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.Type.Map parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Map 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.Map parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Map 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.Map parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Map 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.Map 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.Map 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.Map 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.Map 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.Map 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.Map 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.Map prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * A mapping of keys to values of a given type.
    +     * Values of type `Map` are stored in a `Value.array_value` where each entry
    +     * is another `Value.array_value` with two elements (the key and the value,
    +     * in that order).
    +     * Normally encoded Map values won't have repeated keys, however, clients are
    +     * expected to handle the case in which they do. If the same key appears
    +     * multiple times, the _last_ value takes precedence.
    +     * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Map} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Map) + com.google.bigtable.admin.v2.Type.MapOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Map_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Map.class, + com.google.bigtable.admin.v2.Type.Map.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.Type.Map.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getKeyTypeFieldBuilder(); + getValueTypeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyType_ = null; + if (keyTypeBuilder_ != null) { + keyTypeBuilder_.dispose(); + keyTypeBuilder_ = null; + } + valueType_ = null; + if (valueTypeBuilder_ != null) { + valueTypeBuilder_.dispose(); + valueTypeBuilder_ = 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_Map_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Map getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Map build() { + com.google.bigtable.admin.v2.Type.Map result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Map buildPartial() { + com.google.bigtable.admin.v2.Type.Map result = + new com.google.bigtable.admin.v2.Type.Map(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.Type.Map result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keyType_ = keyTypeBuilder_ == null ? keyType_ : keyTypeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.valueType_ = valueTypeBuilder_ == null ? valueType_ : valueTypeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Map) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Map) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Map other) { + if (other == com.google.bigtable.admin.v2.Type.Map.getDefaultInstance()) return this; + if (other.hasKeyType()) { + mergeKeyType(other.getKeyType()); + } + if (other.hasValueType()) { + mergeValueType(other.getValueType()); + } + 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(getKeyTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getValueTypeFieldBuilder().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.Type keyType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder> + keyTypeBuilder_; + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + * + * @return Whether the keyType field is set. + */ + public boolean hasKeyType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + * + * @return The keyType. + */ + public com.google.bigtable.admin.v2.Type getKeyType() { + if (keyTypeBuilder_ == null) { + return keyType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : keyType_; + } else { + return keyTypeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + */ + public Builder setKeyType(com.google.bigtable.admin.v2.Type value) { + if (keyTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keyType_ = value; + } else { + keyTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + */ + public Builder setKeyType(com.google.bigtable.admin.v2.Type.Builder builderForValue) { + if (keyTypeBuilder_ == null) { + keyType_ = builderForValue.build(); + } else { + keyTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + */ + public Builder mergeKeyType(com.google.bigtable.admin.v2.Type value) { + if (keyTypeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && keyType_ != null + && keyType_ != com.google.bigtable.admin.v2.Type.getDefaultInstance()) { + getKeyTypeBuilder().mergeFrom(value); + } else { + keyType_ = value; + } + } else { + keyTypeBuilder_.mergeFrom(value); + } + if (keyType_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + */ + public Builder clearKeyType() { + bitField0_ = (bitField0_ & ~0x00000001); + keyType_ = null; + if (keyTypeBuilder_ != null) { + keyTypeBuilder_.dispose(); + keyTypeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + */ + public com.google.bigtable.admin.v2.Type.Builder getKeyTypeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getKeyTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + */ + public com.google.bigtable.admin.v2.TypeOrBuilder getKeyTypeOrBuilder() { + if (keyTypeBuilder_ != null) { + return keyTypeBuilder_.getMessageOrBuilder(); + } else { + return keyType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : keyType_; + } + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.admin.v2.Type key_type = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder> + getKeyTypeFieldBuilder() { + if (keyTypeBuilder_ == null) { + keyTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder>( + getKeyType(), getParentForChildren(), isClean()); + keyType_ = null; + } + return keyTypeBuilder_; + } + + private com.google.bigtable.admin.v2.Type valueType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder> + valueTypeBuilder_; + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.admin.v2.Type value_type = 2; + * + * @return Whether the valueType field is set. + */ + public boolean hasValueType() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.admin.v2.Type value_type = 2; + * + * @return The valueType. + */ + public com.google.bigtable.admin.v2.Type getValueType() { + if (valueTypeBuilder_ == null) { + return valueType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : valueType_; + } else { + return valueTypeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.admin.v2.Type value_type = 2; + */ + public Builder setValueType(com.google.bigtable.admin.v2.Type value) { + if (valueTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + } else { + valueTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.admin.v2.Type value_type = 2; + */ + public Builder setValueType(com.google.bigtable.admin.v2.Type.Builder builderForValue) { + if (valueTypeBuilder_ == null) { + valueType_ = builderForValue.build(); + } else { + valueTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.admin.v2.Type value_type = 2; + */ + public Builder mergeValueType(com.google.bigtable.admin.v2.Type value) { + if (valueTypeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && valueType_ != null + && valueType_ != com.google.bigtable.admin.v2.Type.getDefaultInstance()) { + getValueTypeBuilder().mergeFrom(value); + } else { + valueType_ = value; + } + } else { + valueTypeBuilder_.mergeFrom(value); + } + if (valueType_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.admin.v2.Type value_type = 2; + */ + public Builder clearValueType() { + bitField0_ = (bitField0_ & ~0x00000002); + valueType_ = null; + if (valueTypeBuilder_ != null) { + valueTypeBuilder_.dispose(); + valueTypeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.admin.v2.Type value_type = 2; + */ + public com.google.bigtable.admin.v2.Type.Builder getValueTypeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getValueTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.admin.v2.Type value_type = 2; + */ + public com.google.bigtable.admin.v2.TypeOrBuilder getValueTypeOrBuilder() { + if (valueTypeBuilder_ != null) { + return valueTypeBuilder_.getMessageOrBuilder(); + } else { + return valueType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : valueType_; + } + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.admin.v2.Type value_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> + getValueTypeFieldBuilder() { + if (valueTypeBuilder_ == null) { + valueTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder>( + getValueType(), getParentForChildren(), isClean()); + valueType_ = null; + } + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Map) + private static final com.google.bigtable.admin.v2.Type.Map DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Map(); + } + + public static com.google.bigtable.admin.v2.Type.Map getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Map 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.Map getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AggregateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Aggregate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Type of the inputs that are accumulated by this `Aggregate`, which must
    +     * specify a full encoding.
    +     * Use `AddInput` mutations to accumulate new inputs.
    +     * 
    + * + * .google.bigtable.admin.v2.Type input_type = 1; + * + * @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.
    +     * Use `AddInput` mutations to accumulate new inputs.
    +     * 
    + * + * .google.bigtable.admin.v2.Type input_type = 1; + * + * @return The inputType. + */ + com.google.bigtable.admin.v2.Type getInputType(); + + /** + * + * + *
    +     * Type of the inputs that are accumulated by this `Aggregate`, which must
    +     * specify a full encoding.
    +     * Use `AddInput` mutations to accumulate new inputs.
    +     * 
    + * + * .google.bigtable.admin.v2.Type input_type = 1; + */ + com.google.bigtable.admin.v2.TypeOrBuilder getInputTypeOrBuilder(); + + /** + * + * + *
    +     * 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.
    +     * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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.
    +     * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateType. + */ + com.google.bigtable.admin.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.
    +     * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.bigtable.admin.v2.TypeOrBuilder getStateTypeOrBuilder(); + + /** + * + * + *
    +     * Sum aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + * + * @return Whether the sum field is set. + */ + boolean hasSum(); + + /** + * + * + *
    +     * Sum aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + * + * @return The sum. + */ + com.google.bigtable.admin.v2.Type.Aggregate.Sum getSum(); + + /** + * + * + *
    +     * Sum aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + */ + com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder(); + + /** + * + * + *
    +     * HyperLogLogPlusPlusUniqueCount aggregator.
    +     * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + * + * @return Whether the hllppUniqueCount field is set. + */ + boolean hasHllppUniqueCount(); + + /** + * + * + *
    +     * HyperLogLogPlusPlusUniqueCount aggregator.
    +     * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + * + * @return The hllppUniqueCount. + */ + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + getHllppUniqueCount(); + + /** + * + * + *
    +     * HyperLogLogPlusPlusUniqueCount aggregator.
    +     * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder + getHllppUniqueCountOrBuilder(); + + /** + * + * + *
    +     * Max aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + * + * @return Whether the max field is set. + */ + boolean hasMax(); + + /** + * + * + *
    +     * Max aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + * + * @return The max. + */ + com.google.bigtable.admin.v2.Type.Aggregate.Max getMax(); + + /** + * + * + *
    +     * Max aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + */ + com.google.bigtable.admin.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder(); + + /** + * + * + *
    +     * Min aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + * + * @return Whether the min field is set. + */ + boolean hasMin(); + + /** + * + * + *
    +     * Min aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + * + * @return The min. + */ + com.google.bigtable.admin.v2.Type.Aggregate.Min getMin(); + + /** + * + * + *
    +     * Min aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + */ + com.google.bigtable.admin.v2.Type.Aggregate.MinOrBuilder getMinOrBuilder(); + + com.google.bigtable.admin.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` .
    +   * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate} + */ + public static final class Aggregate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Aggregate) + AggregateOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Aggregate.newBuilder() to construct. + private Aggregate(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Aggregate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Aggregate.class, + com.google.bigtable.admin.v2.Type.Aggregate.Builder.class); + } + + public interface SumOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Aggregate.Sum) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +     * Computes the sum of the input values.
    +     * Allowed input: `Int64`
    +     * State: same as input
    +     * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.Sum} + */ + public static final class Sum extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Aggregate.Sum) + SumOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Sum.newBuilder() to construct. + private Sum(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Aggregate_Sum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Aggregate.Sum.class, + com.google.bigtable.admin.v2.Type.Aggregate.Sum.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.Aggregate.Sum)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Aggregate.Sum other = + (com.google.bigtable.admin.v2.Type.Aggregate.Sum) 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.Aggregate.Sum parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.Sum 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.Aggregate.Sum parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.Sum 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.Aggregate.Sum parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.Sum 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.Aggregate.Sum 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.Aggregate.Sum 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.Aggregate.Sum 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.Aggregate.Sum 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.Aggregate.Sum 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.Aggregate.Sum 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.Aggregate.Sum 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; + } + + /** + * + * + *
    +       * Computes the sum of the input values.
    +       * Allowed input: `Int64`
    +       * State: same as input
    +       * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.Sum} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Aggregate.Sum) + com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Aggregate_Sum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Aggregate.Sum.class, + com.google.bigtable.admin.v2.Type.Aggregate.Sum.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.Type.Aggregate.Sum.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Aggregate_Sum_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Sum getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Sum build() { + com.google.bigtable.admin.v2.Type.Aggregate.Sum result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Sum buildPartial() { + com.google.bigtable.admin.v2.Type.Aggregate.Sum result = + new com.google.bigtable.admin.v2.Type.Aggregate.Sum(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.Aggregate.Sum) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Aggregate.Sum) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Aggregate.Sum other) { + if (other == com.google.bigtable.admin.v2.Type.Aggregate.Sum.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Aggregate.Sum) + private static final com.google.bigtable.admin.v2.Type.Aggregate.Sum DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Aggregate.Sum(); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.Sum getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Sum 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.Aggregate.Sum getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MaxOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Aggregate.Max) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +     * Computes the max of the input values.
    +     * Allowed input: `Int64`
    +     * State: same as input
    +     * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.Max} + */ + public static final class Max extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Aggregate.Max) + MaxOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Max.newBuilder() to construct. + private Max(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Aggregate_Max_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Aggregate.Max.class, + com.google.bigtable.admin.v2.Type.Aggregate.Max.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.Aggregate.Max)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Aggregate.Max other = + (com.google.bigtable.admin.v2.Type.Aggregate.Max) 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.Aggregate.Max parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.Max 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.Aggregate.Max parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.Max 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.Aggregate.Max parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.Max 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.Aggregate.Max 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.Aggregate.Max 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.Aggregate.Max 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.Aggregate.Max 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.Aggregate.Max 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.Aggregate.Max 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.Aggregate.Max 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; + } + + /** + * + * + *
    +       * Computes the max of the input values.
    +       * Allowed input: `Int64`
    +       * State: same as input
    +       * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.Max} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Aggregate.Max) + com.google.bigtable.admin.v2.Type.Aggregate.MaxOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Aggregate_Max_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Aggregate.Max.class, + com.google.bigtable.admin.v2.Type.Aggregate.Max.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.Type.Aggregate.Max.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Aggregate_Max_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Max getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Aggregate.Max.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Max build() { + com.google.bigtable.admin.v2.Type.Aggregate.Max result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Max buildPartial() { + com.google.bigtable.admin.v2.Type.Aggregate.Max result = + new com.google.bigtable.admin.v2.Type.Aggregate.Max(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.Aggregate.Max) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Aggregate.Max) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Aggregate.Max other) { + if (other == com.google.bigtable.admin.v2.Type.Aggregate.Max.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Aggregate.Max) + private static final com.google.bigtable.admin.v2.Type.Aggregate.Max DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Aggregate.Max(); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.Max getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Max 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.Aggregate.Max getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MinOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Aggregate.Min) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +     * Computes the min of the input values.
    +     * Allowed input: `Int64`
    +     * State: same as input
    +     * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.Min} + */ + public static final class Min extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Aggregate.Min) + MinOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Min.newBuilder() to construct. + private Min(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Aggregate_Min_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Aggregate.Min.class, + com.google.bigtable.admin.v2.Type.Aggregate.Min.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.Aggregate.Min)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Aggregate.Min other = + (com.google.bigtable.admin.v2.Type.Aggregate.Min) 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.Aggregate.Min parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.Min 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.Aggregate.Min parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.Min 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.Aggregate.Min parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.Min 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.Aggregate.Min 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.Aggregate.Min 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.Aggregate.Min 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.Aggregate.Min 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.Aggregate.Min 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.Aggregate.Min 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.Aggregate.Min 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; + } + + /** + * + * + *
    +       * Computes the min of the input values.
    +       * Allowed input: `Int64`
    +       * State: same as input
    +       * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.Min} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Aggregate.Min) + com.google.bigtable.admin.v2.Type.Aggregate.MinOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Aggregate_Min_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Aggregate.Min.class, + com.google.bigtable.admin.v2.Type.Aggregate.Min.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.Type.Aggregate.Min.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Aggregate_Min_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Min getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Aggregate.Min.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Min build() { + com.google.bigtable.admin.v2.Type.Aggregate.Min result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Min buildPartial() { + com.google.bigtable.admin.v2.Type.Aggregate.Min result = + new com.google.bigtable.admin.v2.Type.Aggregate.Min(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.Aggregate.Min) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Aggregate.Min) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Aggregate.Min other) { + if (other == com.google.bigtable.admin.v2.Type.Aggregate.Min.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Aggregate.Min) + private static final com.google.bigtable.admin.v2.Type.Aggregate.Min DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Aggregate.Min(); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.Min getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Min 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.Aggregate.Min getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface HyperLogLogPlusPlusUniqueCountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +     * Computes an approximate unique count over the input values. When using
    +     * raw data as input, be careful to use a consistent encoding. Otherwise
    +     * the same value encoded differently could count more than once, or two
    +     * distinct values could count as identical.
    +     * Input: Any, or omit for Raw
    +     * State: TBD
    +     * Special state conversions: `Int64` (the unique count estimate)
    +     * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} + */ + public static final class HyperLogLogPlusPlusUniqueCount + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + HyperLogLogPlusPlusUniqueCountOrBuilder { + private static final long serialVersionUID = 0L; + + // Use HyperLogLogPlusPlusUniqueCount.newBuilder() to construct. + private HyperLogLogPlusPlusUniqueCount( + com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.class, + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.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.Aggregate.HyperLogLogPlusPlusUniqueCount)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount other = + (com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) 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.Aggregate.HyperLogLogPlusPlusUniqueCount + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + 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.Aggregate.HyperLogLogPlusPlusUniqueCount + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + 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.Aggregate.HyperLogLogPlusPlusUniqueCount + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + 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.Aggregate.HyperLogLogPlusPlusUniqueCount + 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.Aggregate.HyperLogLogPlusPlusUniqueCount + 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.Aggregate.HyperLogLogPlusPlusUniqueCount + 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.Aggregate.HyperLogLogPlusPlusUniqueCount + 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.Aggregate.HyperLogLogPlusPlusUniqueCount + 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.Aggregate.HyperLogLogPlusPlusUniqueCount + 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.Aggregate.HyperLogLogPlusPlusUniqueCount 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; + } + + /** + * + * + *
    +       * Computes an approximate unique count over the input values. When using
    +       * raw data as input, be careful to use a consistent encoding. Otherwise
    +       * the same value encoded differently could count more than once, or two
    +       * distinct values could count as identical.
    +       * Input: Any, or omit for Raw
    +       * State: TBD
    +       * Special state conversions: `Int64` (the unique count estimate)
    +       * 
    + * + * Protobuf type {@code + * google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.class, + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder + .class); + } + + // Construct using + // com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Aggregate_HyperLogLogPlusPlusUniqueCount_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount build() { + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + buildPartial() { + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount result = + new com.google.bigtable.admin.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); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.HyperLogLogPlusPlusUniqueCount) { + return mergeFrom( + (com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount other) { + if (other + == com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + private static final com.google.bigtable.admin.v2.Type.Aggregate + .HyperLogLogPlusPlusUniqueCount + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount(); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HyperLogLogPlusPlusUniqueCount 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.Aggregate.HyperLogLogPlusPlusUniqueCount + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int aggregatorCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object aggregator_; + + public enum AggregatorCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SUM(4), + HLLPP_UNIQUE_COUNT(5), + MAX(6), + MIN(7), + AGGREGATOR_NOT_SET(0); + private final int value; + + 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. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AggregatorCase valueOf(int value) { + return forNumber(value); + } + + public static AggregatorCase forNumber(int value) { + switch (value) { + case 4: + return SUM; + case 5: + return HLLPP_UNIQUE_COUNT; + case 6: + return MAX; + case 7: + return MIN; + case 0: + return AGGREGATOR_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AggregatorCase getAggregatorCase() { + return AggregatorCase.forNumber(aggregatorCase_); + } + + public static final int INPUT_TYPE_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.Type inputType_; + + /** + * + * + *
    +     * Type of the inputs that are accumulated by this `Aggregate`, which must
    +     * specify a full encoding.
    +     * Use `AddInput` mutations to accumulate new inputs.
    +     * 
    + * + * .google.bigtable.admin.v2.Type input_type = 1; + * + * @return Whether the inputType field is set. + */ + @java.lang.Override + public boolean hasInputType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * Type of the inputs that are accumulated by this `Aggregate`, which must
    +     * specify a full encoding.
    +     * Use `AddInput` mutations to accumulate new inputs.
    +     * 
    + * + * .google.bigtable.admin.v2.Type input_type = 1; + * + * @return The inputType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type getInputType() { + return inputType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : inputType_; + } + + /** + * + * + *
    +     * Type of the inputs that are accumulated by this `Aggregate`, which must
    +     * specify a full encoding.
    +     * Use `AddInput` mutations to accumulate new inputs.
    +     * 
    + * + * .google.bigtable.admin.v2.Type input_type = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.TypeOrBuilder getInputTypeOrBuilder() { + return inputType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : inputType_; + } + + public static final int STATE_TYPE_FIELD_NUMBER = 2; + private com.google.bigtable.admin.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.
    +     * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stateType field is set. + */ + @java.lang.Override + 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.
    +     * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type getStateType() { + return stateType_ == null + ? com.google.bigtable.admin.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.
    +     * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.TypeOrBuilder getStateTypeOrBuilder() { + return stateType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : stateType_; + } + + public static final int SUM_FIELD_NUMBER = 4; + + /** + * + * + *
    +     * Sum aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + * + * @return Whether the sum field is set. + */ + @java.lang.Override + public boolean hasSum() { + return aggregatorCase_ == 4; + } + + /** + * + * + *
    +     * Sum aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + * + * @return The sum. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Sum getSum() { + if (aggregatorCase_ == 4) { + return (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); + } + + /** + * + * + *
    +     * Sum aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder() { + if (aggregatorCase_ == 4) { + return (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); + } + + public static final int HLLPP_UNIQUE_COUNT_FIELD_NUMBER = 5; + + /** + * + * + *
    +     * HyperLogLogPlusPlusUniqueCount aggregator.
    +     * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + * + * @return Whether the hllppUniqueCount field is set. + */ + @java.lang.Override + public boolean hasHllppUniqueCount() { + return aggregatorCase_ == 5; + } + + /** + * + * + *
    +     * HyperLogLogPlusPlusUniqueCount aggregator.
    +     * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + * + * @return The hllppUniqueCount. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + getHllppUniqueCount() { + if (aggregatorCase_ == 5) { + return (com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance(); + } + + /** + * + * + *
    +     * HyperLogLogPlusPlusUniqueCount aggregator.
    +     * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder + getHllppUniqueCountOrBuilder() { + if (aggregatorCase_ == 5) { + return (com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance(); + } + + public static final int MAX_FIELD_NUMBER = 6; + + /** + * + * + *
    +     * Max aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + * + * @return Whether the max field is set. + */ + @java.lang.Override + public boolean hasMax() { + return aggregatorCase_ == 6; + } + + /** + * + * + *
    +     * Max aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + * + * @return The max. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Max getMax() { + if (aggregatorCase_ == 6) { + return (com.google.bigtable.admin.v2.Type.Aggregate.Max) aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.Max.getDefaultInstance(); + } + + /** + * + * + *
    +     * Max aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder() { + if (aggregatorCase_ == 6) { + return (com.google.bigtable.admin.v2.Type.Aggregate.Max) aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.Max.getDefaultInstance(); + } + + public static final int MIN_FIELD_NUMBER = 7; + + /** + * + * + *
    +     * Min aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + * + * @return Whether the min field is set. + */ + @java.lang.Override + public boolean hasMin() { + return aggregatorCase_ == 7; + } + + /** + * + * + *
    +     * Min aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + * + * @return The min. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Min getMin() { + if (aggregatorCase_ == 7) { + return (com.google.bigtable.admin.v2.Type.Aggregate.Min) aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.Min.getDefaultInstance(); + } + + /** + * + * + *
    +     * Min aggregator.
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.MinOrBuilder getMinOrBuilder() { + if (aggregatorCase_ == 7) { + return (com.google.bigtable.admin.v2.Type.Aggregate.Min) aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.Min.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInputType()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStateType()); + } + if (aggregatorCase_ == 4) { + output.writeMessage(4, (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_); + } + if (aggregatorCase_ == 5) { + output.writeMessage( + 5, + (com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + aggregator_); + } + if (aggregatorCase_ == 6) { + output.writeMessage(6, (com.google.bigtable.admin.v2.Type.Aggregate.Max) aggregator_); + } + if (aggregatorCase_ == 7) { + output.writeMessage(7, (com.google.bigtable.admin.v2.Type.Aggregate.Min) aggregator_); + } + 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, getInputType()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStateType()); + } + if (aggregatorCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_); + } + if (aggregatorCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + aggregator_); + } + if (aggregatorCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.bigtable.admin.v2.Type.Aggregate.Max) aggregator_); + } + if (aggregatorCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.bigtable.admin.v2.Type.Aggregate.Min) aggregator_); + } + 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.Aggregate)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Aggregate other = + (com.google.bigtable.admin.v2.Type.Aggregate) obj; + + if (hasInputType() != other.hasInputType()) return false; + if (hasInputType()) { + if (!getInputType().equals(other.getInputType())) return false; + } + if (hasStateType() != other.hasStateType()) return false; + if (hasStateType()) { + if (!getStateType().equals(other.getStateType())) return false; + } + if (!getAggregatorCase().equals(other.getAggregatorCase())) return false; + switch (aggregatorCase_) { + case 4: + if (!getSum().equals(other.getSum())) return false; + break; + case 5: + if (!getHllppUniqueCount().equals(other.getHllppUniqueCount())) return false; + break; + case 6: + if (!getMax().equals(other.getMax())) return false; + break; + case 7: + if (!getMin().equals(other.getMin())) 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 (hasInputType()) { + hash = (37 * hash) + INPUT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInputType().hashCode(); + } + if (hasStateType()) { + hash = (37 * hash) + STATE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getStateType().hashCode(); + } + switch (aggregatorCase_) { + case 4: + hash = (37 * hash) + SUM_FIELD_NUMBER; + hash = (53 * hash) + getSum().hashCode(); + break; + case 5: + hash = (37 * hash) + HLLPP_UNIQUE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getHllppUniqueCount().hashCode(); + break; + case 6: + hash = (37 * hash) + MAX_FIELD_NUMBER; + hash = (53 * hash) + getMax().hashCode(); + break; + case 7: + hash = (37 * hash) + MIN_FIELD_NUMBER; + hash = (53 * hash) + getMin().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.Type.Aggregate parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate 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.Aggregate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate 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.Aggregate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate 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.Aggregate 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.Aggregate 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.Aggregate 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.Aggregate 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.Aggregate 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.Aggregate 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.Aggregate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * A 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` .
    +     * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Aggregate) + com.google.bigtable.admin.v2.Type.AggregateOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Aggregate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Aggregate.class, + com.google.bigtable.admin.v2.Type.Aggregate.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.Type.Aggregate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputTypeFieldBuilder(); + getStateTypeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + inputType_ = null; + if (inputTypeBuilder_ != null) { + inputTypeBuilder_.dispose(); + inputTypeBuilder_ = null; + } + stateType_ = null; + if (stateTypeBuilder_ != null) { + stateTypeBuilder_.dispose(); + stateTypeBuilder_ = null; + } + if (sumBuilder_ != null) { + sumBuilder_.clear(); + } + if (hllppUniqueCountBuilder_ != null) { + hllppUniqueCountBuilder_.clear(); + } + if (maxBuilder_ != null) { + maxBuilder_.clear(); + } + if (minBuilder_ != null) { + minBuilder_.clear(); + } + aggregatorCase_ = 0; + aggregator_ = 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_Aggregate_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate build() { + com.google.bigtable.admin.v2.Type.Aggregate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate buildPartial() { + com.google.bigtable.admin.v2.Type.Aggregate result = + new com.google.bigtable.admin.v2.Type.Aggregate(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.Type.Aggregate result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.inputType_ = inputTypeBuilder_ == null ? inputType_ : inputTypeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.stateType_ = stateTypeBuilder_ == null ? stateType_ : stateTypeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.admin.v2.Type.Aggregate result) { + result.aggregatorCase_ = aggregatorCase_; + result.aggregator_ = this.aggregator_; + if (aggregatorCase_ == 4 && sumBuilder_ != null) { + result.aggregator_ = sumBuilder_.build(); + } + if (aggregatorCase_ == 5 && hllppUniqueCountBuilder_ != null) { + result.aggregator_ = hllppUniqueCountBuilder_.build(); + } + if (aggregatorCase_ == 6 && maxBuilder_ != null) { + result.aggregator_ = maxBuilder_.build(); + } + if (aggregatorCase_ == 7 && minBuilder_ != null) { + result.aggregator_ = minBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Aggregate) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Aggregate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Aggregate other) { + if (other == com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance()) return this; + if (other.hasInputType()) { + mergeInputType(other.getInputType()); + } + if (other.hasStateType()) { + mergeStateType(other.getStateType()); + } + switch (other.getAggregatorCase()) { + case SUM: + { + mergeSum(other.getSum()); + break; + } + case HLLPP_UNIQUE_COUNT: + { + mergeHllppUniqueCount(other.getHllppUniqueCount()); + break; + } + case MAX: + { + mergeMax(other.getMax()); + break; + } + case MIN: + { + mergeMin(other.getMin()); + break; + } + case AGGREGATOR_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(getInputTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStateTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + input.readMessage(getSumFieldBuilder().getBuilder(), extensionRegistry); + aggregatorCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + getHllppUniqueCountFieldBuilder().getBuilder(), extensionRegistry); + aggregatorCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(getMaxFieldBuilder().getBuilder(), extensionRegistry); + aggregatorCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage(getMinFieldBuilder().getBuilder(), extensionRegistry); + aggregatorCase_ = 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 aggregatorCase_ = 0; + private java.lang.Object aggregator_; + + public AggregatorCase getAggregatorCase() { + return AggregatorCase.forNumber(aggregatorCase_); + } + + public Builder clearAggregator() { + aggregatorCase_ = 0; + aggregator_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.bigtable.admin.v2.Type inputType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder> + inputTypeBuilder_; + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.admin.v2.Type input_type = 1; + * + * @return Whether the inputType field is set. + */ + public boolean hasInputType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.admin.v2.Type input_type = 1; + * + * @return The inputType. + */ + public com.google.bigtable.admin.v2.Type getInputType() { + if (inputTypeBuilder_ == null) { + return inputType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : inputType_; + } else { + return inputTypeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.admin.v2.Type input_type = 1; + */ + public Builder setInputType(com.google.bigtable.admin.v2.Type value) { + if (inputTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputType_ = value; + } else { + inputTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.admin.v2.Type input_type = 1; + */ + public Builder setInputType(com.google.bigtable.admin.v2.Type.Builder builderForValue) { + if (inputTypeBuilder_ == null) { + inputType_ = builderForValue.build(); + } else { + inputTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.admin.v2.Type input_type = 1; + */ + public Builder mergeInputType(com.google.bigtable.admin.v2.Type value) { + if (inputTypeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && inputType_ != null + && inputType_ != com.google.bigtable.admin.v2.Type.getDefaultInstance()) { + getInputTypeBuilder().mergeFrom(value); + } else { + inputType_ = value; + } + } else { + inputTypeBuilder_.mergeFrom(value); + } + if (inputType_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.admin.v2.Type input_type = 1; + */ + public Builder clearInputType() { + bitField0_ = (bitField0_ & ~0x00000001); + inputType_ = null; + if (inputTypeBuilder_ != null) { + inputTypeBuilder_.dispose(); + inputTypeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.admin.v2.Type input_type = 1; + */ + public com.google.bigtable.admin.v2.Type.Builder getInputTypeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getInputTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.admin.v2.Type input_type = 1; + */ + public com.google.bigtable.admin.v2.TypeOrBuilder getInputTypeOrBuilder() { + if (inputTypeBuilder_ != null) { + return inputTypeBuilder_.getMessageOrBuilder(); + } else { + return inputType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : inputType_; + } + } + + /** + * + * + *
            * Type of the inputs that are accumulated by this `Aggregate`, which must
            * specify a full encoding.
            * Use `AddInput` mutations to accumulate new inputs.
            * 
    * - * .google.bigtable.admin.v2.Type input_type = 1; + * .google.bigtable.admin.v2.Type input_type = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder> + getInputTypeFieldBuilder() { + if (inputTypeBuilder_ == null) { + inputTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder>( + getInputType(), getParentForChildren(), isClean()); + inputType_ = null; + } + return inputTypeBuilder_; + } + + private com.google.bigtable.admin.v2.Type stateType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.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.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stateType field is set. + */ + 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.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateType. + */ + public com.google.bigtable.admin.v2.Type getStateType() { + if (stateTypeBuilder_ == null) { + return stateType_ == null + ? com.google.bigtable.admin.v2.Type.getDefaultInstance() + : stateType_; + } else { + 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.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStateType(com.google.bigtable.admin.v2.Type value) { + if (stateTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stateType_ = value; + } else { + stateTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + 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.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStateType(com.google.bigtable.admin.v2.Type.Builder builderForValue) { + if (stateTypeBuilder_ == null) { + stateType_ = builderForValue.build(); + } else { + stateTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + 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.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStateType(com.google.bigtable.admin.v2.Type value) { + if (stateTypeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && stateType_ != null + && stateType_ != com.google.bigtable.admin.v2.Type.getDefaultInstance()) { + getStateTypeBuilder().mergeFrom(value); + } else { + stateType_ = value; + } + } else { + stateTypeBuilder_.mergeFrom(value); + } + if (stateType_ != null) { + bitField0_ |= 0x00000002; + 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.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStateType() { + bitField0_ = (bitField0_ & ~0x00000002); + stateType_ = null; + if (stateTypeBuilder_ != null) { + stateTypeBuilder_.dispose(); + stateTypeBuilder_ = null; + } + 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.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.bigtable.admin.v2.Type.Builder getStateTypeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStateTypeFieldBuilder().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.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.bigtable.admin.v2.TypeOrBuilder getStateTypeOrBuilder() { + if (stateTypeBuilder_ != null) { + return stateTypeBuilder_.getMessageOrBuilder(); + } else { + return stateType_ == null + ? com.google.bigtable.admin.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.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder> + getStateTypeFieldBuilder() { + if (stateTypeBuilder_ == null) { + stateTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder>( + getStateType(), getParentForChildren(), isClean()); + stateType_ = null; + } + return stateTypeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + 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_; + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + * + * @return Whether the sum field is set. + */ + @java.lang.Override + public boolean hasSum() { + return aggregatorCase_ == 4; + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + * + * @return The sum. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Sum getSum() { + if (sumBuilder_ == null) { + if (aggregatorCase_ == 4) { + return (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); + } else { + if (aggregatorCase_ == 4) { + return sumBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + */ + public Builder setSum(com.google.bigtable.admin.v2.Type.Aggregate.Sum value) { + if (sumBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregator_ = value; + onChanged(); + } else { + sumBuilder_.setMessage(value); + } + aggregatorCase_ = 4; + return this; + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + */ + public Builder setSum( + com.google.bigtable.admin.v2.Type.Aggregate.Sum.Builder builderForValue) { + if (sumBuilder_ == null) { + aggregator_ = builderForValue.build(); + onChanged(); + } else { + sumBuilder_.setMessage(builderForValue.build()); + } + aggregatorCase_ = 4; + return this; + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + */ + public Builder mergeSum(com.google.bigtable.admin.v2.Type.Aggregate.Sum value) { + if (sumBuilder_ == null) { + if (aggregatorCase_ == 4 + && aggregator_ + != com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance()) { + aggregator_ = + com.google.bigtable.admin.v2.Type.Aggregate.Sum.newBuilder( + (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregator_ = value; + } + onChanged(); + } else { + if (aggregatorCase_ == 4) { + sumBuilder_.mergeFrom(value); + } else { + sumBuilder_.setMessage(value); + } + } + aggregatorCase_ = 4; + return this; + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + */ + public Builder clearSum() { + if (sumBuilder_ == null) { + if (aggregatorCase_ == 4) { + aggregatorCase_ = 0; + aggregator_ = null; + onChanged(); + } + } else { + if (aggregatorCase_ == 4) { + aggregatorCase_ = 0; + aggregator_ = null; + } + sumBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + */ + public com.google.bigtable.admin.v2.Type.Aggregate.Sum.Builder getSumBuilder() { + return getSumFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder() { + if ((aggregatorCase_ == 4) && (sumBuilder_ != null)) { + return sumBuilder_.getMessageOrBuilder(); + } else { + if (aggregatorCase_ == 4) { + return (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + 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() { + if (sumBuilder_ == null) { + if (!(aggregatorCase_ == 4)) { + aggregator_ = com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); + } + sumBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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>( + (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_, + getParentForChildren(), + isClean()); + aggregator_ = null; + } + aggregatorCase_ = 4; + onChanged(); + return sumBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + 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_; + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + * + * @return Whether the hllppUniqueCount field is set. + */ + @java.lang.Override + public boolean hasHllppUniqueCount() { + return aggregatorCase_ == 5; + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + * + * @return The hllppUniqueCount. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + getHllppUniqueCount() { + if (hllppUniqueCountBuilder_ == null) { + if (aggregatorCase_ == 5) { + return (com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance(); + } else { + if (aggregatorCase_ == 5) { + return hllppUniqueCountBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + public Builder setHllppUniqueCount( + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount value) { + if (hllppUniqueCountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregator_ = value; + onChanged(); + } else { + hllppUniqueCountBuilder_.setMessage(value); + } + aggregatorCase_ = 5; + return this; + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + public Builder setHllppUniqueCount( + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder + builderForValue) { + if (hllppUniqueCountBuilder_ == null) { + aggregator_ = builderForValue.build(); + onChanged(); + } else { + hllppUniqueCountBuilder_.setMessage(builderForValue.build()); + } + aggregatorCase_ = 5; + return this; + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + public Builder mergeHllppUniqueCount( + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount value) { + if (hllppUniqueCountBuilder_ == null) { + if (aggregatorCase_ == 5 + && aggregator_ + != com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance()) { + aggregator_ = + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .newBuilder( + (com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + aggregator_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregator_ = value; + } + onChanged(); + } else { + if (aggregatorCase_ == 5) { + hllppUniqueCountBuilder_.mergeFrom(value); + } else { + hllppUniqueCountBuilder_.setMessage(value); + } + } + aggregatorCase_ = 5; + return this; + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + public Builder clearHllppUniqueCount() { + if (hllppUniqueCountBuilder_ == null) { + if (aggregatorCase_ == 5) { + aggregatorCase_ = 0; + aggregator_ = null; + onChanged(); + } + } else { + if (aggregatorCase_ == 5) { + aggregatorCase_ = 0; + aggregator_ = null; + } + hllppUniqueCountBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + public com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder + getHllppUniqueCountBuilder() { + return getHllppUniqueCountFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder + getHllppUniqueCountOrBuilder() { + if ((aggregatorCase_ == 5) && (hllppUniqueCountBuilder_ != null)) { + return hllppUniqueCountBuilder_.getMessageOrBuilder(); + } else { + if (aggregatorCase_ == 5) { + return (com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + 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() { + if (hllppUniqueCountBuilder_ == null) { + if (!(aggregatorCase_ == 5)) { + aggregator_ = + com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance(); + } + hllppUniqueCountBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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>( + (com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + aggregator_, + getParentForChildren(), + isClean()); + aggregator_ = null; + } + aggregatorCase_ = 5; + onChanged(); + return hllppUniqueCountBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + 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_; + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + * + * @return Whether the max field is set. + */ + @java.lang.Override + public boolean hasMax() { + return aggregatorCase_ == 6; + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + * + * @return The max. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Max getMax() { + if (maxBuilder_ == null) { + if (aggregatorCase_ == 6) { + return (com.google.bigtable.admin.v2.Type.Aggregate.Max) aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.Max.getDefaultInstance(); + } else { + if (aggregatorCase_ == 6) { + return maxBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Aggregate.Max.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + */ + public Builder setMax(com.google.bigtable.admin.v2.Type.Aggregate.Max value) { + if (maxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregator_ = value; + onChanged(); + } else { + maxBuilder_.setMessage(value); + } + aggregatorCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + */ + public Builder setMax( + com.google.bigtable.admin.v2.Type.Aggregate.Max.Builder builderForValue) { + if (maxBuilder_ == null) { + aggregator_ = builderForValue.build(); + onChanged(); + } else { + maxBuilder_.setMessage(builderForValue.build()); + } + aggregatorCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + */ + public Builder mergeMax(com.google.bigtable.admin.v2.Type.Aggregate.Max value) { + if (maxBuilder_ == null) { + if (aggregatorCase_ == 6 + && aggregator_ + != com.google.bigtable.admin.v2.Type.Aggregate.Max.getDefaultInstance()) { + aggregator_ = + com.google.bigtable.admin.v2.Type.Aggregate.Max.newBuilder( + (com.google.bigtable.admin.v2.Type.Aggregate.Max) aggregator_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregator_ = value; + } + onChanged(); + } else { + if (aggregatorCase_ == 6) { + maxBuilder_.mergeFrom(value); + } else { + maxBuilder_.setMessage(value); + } + } + aggregatorCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + */ + public Builder clearMax() { + if (maxBuilder_ == null) { + if (aggregatorCase_ == 6) { + aggregatorCase_ = 0; + aggregator_ = null; + onChanged(); + } + } else { + if (aggregatorCase_ == 6) { + aggregatorCase_ = 0; + aggregator_ = null; + } + maxBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + */ + public com.google.bigtable.admin.v2.Type.Aggregate.Max.Builder getMaxBuilder() { + return getMaxFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder() { + if ((aggregatorCase_ == 6) && (maxBuilder_ != null)) { + return maxBuilder_.getMessageOrBuilder(); + } else { + if (aggregatorCase_ == 6) { + return (com.google.bigtable.admin.v2.Type.Aggregate.Max) aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.Max.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + 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() { + if (maxBuilder_ == null) { + if (!(aggregatorCase_ == 6)) { + aggregator_ = com.google.bigtable.admin.v2.Type.Aggregate.Max.getDefaultInstance(); + } + maxBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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>( + (com.google.bigtable.admin.v2.Type.Aggregate.Max) aggregator_, + getParentForChildren(), + isClean()); + aggregator_ = null; + } + aggregatorCase_ = 6; + onChanged(); + return maxBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + 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_; + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + * + * @return Whether the min field is set. + */ + @java.lang.Override + public boolean hasMin() { + return aggregatorCase_ == 7; + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + * + * @return The min. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.Min getMin() { + if (minBuilder_ == null) { + if (aggregatorCase_ == 7) { + return (com.google.bigtable.admin.v2.Type.Aggregate.Min) aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.Min.getDefaultInstance(); + } else { + if (aggregatorCase_ == 7) { + return minBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Aggregate.Min.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + */ + public Builder setMin(com.google.bigtable.admin.v2.Type.Aggregate.Min value) { + if (minBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregator_ = value; + onChanged(); + } else { + minBuilder_.setMessage(value); + } + aggregatorCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + */ + public Builder setMin( + com.google.bigtable.admin.v2.Type.Aggregate.Min.Builder builderForValue) { + if (minBuilder_ == null) { + aggregator_ = builderForValue.build(); + onChanged(); + } else { + minBuilder_.setMessage(builderForValue.build()); + } + aggregatorCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + */ + public Builder mergeMin(com.google.bigtable.admin.v2.Type.Aggregate.Min value) { + if (minBuilder_ == null) { + if (aggregatorCase_ == 7 + && aggregator_ + != com.google.bigtable.admin.v2.Type.Aggregate.Min.getDefaultInstance()) { + aggregator_ = + com.google.bigtable.admin.v2.Type.Aggregate.Min.newBuilder( + (com.google.bigtable.admin.v2.Type.Aggregate.Min) aggregator_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregator_ = value; + } + onChanged(); + } else { + if (aggregatorCase_ == 7) { + minBuilder_.mergeFrom(value); + } else { + minBuilder_.setMessage(value); + } + } + aggregatorCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; */ - public com.google.bigtable.admin.v2.TypeOrBuilder getInputTypeOrBuilder() { - if (inputTypeBuilder_ != null) { - return inputTypeBuilder_.getMessageOrBuilder(); + public Builder clearMin() { + if (minBuilder_ == null) { + if (aggregatorCase_ == 7) { + aggregatorCase_ = 0; + aggregator_ = null; + onChanged(); + } } else { - return inputType_ == null - ? com.google.bigtable.admin.v2.Type.getDefaultInstance() - : inputType_; + if (aggregatorCase_ == 7) { + aggregatorCase_ = 0; + aggregator_ = null; + } + minBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + */ + public com.google.bigtable.admin.v2.Type.Aggregate.Min.Builder getMinBuilder() { + return getMinFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate.MinOrBuilder getMinOrBuilder() { + if ((aggregatorCase_ == 7) && (minBuilder_ != null)) { + return minBuilder_.getMessageOrBuilder(); + } else { + if (aggregatorCase_ == 7) { + return (com.google.bigtable.admin.v2.Type.Aggregate.Min) aggregator_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.Min.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + 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() { + if (minBuilder_ == null) { + if (!(aggregatorCase_ == 7)) { + aggregator_ = com.google.bigtable.admin.v2.Type.Aggregate.Min.getDefaultInstance(); + } + minBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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>( + (com.google.bigtable.admin.v2.Type.Aggregate.Min) aggregator_, + getParentForChildren(), + isClean()); + aggregator_ = null; } + aggregatorCase_ = 7; + onChanged(); + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Aggregate) + private static final com.google.bigtable.admin.v2.Type.Aggregate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Aggregate(); + } + + public static com.google.bigtable.admin.v2.Type.Aggregate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Aggregate 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.Aggregate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BYTES_TYPE(1), + STRING_TYPE(2), + INT64_TYPE(5), + FLOAT32_TYPE(12), + FLOAT64_TYPE(9), + BOOL_TYPE(8), + TIMESTAMP_TYPE(10), + DATE_TYPE(11), + AGGREGATE_TYPE(6), + 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. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 1: + return BYTES_TYPE; + case 2: + return STRING_TYPE; + case 5: + return INT64_TYPE; + case 12: + return FLOAT32_TYPE; + case 9: + return FLOAT64_TYPE; + case 8: + return BOOL_TYPE; + case 10: + return TIMESTAMP_TYPE; + case 11: + return DATE_TYPE; + case 6: + return AGGREGATE_TYPE; + case 7: + return STRUCT_TYPE; + case 3: + 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: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public static final int BYTES_TYPE_FIELD_NUMBER = 1; + + /** + * + * + *
    +   * Bytes
    +   * 
    + * + * .google.bigtable.admin.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.admin.v2.Type.Bytes bytes_type = 1; + * + * @return The bytesType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Bytes getBytesType() { + if (kindCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Bytes) kind_; + } + return com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); + } + + /** + * + * + *
    +   * Bytes
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { + if (kindCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Bytes) kind_; + } + return com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); + } + + public static final int STRING_TYPE_FIELD_NUMBER = 2; + + /** + * + * + *
    +   * String
    +   * 
    + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + * + * @return Whether the stringType field is set. + */ + @java.lang.Override + public boolean hasStringType() { + return kindCase_ == 2; + } + + /** + * + * + *
    +   * String
    +   * 
    + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + * + * @return The stringType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.String getStringType() { + if (kindCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.String) kind_; + } + return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); + } + + /** + * + * + *
    +   * 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) { + return (com.google.bigtable.admin.v2.Type.String) kind_; + } + return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); + } + + public static final int INT64_TYPE_FIELD_NUMBER = 5; + + /** + * + * + *
    +   * Int64
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * + * @return Whether the int64Type field is set. + */ + @java.lang.Override + public boolean hasInt64Type() { + return kindCase_ == 5; + } + + /** + * + * + *
    +   * Int64
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * + * @return The int64Type. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64 getInt64Type() { + if (kindCase_ == 5) { + return (com.google.bigtable.admin.v2.Type.Int64) kind_; + } + return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); + } + + /** + * + * + *
    +   * Int64
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64OrBuilder getInt64TypeOrBuilder() { + if (kindCase_ == 5) { + return (com.google.bigtable.admin.v2.Type.Int64) kind_; + } + return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); + } + + public static final int FLOAT32_TYPE_FIELD_NUMBER = 12; + + /** + * + * + *
    +   * Float32
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * + * @return Whether the float32Type field is set. + */ + @java.lang.Override + public boolean hasFloat32Type() { + return kindCase_ == 12; + } + + /** + * + * + *
    +   * Float32
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * + * @return The float32Type. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Float32 getFloat32Type() { + if (kindCase_ == 12) { + return (com.google.bigtable.admin.v2.Type.Float32) kind_; + } + return com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); + } + + /** + * + * + *
    +   * Float32
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Float32OrBuilder getFloat32TypeOrBuilder() { + if (kindCase_ == 12) { + return (com.google.bigtable.admin.v2.Type.Float32) kind_; + } + return com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); + } + + public static final int FLOAT64_TYPE_FIELD_NUMBER = 9; + + /** + * + * + *
    +   * Float64
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * + * @return Whether the float64Type field is set. + */ + @java.lang.Override + public boolean hasFloat64Type() { + return kindCase_ == 9; + } + + /** + * + * + *
    +   * Float64
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * + * @return The float64Type. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Float64 getFloat64Type() { + if (kindCase_ == 9) { + return (com.google.bigtable.admin.v2.Type.Float64) kind_; + } + return com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); + } + + /** + * + * + *
    +   * Float64
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Float64OrBuilder getFloat64TypeOrBuilder() { + if (kindCase_ == 9) { + return (com.google.bigtable.admin.v2.Type.Float64) kind_; + } + return com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); + } + + public static final int BOOL_TYPE_FIELD_NUMBER = 8; + + /** + * + * + *
    +   * Bool
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * + * @return Whether the boolType field is set. + */ + @java.lang.Override + public boolean hasBoolType() { + return kindCase_ == 8; + } + + /** + * + * + *
    +   * Bool
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * + * @return The boolType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Bool getBoolType() { + if (kindCase_ == 8) { + return (com.google.bigtable.admin.v2.Type.Bool) kind_; + } + return com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); + } + + /** + * + * + *
    +   * Bool
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.BoolOrBuilder getBoolTypeOrBuilder() { + if (kindCase_ == 8) { + return (com.google.bigtable.admin.v2.Type.Bool) kind_; + } + return com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); + } + + public static final int TIMESTAMP_TYPE_FIELD_NUMBER = 10; + + /** + * + * + *
    +   * Timestamp
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * + * @return Whether the timestampType field is set. + */ + @java.lang.Override + public boolean hasTimestampType() { + return kindCase_ == 10; + } + + /** + * + * + *
    +   * Timestamp
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * + * @return The timestampType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Timestamp getTimestampType() { + if (kindCase_ == 10) { + return (com.google.bigtable.admin.v2.Type.Timestamp) kind_; + } + return com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); + } + + /** + * + * + *
    +   * Timestamp
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.TimestampOrBuilder getTimestampTypeOrBuilder() { + if (kindCase_ == 10) { + return (com.google.bigtable.admin.v2.Type.Timestamp) kind_; + } + return com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); + } + + public static final int DATE_TYPE_FIELD_NUMBER = 11; + + /** + * + * + *
    +   * Date
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + * + * @return Whether the dateType field is set. + */ + @java.lang.Override + public boolean hasDateType() { + return kindCase_ == 11; + } + + /** + * + * + *
    +   * Date
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + * + * @return The dateType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Date getDateType() { + if (kindCase_ == 11) { + return (com.google.bigtable.admin.v2.Type.Date) kind_; + } + return com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); + } + + /** + * + * + *
    +   * Date
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.DateOrBuilder getDateTypeOrBuilder() { + if (kindCase_ == 11) { + return (com.google.bigtable.admin.v2.Type.Date) kind_; + } + return com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); + } + + public static final int AGGREGATE_TYPE_FIELD_NUMBER = 6; + + /** + * + * + *
    +   * Aggregate
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * + * @return Whether the aggregateType field is set. + */ + @java.lang.Override + public boolean hasAggregateType() { + return kindCase_ == 6; + } + + /** + * + * + *
    +   * Aggregate
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * + * @return The aggregateType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Aggregate getAggregateType() { + if (kindCase_ == 6) { + return (com.google.bigtable.admin.v2.Type.Aggregate) kind_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); + } + + /** + * + * + *
    +   * Aggregate
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.AggregateOrBuilder getAggregateTypeOrBuilder() { + if (kindCase_ == 6) { + return (com.google.bigtable.admin.v2.Type.Aggregate) kind_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); + } + + public static final int STRUCT_TYPE_FIELD_NUMBER = 7; + + /** + * + * + *
    +   * Struct
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * + * @return Whether the structType field is set. + */ + @java.lang.Override + public boolean hasStructType() { + return kindCase_ == 7; + } + + /** + * + * + *
    +   * Struct
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * + * @return The structType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct getStructType() { + if (kindCase_ == 7) { + return (com.google.bigtable.admin.v2.Type.Struct) kind_; + } + return com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance(); + } + + /** + * + * + *
    +   * Struct
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.StructOrBuilder getStructTypeOrBuilder() { + if (kindCase_ == 7) { + return (com.google.bigtable.admin.v2.Type.Struct) kind_; + } + return com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance(); + } + + public static final int ARRAY_TYPE_FIELD_NUMBER = 3; + + /** + * + * + *
    +   * Array
    +   * 
    + * + * .google.bigtable.admin.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.admin.v2.Type.Array array_type = 3; + * + * @return The arrayType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Array getArrayType() { + if (kindCase_ == 3) { + return (com.google.bigtable.admin.v2.Type.Array) kind_; + } + return com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); + } + + /** + * + * + *
    +   * Array
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Array array_type = 3; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.ArrayOrBuilder getArrayTypeOrBuilder() { + if (kindCase_ == 3) { + return (com.google.bigtable.admin.v2.Type.Array) kind_; + } + return com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); + } + + public static final int MAP_TYPE_FIELD_NUMBER = 4; + + /** + * + * + *
    +   * Map
    +   * 
    + * + * .google.bigtable.admin.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.admin.v2.Type.Map map_type = 4; + * + * @return The mapType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Map getMapType() { + if (kindCase_ == 4) { + return (com.google.bigtable.admin.v2.Type.Map) kind_; + } + return com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); + } + + /** + * + * + *
    +   * Map
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Map map_type = 4; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.MapOrBuilder getMapTypeOrBuilder() { + if (kindCase_ == 4) { + return (com.google.bigtable.admin.v2.Type.Map) kind_; + } + 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 + 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 (kindCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.admin.v2.Type.Bytes) kind_); + } + if (kindCase_ == 2) { + output.writeMessage(2, (com.google.bigtable.admin.v2.Type.String) kind_); + } + if (kindCase_ == 3) { + output.writeMessage(3, (com.google.bigtable.admin.v2.Type.Array) kind_); + } + if (kindCase_ == 4) { + output.writeMessage(4, (com.google.bigtable.admin.v2.Type.Map) kind_); + } + if (kindCase_ == 5) { + output.writeMessage(5, (com.google.bigtable.admin.v2.Type.Int64) kind_); + } + if (kindCase_ == 6) { + output.writeMessage(6, (com.google.bigtable.admin.v2.Type.Aggregate) kind_); + } + if (kindCase_ == 7) { + output.writeMessage(7, (com.google.bigtable.admin.v2.Type.Struct) kind_); + } + if (kindCase_ == 8) { + output.writeMessage(8, (com.google.bigtable.admin.v2.Type.Bool) kind_); + } + if (kindCase_ == 9) { + output.writeMessage(9, (com.google.bigtable.admin.v2.Type.Float64) kind_); + } + if (kindCase_ == 10) { + output.writeMessage(10, (com.google.bigtable.admin.v2.Type.Timestamp) kind_); + } + if (kindCase_ == 11) { + output.writeMessage(11, (com.google.bigtable.admin.v2.Type.Date) kind_); + } + 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); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.admin.v2.Type.Bytes) kind_); + } + if (kindCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.admin.v2.Type.String) kind_); + } + if (kindCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.bigtable.admin.v2.Type.Array) kind_); + } + if (kindCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.bigtable.admin.v2.Type.Map) kind_); + } + if (kindCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.bigtable.admin.v2.Type.Int64) kind_); + } + if (kindCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.bigtable.admin.v2.Type.Aggregate) kind_); + } + if (kindCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.bigtable.admin.v2.Type.Struct) kind_); + } + if (kindCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.bigtable.admin.v2.Type.Bool) kind_); + } + if (kindCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.bigtable.admin.v2.Type.Float64) kind_); + } + if (kindCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.bigtable.admin.v2.Type.Timestamp) kind_); + } + if (kindCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.bigtable.admin.v2.Type.Date) kind_); + } + if (kindCase_ == 12) { + size += + 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; + } + + @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)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type other = (com.google.bigtable.admin.v2.Type) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getBytesType().equals(other.getBytesType())) return false; + break; + case 2: + if (!getStringType().equals(other.getStringType())) return false; + break; + case 5: + if (!getInt64Type().equals(other.getInt64Type())) return false; + break; + case 12: + if (!getFloat32Type().equals(other.getFloat32Type())) return false; + break; + case 9: + if (!getFloat64Type().equals(other.getFloat64Type())) return false; + break; + case 8: + if (!getBoolType().equals(other.getBoolType())) return false; + break; + case 10: + if (!getTimestampType().equals(other.getTimestampType())) return false; + break; + case 11: + if (!getDateType().equals(other.getDateType())) return false; + break; + case 6: + if (!getAggregateType().equals(other.getAggregateType())) return false; + break; + case 7: + if (!getStructType().equals(other.getStructType())) return false; + break; + case 3: + if (!getArrayType().equals(other.getArrayType())) return false; + break; + 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: + } + 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 (kindCase_) { + case 1: + hash = (37 * hash) + BYTES_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getBytesType().hashCode(); + break; + case 2: + hash = (37 * hash) + STRING_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getStringType().hashCode(); + break; + case 5: + hash = (37 * hash) + INT64_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInt64Type().hashCode(); + break; + case 12: + hash = (37 * hash) + FLOAT32_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getFloat32Type().hashCode(); + break; + case 9: + hash = (37 * hash) + FLOAT64_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getFloat64Type().hashCode(); + break; + case 8: + hash = (37 * hash) + BOOL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getBoolType().hashCode(); + break; + case 10: + hash = (37 * hash) + TIMESTAMP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getTimestampType().hashCode(); + break; + case 11: + hash = (37 * hash) + DATE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getDateType().hashCode(); + break; + case 6: + hash = (37 * hash) + AGGREGATE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAggregateType().hashCode(); + break; + case 7: + hash = (37 * hash) + STRUCT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getStructType().hashCode(); + break; + case 3: + hash = (37 * hash) + ARRAY_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getArrayType().hashCode(); + break; + case 4: + 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.admin.v2.Type parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.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.admin.v2.Type parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.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.admin.v2.Type parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.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.admin.v2.Type 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 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 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 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 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 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 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; + } + + /** + * + * + *
    +   * `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.admin.v2.Type} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type) + com.google.bigtable.admin.v2.TypeOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.class, + com.google.bigtable.admin.v2.Type.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.Type.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bytesTypeBuilder_ != null) { + bytesTypeBuilder_.clear(); } - /** - * - * - *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    -       * Use `AddInput` mutations to accumulate new inputs.
    -       * 
    - * - * .google.bigtable.admin.v2.Type input_type = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type, - com.google.bigtable.admin.v2.Type.Builder, - com.google.bigtable.admin.v2.TypeOrBuilder> - getInputTypeFieldBuilder() { - if (inputTypeBuilder_ == null) { - inputTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type, - com.google.bigtable.admin.v2.Type.Builder, - com.google.bigtable.admin.v2.TypeOrBuilder>( - getInputType(), getParentForChildren(), isClean()); - inputType_ = null; - } - return inputTypeBuilder_; + 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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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) { + 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; + } - private com.google.bigtable.admin.v2.Type stateType_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type, - com.google.bigtable.admin.v2.Type.Builder, - com.google.bigtable.admin.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.
    -       * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateType field is set. - */ - public boolean hasStateType() { - return ((bitField0_ & 0x00000002) != 0); + @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(); } - /** - * - * - *
    -       * 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.
    -       * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateType. - */ - public com.google.bigtable.admin.v2.Type getStateType() { - if (stateTypeBuilder_ == null) { - return stateType_ == null - ? com.google.bigtable.admin.v2.Type.getDefaultInstance() - : stateType_; - } else { - return stateTypeBuilder_.getMessage(); + 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 + case 106: + { + input.readMessage(getProtoTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 13; + break; + } // case 106 + case 114: + { + input.readMessage(getEnumTypeFieldBuilder().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_; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + 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
    +     * 
    + * + * .google.bigtable.admin.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.admin.v2.Type.Bytes bytes_type = 1; + * + * @return The bytesType. + */ + @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_; + } + 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(); } - /** - * - * - *
    -       * 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.
    -       * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStateType(com.google.bigtable.admin.v2.Type value) { - if (stateTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stateType_ = value; - } else { - stateTypeBuilder_.setMessage(value); + } + + /** + * + * + *
    +     * 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(); } - bitField0_ |= 0x00000002; + kind_ = value; + onChanged(); + } else { + bytesTypeBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
    +     * 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(); - return this; + } else { + bytesTypeBuilder_.setMessage(builderForValue.build()); } - /** - * - * - *
    -       * 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.
    -       * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStateType(com.google.bigtable.admin.v2.Type.Builder builderForValue) { - if (stateTypeBuilder_ == null) { - stateType_ = builderForValue.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 { - stateTypeBuilder_.setMessage(builderForValue.build()); + kind_ = value; } - bitField0_ |= 0x00000002; 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.
    -       * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStateType(com.google.bigtable.admin.v2.Type value) { - if (stateTypeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && stateType_ != null - && stateType_ != com.google.bigtable.admin.v2.Type.getDefaultInstance()) { - getStateTypeBuilder().mergeFrom(value); - } else { - stateType_ = value; - } + } else { + if (kindCase_ == 1) { + bytesTypeBuilder_.mergeFrom(value); } else { - stateTypeBuilder_.mergeFrom(value); + bytesTypeBuilder_.setMessage(value); } - if (stateType_ != null) { - bitField0_ |= 0x00000002; + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + */ + public Builder clearBytesType() { + if (bytesTypeBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; onChanged(); } - return this; + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + bytesTypeBuilder_.clear(); } - /** - * - * - *
    -       * 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.
    -       * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStateType() { - bitField0_ = (bitField0_ & ~0x00000002); - stateType_ = null; - if (stateTypeBuilder_ != null) { - stateTypeBuilder_.dispose(); - stateTypeBuilder_ = null; + return this; + } + + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + */ + public com.google.bigtable.admin.v2.Type.Bytes.Builder getBytesTypeBuilder() { + return getBytesTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + */ + @java.lang.Override + 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(); + } + } + + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 1; + onChanged(); + return bytesTypeBuilder_; + } + + 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_; + + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + * + * @return Whether the stringType field is set. + */ + @java.lang.Override + public boolean hasStringType() { + return kindCase_ == 2; + } + + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + * + * @return The stringType. + */ + @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_; + } + 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(); + } + } + + /** + * + * + *
    +     * 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(); - return this; + } else { + stringTypeBuilder_.setMessage(value); } - /** - * - * - *
    -       * 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.
    -       * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.bigtable.admin.v2.Type.Builder getStateTypeBuilder() { - bitField0_ |= 0x00000002; + kindCase_ = 2; + return this; + } + + /** + * + * + *
    +     * 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(); - return getStateTypeFieldBuilder().getBuilder(); + } else { + stringTypeBuilder_.setMessage(builderForValue.build()); } - /** - * - * - *
    -       * 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.
    -       * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.bigtable.admin.v2.TypeOrBuilder getStateTypeOrBuilder() { - if (stateTypeBuilder_ != null) { - return stateTypeBuilder_.getMessageOrBuilder(); + kindCase_ = 2; + return this; + } + + /** + * + * + *
    +     * 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 { - return stateType_ == null - ? com.google.bigtable.admin.v2.Type.getDefaultInstance() - : stateType_; + kind_ = value; } - } - /** - * - * - *
    -       * 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.
    -       * 
    - * - * - * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type, - com.google.bigtable.admin.v2.Type.Builder, - com.google.bigtable.admin.v2.TypeOrBuilder> - getStateTypeFieldBuilder() { - if (stateTypeBuilder_ == null) { - stateTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type, - com.google.bigtable.admin.v2.Type.Builder, - com.google.bigtable.admin.v2.TypeOrBuilder>( - getStateType(), getParentForChildren(), isClean()); - stateType_ = null; + onChanged(); + } else { + if (kindCase_ == 2) { + stringTypeBuilder_.mergeFrom(value); + } else { + stringTypeBuilder_.setMessage(value); } - return stateTypeBuilder_; } + kindCase_ = 2; + return this; + } - private com.google.protobuf.SingleFieldBuilderV3< - 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_; - /** - * - * - *
    -       * Sum aggregator.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - * - * @return Whether the sum field is set. - */ - @java.lang.Override - public boolean hasSum() { - return aggregatorCase_ == 4; + /** + * + * + *
    +     * 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(); } - /** - * - * - *
    -       * Sum aggregator.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - * - * @return The sum. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Aggregate.Sum getSum() { - if (sumBuilder_ == null) { - if (aggregatorCase_ == 4) { - return (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_; - } - return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); - } else { - if (aggregatorCase_ == 4) { - return sumBuilder_.getMessage(); - } - return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); + return this; + } + + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + */ + public com.google.bigtable.admin.v2.Type.String.Builder getStringTypeBuilder() { + return getStringTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * 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(); } - /** - * - * - *
    -       * Sum aggregator.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - */ - public Builder setSum(com.google.bigtable.admin.v2.Type.Aggregate.Sum value) { - if (sumBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - aggregator_ = value; - onChanged(); - } else { - sumBuilder_.setMessage(value); + } + + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + */ + 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(); } - aggregatorCase_ = 4; - return this; + 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_, + getParentForChildren(), + isClean()); + kind_ = null; } - /** - * - * - *
    -       * Sum aggregator.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - */ - public Builder setSum( - com.google.bigtable.admin.v2.Type.Aggregate.Sum.Builder builderForValue) { - if (sumBuilder_ == null) { - aggregator_ = builderForValue.build(); - onChanged(); - } else { - sumBuilder_.setMessage(builderForValue.build()); + kindCase_ = 2; + onChanged(); + return stringTypeBuilder_; + } + + 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_; + + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * + * @return Whether the int64Type field is set. + */ + @java.lang.Override + public boolean hasInt64Type() { + return kindCase_ == 5; + } + + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * + * @return The int64Type. + */ + @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_; } - aggregatorCase_ = 4; - return this; - } - /** - * - * - *
    -       * Sum aggregator.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - */ - public Builder mergeSum(com.google.bigtable.admin.v2.Type.Aggregate.Sum value) { - if (sumBuilder_ == null) { - if (aggregatorCase_ == 4 - && aggregator_ - != com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance()) { - aggregator_ = - com.google.bigtable.admin.v2.Type.Aggregate.Sum.newBuilder( - (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_) - .mergeFrom(value) - .buildPartial(); - } else { - aggregator_ = value; - } - onChanged(); - } else { - if (aggregatorCase_ == 4) { - sumBuilder_.mergeFrom(value); - } else { - sumBuilder_.setMessage(value); - } + return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); + } else { + if (kindCase_ == 5) { + return int64TypeBuilder_.getMessage(); } - aggregatorCase_ = 4; - return this; + return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); } - /** - * - * - *
    -       * Sum aggregator.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - */ - public Builder clearSum() { - if (sumBuilder_ == null) { - if (aggregatorCase_ == 4) { - aggregatorCase_ = 0; - aggregator_ = null; - onChanged(); - } - } else { - if (aggregatorCase_ == 4) { - aggregatorCase_ = 0; - aggregator_ = null; - } - sumBuilder_.clear(); + } + + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + */ + public Builder setInt64Type(com.google.bigtable.admin.v2.Type.Int64 value) { + if (int64TypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - return this; + kind_ = value; + onChanged(); + } else { + int64TypeBuilder_.setMessage(value); } - /** - * - * - *
    -       * Sum aggregator.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - */ - public com.google.bigtable.admin.v2.Type.Aggregate.Sum.Builder getSumBuilder() { - return getSumFieldBuilder().getBuilder(); + kindCase_ = 5; + return this; + } + + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + */ + public Builder setInt64Type(com.google.bigtable.admin.v2.Type.Int64.Builder builderForValue) { + if (int64TypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + int64TypeBuilder_.setMessage(builderForValue.build()); } - /** - * - * - *
    -       * Sum aggregator.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder() { - if ((aggregatorCase_ == 4) && (sumBuilder_ != null)) { - return sumBuilder_.getMessageOrBuilder(); + kindCase_ = 5; + return this; + } + + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + */ + 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.Int64.newBuilder( + (com.google.bigtable.admin.v2.Type.Int64) kind_) + .mergeFrom(value) + .buildPartial(); } else { - if (aggregatorCase_ == 4) { - return (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_; - } - return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); + kind_ = value; } - } - /** - * - * - *
    -       * Sum aggregator.
    -       * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - 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() { - if (sumBuilder_ == null) { - if (!(aggregatorCase_ == 4)) { - aggregator_ = com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); - } - sumBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - 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>( - (com.google.bigtable.admin.v2.Type.Aggregate.Sum) aggregator_, - getParentForChildren(), - isClean()); - aggregator_ = null; + onChanged(); + } else { + if (kindCase_ == 5) { + int64TypeBuilder_.mergeFrom(value); + } else { + int64TypeBuilder_.setMessage(value); } - aggregatorCase_ = 4; - onChanged(); - return sumBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); } + kindCase_ = 5; + return this; + } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + */ + public Builder clearInt64Type() { + if (int64TypeBuilder_ == null) { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + } + int64TypeBuilder_.clear(); } - - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Aggregate) + return this; } - // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Aggregate) - private static final com.google.bigtable.admin.v2.Type.Aggregate DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Aggregate(); + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + */ + public com.google.bigtable.admin.v2.Type.Int64.Builder getInt64TypeBuilder() { + return getInt64TypeFieldBuilder().getBuilder(); } - public static com.google.bigtable.admin.v2.Type.Aggregate getDefaultInstance() { - return DEFAULT_INSTANCE; + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64OrBuilder getInt64TypeOrBuilder() { + if ((kindCase_ == 5) && (int64TypeBuilder_ != null)) { + return int64TypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 5) { + return (com.google.bigtable.admin.v2.Type.Int64) kind_; + } + return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); + } } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Aggregate 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; + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 5; + onChanged(); + return int64TypeBuilder_; } + 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_; + + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * + * @return Whether the float32Type field is set. + */ @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public boolean hasFloat32Type() { + return kindCase_ == 12; } + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * + * @return The float32Type. + */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Aggregate getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + 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.Float32.getDefaultInstance(); + } else { + if (kindCase_ == 12) { + return float32TypeBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); + } } - } - - private int kindCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object kind_; - public enum KindCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - BYTES_TYPE(1), - STRING_TYPE(2), - INT64_TYPE(5), - AGGREGATE_TYPE(6), - KIND_NOT_SET(0); - private final int value; + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + */ + public Builder setFloat32Type(com.google.bigtable.admin.v2.Type.Float32 value) { + if (float32TypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + float32TypeBuilder_.setMessage(value); + } + kindCase_ = 12; + return this; + } - private KindCase(int value) { - this.value = value; + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + */ + public Builder setFloat32Type( + com.google.bigtable.admin.v2.Type.Float32.Builder builderForValue) { + if (float32TypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + float32TypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 12; + 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. + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; */ - @java.lang.Deprecated - public static KindCase valueOf(int value) { - return forNumber(value); + 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.Float32.newBuilder( + (com.google.bigtable.admin.v2.Type.Float32) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 12) { + float32TypeBuilder_.mergeFrom(value); + } else { + float32TypeBuilder_.setMessage(value); + } + } + kindCase_ = 12; + return this; } - public static KindCase forNumber(int value) { - switch (value) { - case 1: - return BYTES_TYPE; - case 2: - return STRING_TYPE; - case 5: - return INT64_TYPE; - case 6: - return AGGREGATE_TYPE; - case 0: - return KIND_NOT_SET; - default: - return null; + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + */ + public Builder clearFloat32Type() { + if (float32TypeBuilder_ == null) { + if (kindCase_ == 12) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 12) { + kindCase_ = 0; + kind_ = null; + } + float32TypeBuilder_.clear(); } + return this; } - public int getNumber() { - return this.value; + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + */ + public com.google.bigtable.admin.v2.Type.Float32.Builder getFloat32TypeBuilder() { + return getFloat32TypeFieldBuilder().getBuilder(); } - }; - - public KindCase getKindCase() { - return KindCase.forNumber(kindCase_); - } - public static final int BYTES_TYPE_FIELD_NUMBER = 1; - /** - * - * - *
    -   * Bytes
    -   * 
    - * - * .google.bigtable.admin.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.admin.v2.Type.Bytes bytes_type = 1; - * - * @return The bytesType. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Bytes getBytesType() { - if (kindCase_ == 1) { - return (com.google.bigtable.admin.v2.Type.Bytes) kind_; - } - return com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); - } - /** - * - * - *
    -   * Bytes
    -   * 
    - * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { - if (kindCase_ == 1) { - return (com.google.bigtable.admin.v2.Type.Bytes) kind_; + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Float32OrBuilder getFloat32TypeOrBuilder() { + if ((kindCase_ == 12) && (float32TypeBuilder_ != null)) { + return float32TypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 12) { + return (com.google.bigtable.admin.v2.Type.Float32) kind_; + } + return com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); + } } - return com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); - } - public static final int STRING_TYPE_FIELD_NUMBER = 2; - /** - * - * - *
    -   * String
    -   * 
    - * - * .google.bigtable.admin.v2.Type.String string_type = 2; - * - * @return Whether the stringType field is set. - */ - @java.lang.Override - public boolean hasStringType() { - return kindCase_ == 2; - } - /** - * - * - *
    -   * String
    -   * 
    - * - * .google.bigtable.admin.v2.Type.String string_type = 2; - * - * @return The stringType. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.String getStringType() { - if (kindCase_ == 2) { - return (com.google.bigtable.admin.v2.Type.String) kind_; - } - return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); - } - /** - * - * - *
    -   * 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) { - return (com.google.bigtable.admin.v2.Type.String) kind_; + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 12; + onChanged(); + return float32TypeBuilder_; } - return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); - } - public static final int INT64_TYPE_FIELD_NUMBER = 5; - /** - * - * - *
    -   * Int64
    -   * 
    - * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; - * - * @return Whether the int64Type field is set. - */ - @java.lang.Override - public boolean hasInt64Type() { - return kindCase_ == 5; - } - /** - * - * - *
    -   * Int64
    -   * 
    - * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; - * - * @return The int64Type. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64 getInt64Type() { - if (kindCase_ == 5) { - return (com.google.bigtable.admin.v2.Type.Int64) kind_; - } - return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); - } - /** - * - * - *
    -   * Int64
    -   * 
    - * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64OrBuilder getInt64TypeOrBuilder() { - if (kindCase_ == 5) { - return (com.google.bigtable.admin.v2.Type.Int64) kind_; - } - return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); - } + 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_; - public static final int AGGREGATE_TYPE_FIELD_NUMBER = 6; - /** - * - * - *
    -   * Aggregate
    -   * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; - * - * @return Whether the aggregateType field is set. - */ - @java.lang.Override - public boolean hasAggregateType() { - return kindCase_ == 6; - } - /** - * - * - *
    -   * Aggregate
    -   * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; - * - * @return The aggregateType. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Aggregate getAggregateType() { - if (kindCase_ == 6) { - return (com.google.bigtable.admin.v2.Type.Aggregate) kind_; + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * + * @return Whether the float64Type field is set. + */ + @java.lang.Override + public boolean hasFloat64Type() { + return kindCase_ == 9; } - return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); - } - /** - * - * - *
    -   * Aggregate
    -   * 
    - * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.AggregateOrBuilder getAggregateTypeOrBuilder() { - if (kindCase_ == 6) { - return (com.google.bigtable.admin.v2.Type.Aggregate) kind_; + + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * + * @return The float64Type. + */ + @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_; + } + return com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); + } else { + if (kindCase_ == 9) { + return float64TypeBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); + } } - return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); - } - private byte memoizedIsInitialized = -1; + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + */ + public Builder setFloat64Type(com.google.bigtable.admin.v2.Type.Float64 value) { + if (float64TypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + float64TypeBuilder_.setMessage(value); + } + kindCase_ = 9; + return this; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + */ + public Builder setFloat64Type( + com.google.bigtable.admin.v2.Type.Float64.Builder builderForValue) { + if (float64TypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + float64TypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 9; + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + */ + 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.Float64.newBuilder( + (com.google.bigtable.admin.v2.Type.Float64) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 9) { + float64TypeBuilder_.mergeFrom(value); + } else { + float64TypeBuilder_.setMessage(value); + } + } + kindCase_ = 9; + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (kindCase_ == 1) { - output.writeMessage(1, (com.google.bigtable.admin.v2.Type.Bytes) kind_); + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + */ + public Builder clearFloat64Type() { + if (float64TypeBuilder_ == null) { + if (kindCase_ == 9) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 9) { + kindCase_ = 0; + kind_ = null; + } + float64TypeBuilder_.clear(); + } + return this; } - if (kindCase_ == 2) { - output.writeMessage(2, (com.google.bigtable.admin.v2.Type.String) kind_); + + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + */ + public com.google.bigtable.admin.v2.Type.Float64.Builder getFloat64TypeBuilder() { + return getFloat64TypeFieldBuilder().getBuilder(); } - if (kindCase_ == 5) { - output.writeMessage(5, (com.google.bigtable.admin.v2.Type.Int64) kind_); + + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Float64OrBuilder getFloat64TypeOrBuilder() { + if ((kindCase_ == 9) && (float64TypeBuilder_ != null)) { + return float64TypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 9) { + return (com.google.bigtable.admin.v2.Type.Float64) kind_; + } + return com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); + } } - if (kindCase_ == 6) { - output.writeMessage(6, (com.google.bigtable.admin.v2.Type.Aggregate) kind_); + + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .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(); + } + 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_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 9; + onChanged(); + return float64TypeBuilder_; } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + 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_; - size = 0; - if (kindCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.bigtable.admin.v2.Type.Bytes) kind_); - } - if (kindCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.bigtable.admin.v2.Type.String) kind_); + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * + * @return Whether the boolType field is set. + */ + @java.lang.Override + public boolean hasBoolType() { + return kindCase_ == 8; } - if (kindCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.bigtable.admin.v2.Type.Int64) kind_); + + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * + * @return The boolType. + */ + @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_; + } + return com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); + } else { + if (kindCase_ == 8) { + return boolTypeBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); + } } - if (kindCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.bigtable.admin.v2.Type.Aggregate) kind_); + + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + */ + public Builder setBoolType(com.google.bigtable.admin.v2.Type.Bool value) { + if (boolTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + boolTypeBuilder_.setMessage(value); + } + kindCase_ = 8; + 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; + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + */ + public Builder setBoolType(com.google.bigtable.admin.v2.Type.Bool.Builder builderForValue) { + if (boolTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + boolTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 8; + return this; } - if (!(obj instanceof com.google.bigtable.admin.v2.Type)) { - return super.equals(obj); + + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + */ + 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.Bool.newBuilder( + (com.google.bigtable.admin.v2.Type.Bool) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 8) { + boolTypeBuilder_.mergeFrom(value); + } else { + boolTypeBuilder_.setMessage(value); + } + } + kindCase_ = 8; + return this; } - com.google.bigtable.admin.v2.Type other = (com.google.bigtable.admin.v2.Type) obj; - if (!getKindCase().equals(other.getKindCase())) return false; - switch (kindCase_) { - case 1: - if (!getBytesType().equals(other.getBytesType())) return false; - break; - case 2: - if (!getStringType().equals(other.getStringType())) return false; - break; - case 5: - if (!getInt64Type().equals(other.getInt64Type())) return false; - break; - case 6: - if (!getAggregateType().equals(other.getAggregateType())) return false; - break; - case 0: - default: + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + */ + public Builder clearBoolType() { + if (boolTypeBuilder_ == null) { + if (kindCase_ == 8) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 8) { + kindCase_ = 0; + kind_ = null; + } + boolTypeBuilder_.clear(); + } + 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(); - switch (kindCase_) { - case 1: - hash = (37 * hash) + BYTES_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getBytesType().hashCode(); - break; - case 2: - hash = (37 * hash) + STRING_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getStringType().hashCode(); - break; - case 5: - hash = (37 * hash) + INT64_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getInt64Type().hashCode(); - break; - case 6: - hash = (37 * hash) + AGGREGATE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAggregateType().hashCode(); - break; - case 0: - default: + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + */ + public com.google.bigtable.admin.v2.Type.Bool.Builder getBoolTypeBuilder() { + return getBoolTypeFieldBuilder().getBuilder(); } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.bigtable.admin.v2.Type parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.BoolOrBuilder getBoolTypeOrBuilder() { + if ((kindCase_ == 8) && (boolTypeBuilder_ != null)) { + return boolTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 8) { + return (com.google.bigtable.admin.v2.Type.Bool) kind_; + } + return com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); + } + } - public static com.google.bigtable.admin.v2.Type parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 8; + onChanged(); + return boolTypeBuilder_; + } - public static com.google.bigtable.admin.v2.Type parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + 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_; - public static com.google.bigtable.admin.v2.Type parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * + * @return Whether the timestampType field is set. + */ + @java.lang.Override + public boolean hasTimestampType() { + return kindCase_ == 10; + } - public static com.google.bigtable.admin.v2.Type parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * + * @return The timestampType. + */ + @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_; + } + return com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); + } else { + if (kindCase_ == 10) { + return timestampTypeBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); + } + } - public static com.google.bigtable.admin.v2.Type parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + */ + public Builder setTimestampType(com.google.bigtable.admin.v2.Type.Timestamp value) { + if (timestampTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + timestampTypeBuilder_.setMessage(value); + } + kindCase_ = 10; + return this; + } - 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); - } + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + */ + public Builder setTimestampType( + com.google.bigtable.admin.v2.Type.Timestamp.Builder builderForValue) { + if (timestampTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + timestampTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 10; + return this; + } - 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( - PARSER, input, extensionRegistry); - } + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + */ + 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.Timestamp.newBuilder( + (com.google.bigtable.admin.v2.Type.Timestamp) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 10) { + timestampTypeBuilder_.mergeFrom(value); + } else { + timestampTypeBuilder_.setMessage(value); + } + } + kindCase_ = 10; + return this; + } - 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); - } + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + */ + public Builder clearTimestampType() { + if (timestampTypeBuilder_ == null) { + if (kindCase_ == 10) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 10) { + kindCase_ = 0; + kind_ = null; + } + timestampTypeBuilder_.clear(); + } + return this; + } - 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( - PARSER, input, extensionRegistry); - } + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + */ + public com.google.bigtable.admin.v2.Type.Timestamp.Builder getTimestampTypeBuilder() { + return getTimestampTypeFieldBuilder().getBuilder(); + } - 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); - } + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.TimestampOrBuilder getTimestampTypeOrBuilder() { + if ((kindCase_ == 10) && (timestampTypeBuilder_ != null)) { + return timestampTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 10) { + return (com.google.bigtable.admin.v2.Type.Timestamp) kind_; + } + return com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); + } + } - 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( - PARSER, input, extensionRegistry); - } + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + */ + 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(); + } + 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_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 10; + onChanged(); + return timestampTypeBuilder_; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + 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_; - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + * + * @return Whether the dateType field is set. + */ + @java.lang.Override + public boolean hasDateType() { + return kindCase_ == 11; + } - public static Builder newBuilder(com.google.bigtable.admin.v2.Type prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + * + * @return The dateType. + */ + @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_; + } + return com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); + } else { + if (kindCase_ == 11) { + return dateTypeBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); + } + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + */ + public Builder setDateType(com.google.bigtable.admin.v2.Type.Date value) { + if (dateTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + dateTypeBuilder_.setMessage(value); + } + kindCase_ = 11; + return this; + } - @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.
    -   * This might involve composing a series of steps into an "encoding chain," for
    -   * example to convert from INT64 -> STRING -> raw bytes. In most cases, a "link"
    -   * in the encoding chain will be based an on existing GoogleSQL conversion
    -   * function like `CAST`.
    -   *
    -   * Each link in the encoding chain also defines the following properties:
    -   *  * Natural sort: 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 to a fixed-width STRING does *not*
    -   *       preserve sort order when dealing with negative numbers.
    -   *       INT64(1) > INT64(-1), but STRING("-00001") > STRING("00001).
    -   *     - The overall encoding chain has this property if *every* link does.
    -   *  * 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.
    -   *     - The overall encoding chain has this property if *any* link does.
    -   *  * Compatibility: Which other systems have matching encoding schemes? For
    -   *    example, does this encoding have a GoogleSQL equivalent? HBase? Java?
    -   * 
    - * - * Protobuf type {@code google.bigtable.admin.v2.Type} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type) - com.google.bigtable.admin.v2.TypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_descriptor; + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + */ + public Builder setDateType(com.google.bigtable.admin.v2.Type.Date.Builder builderForValue) { + if (dateTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + dateTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 11; + 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_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.class, - com.google.bigtable.admin.v2.Type.Builder.class); + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + */ + 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.Date.newBuilder( + (com.google.bigtable.admin.v2.Type.Date) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 11) { + dateTypeBuilder_.mergeFrom(value); + } else { + dateTypeBuilder_.setMessage(value); + } + } + kindCase_ = 11; + return this; } - // Construct using com.google.bigtable.admin.v2.Type.newBuilder() - private Builder() {} + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + */ + public Builder clearDateType() { + if (dateTypeBuilder_ == null) { + if (kindCase_ == 11) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 11) { + kindCase_ = 0; + kind_ = null; + } + dateTypeBuilder_.clear(); + } + return this; + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + */ + public com.google.bigtable.admin.v2.Type.Date.Builder getDateTypeBuilder() { + return getDateTypeFieldBuilder().getBuilder(); } + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + */ @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(); + public com.google.bigtable.admin.v2.Type.DateOrBuilder getDateTypeOrBuilder() { + if ((kindCase_ == 11) && (dateTypeBuilder_ != null)) { + return dateTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 11) { + return (com.google.bigtable.admin.v2.Type.Date) kind_; + } + return com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); } - if (aggregateTypeBuilder_ != null) { - aggregateTypeBuilder_.clear(); + } + + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + */ + 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(); + } + 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()); + kind_ = null; } - kindCase_ = 0; - kind_ = null; - return this; + kindCase_ = 11; + onChanged(); + return dateTypeBuilder_; + } + + 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_; + + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * + * @return Whether the aggregateType field is set. + */ + @java.lang.Override + public boolean hasAggregateType() { + return kindCase_ == 6; } + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * + * @return The aggregateType. + */ @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; + 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.Aggregate.getDefaultInstance(); + } else { + if (kindCase_ == 6) { + return aggregateTypeBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + */ + public Builder setAggregateType(com.google.bigtable.admin.v2.Type.Aggregate value) { + if (aggregateTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + aggregateTypeBuilder_.setMessage(value); + } + kindCase_ = 6; + return this; } - @java.lang.Override - public com.google.bigtable.admin.v2.Type getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.getDefaultInstance(); + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + */ + public Builder setAggregateType( + com.google.bigtable.admin.v2.Type.Aggregate.Builder builderForValue) { + if (aggregateTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + aggregateTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 6; + return this; } - @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); + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + */ + 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.Aggregate.newBuilder( + (com.google.bigtable.admin.v2.Type.Aggregate) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 6) { + aggregateTypeBuilder_.mergeFrom(value); + } else { + aggregateTypeBuilder_.setMessage(value); + } } - return result; + kindCase_ = 6; + return this; } - @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); + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + */ + public Builder clearAggregateType() { + if (aggregateTypeBuilder_ == null) { + if (kindCase_ == 6) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 6) { + kindCase_ = 0; + kind_ = null; + } + aggregateTypeBuilder_.clear(); } - buildPartialOneofs(result); - onBuilt(); - return result; + return this; } - private void buildPartial0(com.google.bigtable.admin.v2.Type result) { - int from_bitField0_ = bitField0_; + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + */ + public com.google.bigtable.admin.v2.Type.Aggregate.Builder getAggregateTypeBuilder() { + return getAggregateTypeFieldBuilder().getBuilder(); } - 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_ == 6 && aggregateTypeBuilder_ != null) { - result.kind_ = aggregateTypeBuilder_.build(); + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.AggregateOrBuilder getAggregateTypeOrBuilder() { + if ((kindCase_ == 6) && (aggregateTypeBuilder_ != null)) { + return aggregateTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 6) { + return (com.google.bigtable.admin.v2.Type.Aggregate) kind_; + } + return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); } } - @java.lang.Override - public Builder clone() { - return super.clone(); + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 6; + onChanged(); + return aggregateTypeBuilder_; } - @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.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Type.Struct, + com.google.bigtable.admin.v2.Type.Struct.Builder, + com.google.bigtable.admin.v2.Type.StructOrBuilder> + structTypeBuilder_; + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * + * @return Whether the structType field is set. + */ @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + public boolean hasStructType() { + return kindCase_ == 7; } + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * + * @return The structType. + */ @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + 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.Struct.getDefaultInstance(); + } else { + if (kindCase_ == 7) { + return structTypeBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Struct.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); + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + */ + public Builder setStructType(com.google.bigtable.admin.v2.Type.Struct value) { + if (structTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + structTypeBuilder_.setMessage(value); + } + kindCase_ = 7; + return this; } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + */ + public Builder setStructType(com.google.bigtable.admin.v2.Type.Struct.Builder builderForValue) { + if (structTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + structTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 7; + return this; } - @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); + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + */ + 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.Struct.newBuilder( + (com.google.bigtable.admin.v2.Type.Struct) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); } else { - super.mergeFrom(other); - return this; + if (kindCase_ == 7) { + structTypeBuilder_.mergeFrom(value); + } else { + structTypeBuilder_.setMessage(value); + } } + kindCase_ = 7; + 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 AGGREGATE_TYPE: - { - mergeAggregateType(other.getAggregateType()); - break; - } - case KIND_NOT_SET: - { - break; - } + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + */ + public Builder clearStructType() { + if (structTypeBuilder_ == null) { + if (kindCase_ == 7) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 7) { + kindCase_ = 0; + kind_ = null; + } + structTypeBuilder_.clear(); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + */ + public com.google.bigtable.admin.v2.Type.Struct.Builder getStructTypeBuilder() { + return getStructTypeFieldBuilder().getBuilder(); } + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + */ @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.admin.v2.Type.StructOrBuilder getStructTypeOrBuilder() { + if ((kindCase_ == 7) && (structTypeBuilder_ != null)) { + return structTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 7) { + return (com.google.bigtable.admin.v2.Type.Struct) kind_; + } + return com.google.bigtable.admin.v2.Type.Struct.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 42: - { - input.readMessage(getInt64TypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 5; - break; - } // case 42 - case 50: - { - input.readMessage(getAggregateTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 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 kindCase_ = 0; - private java.lang.Object kind_; - - public KindCase getKindCase() { - return KindCase.forNumber(kindCase_); } - public Builder clearKind() { - kindCase_ = 0; - kind_ = null; + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 7; onChanged(); - return this; + return structTypeBuilder_; } - private int bitField0_; - 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_; + com.google.bigtable.admin.v2.Type.Array, + com.google.bigtable.admin.v2.Type.Array.Builder, + com.google.bigtable.admin.v2.Type.ArrayOrBuilder> + arrayTypeBuilder_; + /** * * *
    -     * Bytes
    +     * Array
          * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Array array_type = 3; * - * @return Whether the bytesType field is set. + * @return Whether the arrayType field is set. */ @java.lang.Override - public boolean hasBytesType() { - return kindCase_ == 1; + public boolean hasArrayType() { + return kindCase_ == 3; } + /** * * *
    -     * Bytes
    +     * Array
          * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Array array_type = 3; * - * @return The bytesType. + * @return The arrayType. */ @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.Array getArrayType() { + if (arrayTypeBuilder_ == null) { + if (kindCase_ == 3) { + return (com.google.bigtable.admin.v2.Type.Array) kind_; } - return com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); } else { - if (kindCase_ == 1) { - return bytesTypeBuilder_.getMessage(); + if (kindCase_ == 3) { + return arrayTypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); } } + /** * * *
    -     * Bytes
    +     * Array
          * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Array array_type = 3; */ - public Builder setBytesType(com.google.bigtable.admin.v2.Type.Bytes value) { - if (bytesTypeBuilder_ == 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 { - bytesTypeBuilder_.setMessage(value); + arrayTypeBuilder_.setMessage(value); } - kindCase_ = 1; + kindCase_ = 3; return this; } + /** * * *
    -     * Bytes
    +     * Array
          * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Array array_type = 3; */ - public Builder setBytesType(com.google.bigtable.admin.v2.Type.Bytes.Builder builderForValue) { - if (bytesTypeBuilder_ == null) { + public Builder setArrayType(com.google.bigtable.admin.v2.Type.Array.Builder builderForValue) { + if (arrayTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - bytesTypeBuilder_.setMessage(builderForValue.build()); + arrayTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 1; + kindCase_ = 3; return this; } + /** * * *
    -     * Bytes
    +     * Array
          * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Array array_type = 3; */ - 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 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.Bytes.newBuilder( - (com.google.bigtable.admin.v2.Type.Bytes) kind_) + com.google.bigtable.admin.v2.Type.Array.newBuilder( + (com.google.bigtable.admin.v2.Type.Array) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -9427,205 +29406,213 @@ public Builder mergeBytesType(com.google.bigtable.admin.v2.Type.Bytes value) { } onChanged(); } else { - if (kindCase_ == 1) { - bytesTypeBuilder_.mergeFrom(value); + if (kindCase_ == 3) { + arrayTypeBuilder_.mergeFrom(value); } else { - bytesTypeBuilder_.setMessage(value); + arrayTypeBuilder_.setMessage(value); } } - kindCase_ = 1; + kindCase_ = 3; return this; } + /** * * *
    -     * Bytes
    +     * Array
          * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Array array_type = 3; */ - public Builder clearBytesType() { - if (bytesTypeBuilder_ == null) { - if (kindCase_ == 1) { + public Builder clearArrayType() { + if (arrayTypeBuilder_ == null) { + if (kindCase_ == 3) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 1) { + if (kindCase_ == 3) { kindCase_ = 0; kind_ = null; } - bytesTypeBuilder_.clear(); + arrayTypeBuilder_.clear(); } return this; } + /** * * *
    -     * Bytes
    +     * Array
          * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Array array_type = 3; */ - public com.google.bigtable.admin.v2.Type.Bytes.Builder getBytesTypeBuilder() { - return getBytesTypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Array.Builder getArrayTypeBuilder() { + return getArrayTypeFieldBuilder().getBuilder(); } + /** * * *
    -     * Bytes
    +     * Array
          * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Array array_type = 3; */ @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.ArrayOrBuilder getArrayTypeOrBuilder() { + if ((kindCase_ == 3) && (arrayTypeBuilder_ != null)) { + return arrayTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 1) { - return (com.google.bigtable.admin.v2.Type.Bytes) kind_; + if (kindCase_ == 3) { + return (com.google.bigtable.admin.v2.Type.Array) kind_; } - return com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); } } + /** * * *
    -     * Bytes
    +     * Array
          * 
    * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Array array_type = 3; */ 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(); - } - bytesTypeBuilder_ = + 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.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()); + 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_ = 1; + kindCase_ = 3; onChanged(); - return bytesTypeBuilder_; + return arrayTypeBuilder_; } 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_; + com.google.bigtable.admin.v2.Type.Map, + com.google.bigtable.admin.v2.Type.Map.Builder, + com.google.bigtable.admin.v2.Type.MapOrBuilder> + mapTypeBuilder_; + /** * * *
    -     * String
    +     * Map
          * 
    * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Map map_type = 4; * - * @return Whether the stringType field is set. + * @return Whether the mapType field is set. */ @java.lang.Override - public boolean hasStringType() { - return kindCase_ == 2; + public boolean hasMapType() { + return kindCase_ == 4; } + /** * * *
    -     * String
    +     * Map
          * 
    * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Map map_type = 4; * - * @return The stringType. - */ - @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_; + * @return The mapType. + */ + @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_; } - return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); } else { - if (kindCase_ == 2) { - return stringTypeBuilder_.getMessage(); + if (kindCase_ == 4) { + return mapTypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); } } + /** * * *
    -     * String
    +     * Map
          * 
    * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Map map_type = 4; */ - public Builder setStringType(com.google.bigtable.admin.v2.Type.String value) { - if (stringTypeBuilder_ == 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 { - stringTypeBuilder_.setMessage(value); + mapTypeBuilder_.setMessage(value); } - kindCase_ = 2; + kindCase_ = 4; return this; } + /** * * *
    -     * String
    +     * Map
          * 
    * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Map map_type = 4; */ - public Builder setStringType(com.google.bigtable.admin.v2.Type.String.Builder builderForValue) { - if (stringTypeBuilder_ == null) { + public Builder setMapType(com.google.bigtable.admin.v2.Type.Map.Builder builderForValue) { + if (mapTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - stringTypeBuilder_.setMessage(builderForValue.build()); + mapTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 2; + kindCase_ = 4; return this; } + /** * * *
    -     * String
    +     * Map
          * 
    * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Map map_type = 4; */ - 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 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.String.newBuilder( - (com.google.bigtable.admin.v2.Type.String) kind_) + com.google.bigtable.admin.v2.Type.Map.newBuilder( + (com.google.bigtable.admin.v2.Type.Map) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -9633,207 +29620,214 @@ public Builder mergeStringType(com.google.bigtable.admin.v2.Type.String value) { } onChanged(); } else { - if (kindCase_ == 2) { - stringTypeBuilder_.mergeFrom(value); + if (kindCase_ == 4) { + mapTypeBuilder_.mergeFrom(value); } else { - stringTypeBuilder_.setMessage(value); + mapTypeBuilder_.setMessage(value); } } - kindCase_ = 2; + kindCase_ = 4; return this; } + /** * * *
    -     * String
    +     * Map
          * 
    * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Map map_type = 4; */ - public Builder clearStringType() { - if (stringTypeBuilder_ == null) { - if (kindCase_ == 2) { + public Builder clearMapType() { + if (mapTypeBuilder_ == null) { + if (kindCase_ == 4) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 2) { + if (kindCase_ == 4) { kindCase_ = 0; kind_ = null; } - stringTypeBuilder_.clear(); + mapTypeBuilder_.clear(); } return this; } + /** * * *
    -     * String
    +     * Map
          * 
    * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Map map_type = 4; */ - public com.google.bigtable.admin.v2.Type.String.Builder getStringTypeBuilder() { - return getStringTypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Map.Builder getMapTypeBuilder() { + return getMapTypeFieldBuilder().getBuilder(); } + /** * * *
    -     * String
    +     * Map
          * 
    * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Map map_type = 4; */ @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.MapOrBuilder getMapTypeOrBuilder() { + if ((kindCase_ == 4) && (mapTypeBuilder_ != null)) { + return mapTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 2) { - return (com.google.bigtable.admin.v2.Type.String) kind_; + if (kindCase_ == 4) { + return (com.google.bigtable.admin.v2.Type.Map) kind_; } - return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); } } + /** * * *
    -     * String
    +     * Map
          * 
    * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Map map_type = 4; */ 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(); - } - stringTypeBuilder_ = + 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.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()); + 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_ = 2; + kindCase_ = 4; onChanged(); - return stringTypeBuilder_; + return mapTypeBuilder_; } 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_; + com.google.bigtable.admin.v2.Type.Proto, + com.google.bigtable.admin.v2.Type.Proto.Builder, + com.google.bigtable.admin.v2.Type.ProtoOrBuilder> + protoTypeBuilder_; + /** * * *
    -     * Int64
    +     * Proto
          * 
    * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; * - * @return Whether the int64Type field is set. + * @return Whether the protoType field is set. */ @java.lang.Override - public boolean hasInt64Type() { - return kindCase_ == 5; + public boolean hasProtoType() { + return kindCase_ == 13; } + /** * * *
    -     * Int64
    +     * Proto
          * 
    * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; * - * @return The int64Type. + * @return The protoType. */ @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.Proto getProtoType() { + if (protoTypeBuilder_ == null) { + if (kindCase_ == 13) { + return (com.google.bigtable.admin.v2.Type.Proto) kind_; } - return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Proto.getDefaultInstance(); } else { - if (kindCase_ == 5) { - return int64TypeBuilder_.getMessage(); + if (kindCase_ == 13) { + return protoTypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Proto.getDefaultInstance(); } } + /** * * *
    -     * Int64
    +     * Proto
          * 
    * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; */ - public Builder setInt64Type(com.google.bigtable.admin.v2.Type.Int64 value) { - if (int64TypeBuilder_ == 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 { - int64TypeBuilder_.setMessage(value); + protoTypeBuilder_.setMessage(value); } - kindCase_ = 5; + kindCase_ = 13; return this; } + /** * * *
    -     * Int64
    +     * Proto
          * 
    * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; */ - public Builder setInt64Type(com.google.bigtable.admin.v2.Type.Int64.Builder builderForValue) { - if (int64TypeBuilder_ == null) { + public Builder setProtoType(com.google.bigtable.admin.v2.Type.Proto.Builder builderForValue) { + if (protoTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - int64TypeBuilder_.setMessage(builderForValue.build()); + protoTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 5; + kindCase_ = 13; return this; } + /** * * *
    -     * Int64
    +     * Proto
          * 
    * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; */ - 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 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.Int64.newBuilder( - (com.google.bigtable.admin.v2.Type.Int64) kind_) + com.google.bigtable.admin.v2.Type.Proto.newBuilder( + (com.google.bigtable.admin.v2.Type.Proto) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -9841,206 +29835,214 @@ public Builder mergeInt64Type(com.google.bigtable.admin.v2.Type.Int64 value) { } onChanged(); } else { - if (kindCase_ == 5) { - int64TypeBuilder_.mergeFrom(value); + if (kindCase_ == 13) { + protoTypeBuilder_.mergeFrom(value); } else { - int64TypeBuilder_.setMessage(value); + protoTypeBuilder_.setMessage(value); } } - kindCase_ = 5; + kindCase_ = 13; return this; } + /** * * *
    -     * Int64
    +     * Proto
          * 
    * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; */ - public Builder clearInt64Type() { - if (int64TypeBuilder_ == null) { - if (kindCase_ == 5) { + public Builder clearProtoType() { + if (protoTypeBuilder_ == null) { + if (kindCase_ == 13) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 5) { + if (kindCase_ == 13) { kindCase_ = 0; kind_ = null; } - int64TypeBuilder_.clear(); + protoTypeBuilder_.clear(); } return this; } + /** * * *
    -     * Int64
    +     * Proto
          * 
    * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; */ - public com.google.bigtable.admin.v2.Type.Int64.Builder getInt64TypeBuilder() { - return getInt64TypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Proto.Builder getProtoTypeBuilder() { + return getProtoTypeFieldBuilder().getBuilder(); } + /** * * *
    -     * Int64
    +     * Proto
          * 
    * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; */ @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.ProtoOrBuilder getProtoTypeOrBuilder() { + if ((kindCase_ == 13) && (protoTypeBuilder_ != null)) { + return protoTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 5) { - return (com.google.bigtable.admin.v2.Type.Int64) kind_; + if (kindCase_ == 13) { + return (com.google.bigtable.admin.v2.Type.Proto) kind_; } - return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Proto.getDefaultInstance(); } } + /** * * *
    -     * Int64
    +     * Proto
          * 
    * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; */ 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(); - } - int64TypeBuilder_ = + com.google.bigtable.admin.v2.Type.Proto, + com.google.bigtable.admin.v2.Type.Proto.Builder, + com.google.bigtable.admin.v2.Type.ProtoOrBuilder> + getProtoTypeFieldBuilder() { + if (protoTypeBuilder_ == null) { + if (!(kindCase_ == 13)) { + kind_ = com.google.bigtable.admin.v2.Type.Proto.getDefaultInstance(); + } + protoTypeBuilder_ = 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()); + 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_ = 5; + kindCase_ = 13; onChanged(); - return int64TypeBuilder_; + return protoTypeBuilder_; } 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_; + com.google.bigtable.admin.v2.Type.Enum, + com.google.bigtable.admin.v2.Type.Enum.Builder, + com.google.bigtable.admin.v2.Type.EnumOrBuilder> + enumTypeBuilder_; + /** * * *
    -     * Aggregate
    +     * Enum
          * 
    * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; * - * @return Whether the aggregateType field is set. + * @return Whether the enumType field is set. */ @java.lang.Override - public boolean hasAggregateType() { - return kindCase_ == 6; + public boolean hasEnumType() { + return kindCase_ == 14; } + /** * * *
    -     * Aggregate
    +     * Enum
          * 
    * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; * - * @return The aggregateType. + * @return The enumType. */ @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.Enum getEnumType() { + if (enumTypeBuilder_ == null) { + if (kindCase_ == 14) { + return (com.google.bigtable.admin.v2.Type.Enum) kind_; } - return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Enum.getDefaultInstance(); } else { - if (kindCase_ == 6) { - return aggregateTypeBuilder_.getMessage(); + if (kindCase_ == 14) { + return enumTypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Enum.getDefaultInstance(); } } + /** * * *
    -     * Aggregate
    +     * Enum
          * 
    * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; */ - public Builder setAggregateType(com.google.bigtable.admin.v2.Type.Aggregate value) { - if (aggregateTypeBuilder_ == 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 { - aggregateTypeBuilder_.setMessage(value); + enumTypeBuilder_.setMessage(value); } - kindCase_ = 6; + kindCase_ = 14; return this; } + /** * * *
    -     * Aggregate
    +     * Enum
          * 
    * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; */ - public Builder setAggregateType( - com.google.bigtable.admin.v2.Type.Aggregate.Builder builderForValue) { - if (aggregateTypeBuilder_ == null) { + public Builder setEnumType(com.google.bigtable.admin.v2.Type.Enum.Builder builderForValue) { + if (enumTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - aggregateTypeBuilder_.setMessage(builderForValue.build()); + enumTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 6; + kindCase_ = 14; return this; } + /** * * *
    -     * Aggregate
    +     * Enum
          * 
    * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; */ - 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 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.Aggregate.newBuilder( - (com.google.bigtable.admin.v2.Type.Aggregate) kind_) + com.google.bigtable.admin.v2.Type.Enum.newBuilder( + (com.google.bigtable.admin.v2.Type.Enum) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -10048,103 +30050,105 @@ public Builder mergeAggregateType(com.google.bigtable.admin.v2.Type.Aggregate va } onChanged(); } else { - if (kindCase_ == 6) { - aggregateTypeBuilder_.mergeFrom(value); + if (kindCase_ == 14) { + enumTypeBuilder_.mergeFrom(value); } else { - aggregateTypeBuilder_.setMessage(value); + enumTypeBuilder_.setMessage(value); } } - kindCase_ = 6; + kindCase_ = 14; return this; } + /** * * *
    -     * Aggregate
    +     * Enum
          * 
    * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; */ - public Builder clearAggregateType() { - if (aggregateTypeBuilder_ == null) { - if (kindCase_ == 6) { + public Builder clearEnumType() { + if (enumTypeBuilder_ == null) { + if (kindCase_ == 14) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 6) { + if (kindCase_ == 14) { kindCase_ = 0; kind_ = null; } - aggregateTypeBuilder_.clear(); + enumTypeBuilder_.clear(); } return this; } + /** * * *
    -     * Aggregate
    +     * Enum
          * 
    * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; */ - public com.google.bigtable.admin.v2.Type.Aggregate.Builder getAggregateTypeBuilder() { - return getAggregateTypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Enum.Builder getEnumTypeBuilder() { + return getEnumTypeFieldBuilder().getBuilder(); } + /** * * *
    -     * Aggregate
    +     * Enum
          * 
    * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; */ @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.EnumOrBuilder getEnumTypeOrBuilder() { + if ((kindCase_ == 14) && (enumTypeBuilder_ != null)) { + return enumTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 6) { - return (com.google.bigtable.admin.v2.Type.Aggregate) kind_; + if (kindCase_ == 14) { + return (com.google.bigtable.admin.v2.Type.Enum) kind_; } - return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Enum.getDefaultInstance(); } } + /** * * *
    -     * Aggregate
    +     * Enum
          * 
    * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; */ 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(); - } - aggregateTypeBuilder_ = + com.google.bigtable.admin.v2.Type.Enum, + com.google.bigtable.admin.v2.Type.Enum.Builder, + com.google.bigtable.admin.v2.Type.EnumOrBuilder> + getEnumTypeFieldBuilder() { + if (enumTypeBuilder_ == null) { + if (!(kindCase_ == 14)) { + kind_ = com.google.bigtable.admin.v2.Type.Enum.getDefaultInstance(); + } + enumTypeBuilder_ = 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()); + 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_ = 6; + kindCase_ = 14; onChanged(); - return aggregateTypeBuilder_; + return enumTypeBuilder_; } @java.lang.Override 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 a7a4605d6e..67ae5ba1bb 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/types.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface TypeOrBuilder @@ -36,6 +36,7 @@ public interface TypeOrBuilder * @return Whether the bytesType field is set. */ boolean hasBytesType(); + /** * * @@ -48,6 +49,7 @@ public interface TypeOrBuilder * @return The bytesType. */ com.google.bigtable.admin.v2.Type.Bytes getBytesType(); + /** * * @@ -71,6 +73,7 @@ public interface TypeOrBuilder * @return Whether the stringType field is set. */ boolean hasStringType(); + /** * * @@ -83,6 +86,7 @@ public interface TypeOrBuilder * @return The stringType. */ com.google.bigtable.admin.v2.Type.String getStringType(); + /** * * @@ -106,6 +110,7 @@ public interface TypeOrBuilder * @return Whether the int64Type field is set. */ boolean hasInt64Type(); + /** * * @@ -118,6 +123,7 @@ public interface TypeOrBuilder * @return The int64Type. */ com.google.bigtable.admin.v2.Type.Int64 getInt64Type(); + /** * * @@ -129,6 +135,191 @@ public interface TypeOrBuilder */ com.google.bigtable.admin.v2.Type.Int64OrBuilder getInt64TypeOrBuilder(); + /** + * + * + *
    +   * Float32
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * + * @return Whether the float32Type field is set. + */ + boolean hasFloat32Type(); + + /** + * + * + *
    +   * Float32
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * + * @return The float32Type. + */ + com.google.bigtable.admin.v2.Type.Float32 getFloat32Type(); + + /** + * + * + *
    +   * Float32
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + */ + com.google.bigtable.admin.v2.Type.Float32OrBuilder getFloat32TypeOrBuilder(); + + /** + * + * + *
    +   * Float64
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * + * @return Whether the float64Type field is set. + */ + boolean hasFloat64Type(); + + /** + * + * + *
    +   * Float64
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * + * @return The float64Type. + */ + com.google.bigtable.admin.v2.Type.Float64 getFloat64Type(); + + /** + * + * + *
    +   * Float64
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + */ + com.google.bigtable.admin.v2.Type.Float64OrBuilder getFloat64TypeOrBuilder(); + + /** + * + * + *
    +   * Bool
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * + * @return Whether the boolType field is set. + */ + boolean hasBoolType(); + + /** + * + * + *
    +   * Bool
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * + * @return The boolType. + */ + com.google.bigtable.admin.v2.Type.Bool getBoolType(); + + /** + * + * + *
    +   * Bool
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + */ + com.google.bigtable.admin.v2.Type.BoolOrBuilder getBoolTypeOrBuilder(); + + /** + * + * + *
    +   * Timestamp
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * + * @return Whether the timestampType field is set. + */ + boolean hasTimestampType(); + + /** + * + * + *
    +   * Timestamp
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * + * @return The timestampType. + */ + com.google.bigtable.admin.v2.Type.Timestamp getTimestampType(); + + /** + * + * + *
    +   * Timestamp
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + */ + com.google.bigtable.admin.v2.Type.TimestampOrBuilder getTimestampTypeOrBuilder(); + + /** + * + * + *
    +   * Date
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + * + * @return Whether the dateType field is set. + */ + boolean hasDateType(); + + /** + * + * + *
    +   * Date
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + * + * @return The dateType. + */ + com.google.bigtable.admin.v2.Type.Date getDateType(); + + /** + * + * + *
    +   * Date
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Date date_type = 11; + */ + com.google.bigtable.admin.v2.Type.DateOrBuilder getDateTypeOrBuilder(); + /** * * @@ -141,6 +332,7 @@ public interface TypeOrBuilder * @return Whether the aggregateType field is set. */ boolean hasAggregateType(); + /** * * @@ -153,6 +345,7 @@ public interface TypeOrBuilder * @return The aggregateType. */ com.google.bigtable.admin.v2.Type.Aggregate getAggregateType(); + /** * * @@ -164,5 +357,190 @@ public interface TypeOrBuilder */ com.google.bigtable.admin.v2.Type.AggregateOrBuilder getAggregateTypeOrBuilder(); + /** + * + * + *
    +   * Struct
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * + * @return Whether the structType field is set. + */ + boolean hasStructType(); + + /** + * + * + *
    +   * Struct
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * + * @return The structType. + */ + com.google.bigtable.admin.v2.Type.Struct getStructType(); + + /** + * + * + *
    +   * Struct
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + */ + com.google.bigtable.admin.v2.Type.StructOrBuilder getStructTypeOrBuilder(); + + /** + * + * + *
    +   * Array
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Array array_type = 3; + * + * @return Whether the arrayType field is set. + */ + boolean hasArrayType(); + + /** + * + * + *
    +   * Array
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Array array_type = 3; + * + * @return The arrayType. + */ + com.google.bigtable.admin.v2.Type.Array getArrayType(); + + /** + * + * + *
    +   * Array
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Array array_type = 3; + */ + com.google.bigtable.admin.v2.Type.ArrayOrBuilder getArrayTypeOrBuilder(); + + /** + * + * + *
    +   * Map
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Map map_type = 4; + * + * @return Whether the mapType field is set. + */ + boolean hasMapType(); + + /** + * + * + *
    +   * Map
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Map map_type = 4; + * + * @return The mapType. + */ + com.google.bigtable.admin.v2.Type.Map getMapType(); + + /** + * + * + *
    +   * Map
    +   * 
    + * + * .google.bigtable.admin.v2.Type.Map map_type = 4; + */ + 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 f61eeeb589..c36ba2a0c3 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/types.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public final class TypesProto { @@ -56,6 +56,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Raw_descriptor; static final com.google.protobuf.GeneratedMessageV3.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 + 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 @@ -68,6 +72,74 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_BigEndianBytes_descriptor; static final com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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 + 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 + 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 + 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 + 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.GeneratedMessageV3.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 + 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 + 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 + 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 + 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 + 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 @@ -76,6 +148,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_admin_v2_Type_Aggregate_Sum_descriptor; static final com.google.protobuf.GeneratedMessageV3.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 + 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 + 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 + internal_static_google_bigtable_admin_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -87,40 +171,94 @@ 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\"\307\010\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" + "pe\030\005 \001(\0132$.google.bigtable.admin.v2.Type" - + ".Int64H\000\022B\n\016aggregate_type\030\006 \001(\0132(.googl" - + "e.bigtable.admin.v2.Type.AggregateH\000\032\251\001\n" - + "\005Bytes\022?\n\010encoding\030\001 \001(\0132-.google.bigtab" - + "le.admin.v2.Type.Bytes.Encoding\032_\n\010Encod" - + "ing\022@\n\003raw\030\001 \001(\01321.google.bigtable.admin" - + ".v2.Type.Bytes.Encoding.RawH\000\032\005\n\003RawB\n\n\010" - + "encoding\032\271\001\n\006String\022@\n\010encoding\030\001 \001(\0132.." - + "google.bigtable.admin.v2.Type.String.Enc" - + "oding\032m\n\010Encoding\022J\n\010utf8_raw\030\001 \001(\01326.go" - + "ogle.bigtable.admin.v2.Type.String.Encod" - + "ing.Utf8RawH\000\032\t\n\007Utf8RawB\n\n\010encoding\032\207\002\n" - + "\005Int64\022?\n\010encoding\030\001 \001(\0132-.google.bigtab" - + "le.admin.v2.Type.Int64.Encoding\032\274\001\n\010Enco" - + "ding\022X\n\020big_endian_bytes\030\001 \001(\0132<.google." - + "bigtable.admin.v2.Type.Int64.Encoding.Bi" - + "gEndianBytesH\000\032J\n\016BigEndianBytes\0228\n\nbyte" - + "s_type\030\001 \001(\0132$.google.bigtable.admin.v2." - + "Type.BytesB\n\n\010encoding\032\312\001\n\tAggregate\0222\n\n" - + "input_type\030\001 \001(\0132\036.google.bigtable.admin" - + ".v2.Type\0227\n\nstate_type\030\002 \001(\0132\036.google.bi" - + "gtable.admin.v2.TypeB\003\340A\003\022;\n\003sum\030\004 \001(\0132," - + ".google.bigtable.admin.v2.Type.Aggregate" - + ".SumH\000\032\005\n\003SumB\014\n\naggregatorB\006\n\004kindB\322\001\n\034" - + "com.google.bigtable.admin.v2B\nTypesProto" - + "P\001Z=google.golang.org/genproto/googleapi" - + "s/bigtable/admin/v2;admin\252\002\036Google.Cloud" - + ".Bigtable.Admin.V2\312\002\036Google\\Cloud\\Bigtab" - + "le\\Admin\\V2\352\002\"Google::Cloud::Bigtable::A" - + "dmin::V2b\006proto3" + + ".Int64H\000\022>\n\014float32_type\030\014 \001(\0132&.google." + + "bigtable.admin.v2.Type.Float32H\000\022>\n\014floa" + + "t64_type\030\t \001(\0132&.google.bigtable.admin.v" + + "2.Type.Float64H\000\0228\n\tbool_type\030\010 \001(\0132#.go" + + "ogle.bigtable.admin.v2.Type.BoolH\000\022B\n\016ti" + + "mestamp_type\030\n \001(\0132(.google.bigtable.adm" + + "in.v2.Type.TimestampH\000\0228\n\tdate_type\030\013 \001(" + + "\0132#.google.bigtable.admin.v2.Type.DateH\000" + + "\022B\n\016aggregate_type\030\006 \001(\0132(.google.bigtab" + + "le.admin.v2.Type.AggregateH\000\022<\n\013struct_t" + + "ype\030\007 \001(\0132%.google.bigtable.admin.v2.Typ" + + "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\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( @@ -134,7 +272,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_descriptor, new java.lang.String[] { - "BytesType", "StringType", "Int64Type", "AggregateType", "Kind", + "BytesType", + "StringType", + "Int64Type", + "Float32Type", + "Float64Type", + "BoolType", + "TimestampType", + "DateType", + "AggregateType", + "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); @@ -174,7 +326,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_String_Encoding_descriptor, new java.lang.String[] { - "Utf8Raw", "Encoding", + "Utf8Raw", "Utf8Bytes", "Encoding", }); internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Raw_descriptor = internal_static_google_bigtable_admin_v2_Type_String_Encoding_descriptor @@ -184,6 +336,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.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_Utf8Bytes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Int64_fieldAccessorTable = @@ -198,7 +358,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.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 @@ -210,13 +370,143 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "BytesType", }); - internal_static_google_bigtable_admin_v2_Type_Aggregate_descriptor = + internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_OrderedCodeBytes_descriptor = + internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_descriptor + .getNestedTypes() + .get(1); + internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_OrderedCodeBytes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Bool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Float32_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Float64_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Timestamp_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_Type_Timestamp_descriptor, + new java.lang.String[] { + "Encoding", + }); + internal_static_google_bigtable_admin_v2_Type_Timestamp_Encoding_descriptor = + internal_static_google_bigtable_admin_v2_Type_Timestamp_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_admin_v2_Type_Timestamp_Encoding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Date_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Struct_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_Type_Struct_descriptor, + new java.lang.String[] { + "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_Field_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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.getNestedTypes().get(1); + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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 + .getNestedTypes() + .get(0); + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_Singleton_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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 + .getNestedTypes() + .get(1); + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_DelimitedBytes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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 + .getNestedTypes() + .get(2); + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_OrderedCodeBytes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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.getNestedTypes().get(9); + internal_static_google_bigtable_admin_v2_Type_Proto_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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.getNestedTypes().get(10); + internal_static_google_bigtable_admin_v2_Type_Enum_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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(11); + internal_static_google_bigtable_admin_v2_Type_Array_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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(12); + internal_static_google_bigtable_admin_v2_Type_Map_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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(13); internal_static_google_bigtable_admin_v2_Type_Aggregate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Aggregate_descriptor, new java.lang.String[] { - "InputType", "StateType", "Sum", "Aggregator", + "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); @@ -224,6 +514,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.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_Max_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Min_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_descriptor, + new java.lang.String[] {}); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); 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..bcc33f4c2f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class UndeleteTableMetadata extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UndeleteTableMetadata) UndeleteTableMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use UndeleteTableMetadata.newBuilder() to construct. private UndeleteTableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -92,6 +94,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -118,6 +121,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int START_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -133,6 +137,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -148,6 +153,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -164,6 +170,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -179,6 +186,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -194,6 +202,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -395,6 +404,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -628,6 +638,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -650,6 +661,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -672,6 +684,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -693,6 +706,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -710,6 +724,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -739,6 +754,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -753,6 +769,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasStartTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -771,6 +788,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -793,6 +811,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -812,6 +831,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -839,6 +859,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -858,6 +879,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -872,6 +894,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -888,6 +911,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -920,6 +944,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -934,6 +959,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -952,6 +978,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -974,6 +1001,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -993,6 +1021,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1020,6 +1049,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1039,6 +1069,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1053,6 +1084,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1069,6 +1101,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * 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..ea49eede5f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface UndeleteTableMetadataOrBuilder @@ -36,6 +36,7 @@ public interface UndeleteTableMetadataOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -61,6 +62,7 @@ public interface UndeleteTableMetadataOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -73,6 +75,7 @@ public interface UndeleteTableMetadataOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -96,6 +99,7 @@ public interface UndeleteTableMetadataOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -108,6 +112,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..f53d5d60e3 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class UndeleteTableRequest extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UndeleteTableRequest) UndeleteTableRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use UndeleteTableRequest.newBuilder() to construct. private UndeleteTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +97,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -282,6 +285,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -467,6 +471,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -493,6 +498,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -519,6 +525,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -544,6 +551,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -565,6 +573,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * 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..0b6289ae1a 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface UndeleteTableRequestOrBuilder @@ -40,6 +40,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..ad8f83eccc 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class UpdateAppProfileMetadata extends com.google.protobuf.Generate // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateAppProfileMetadata) UpdateAppProfileMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use UpdateAppProfileMetadata.newBuilder() to construct. private UpdateAppProfileMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -212,6 +213,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * 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..0afb727833 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface UpdateAppProfileMetadataOrBuilder 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..58445b79f7 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class UpdateAppProfileRequest extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateAppProfileRequest) UpdateAppProfileRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use UpdateAppProfileRequest.newBuilder() to construct. private UpdateAppProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,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 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasAppProfile() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -100,6 +103,7 @@ public com.google.bigtable.admin.v2.AppProfile getAppProfile() { ? com.google.bigtable.admin.v2.AppProfile.getDefaultInstance() : appProfile_; } + /** * * @@ -120,6 +124,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 +142,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -154,6 +160,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -172,6 +179,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { public static final int IGNORE_WARNINGS_FIELD_NUMBER = 3; private boolean ignoreWarnings_ = false; + /** * * @@ -375,6 +383,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -610,6 +619,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.AppProfile.Builder, com.google.bigtable.admin.v2.AppProfileOrBuilder> appProfileBuilder_; + /** * * @@ -626,6 +636,7 @@ public Builder mergeFrom( public boolean hasAppProfile() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -648,6 +659,7 @@ public com.google.bigtable.admin.v2.AppProfile getAppProfile() { return appProfileBuilder_.getMessage(); } } + /** * * @@ -672,6 +684,7 @@ public Builder setAppProfile(com.google.bigtable.admin.v2.AppProfile value) { onChanged(); return this; } + /** * * @@ -693,6 +706,7 @@ public Builder setAppProfile(com.google.bigtable.admin.v2.AppProfile.Builder bui onChanged(); return this; } + /** * * @@ -722,6 +736,7 @@ public Builder mergeAppProfile(com.google.bigtable.admin.v2.AppProfile value) { } return this; } + /** * * @@ -743,6 +758,7 @@ public Builder clearAppProfile() { onChanged(); return this; } + /** * * @@ -759,6 +775,7 @@ public com.google.bigtable.admin.v2.AppProfile.Builder getAppProfileBuilder() { onChanged(); return getAppProfileFieldBuilder().getBuilder(); } + /** * * @@ -779,6 +796,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() : appProfile_; } } + /** * * @@ -813,6 +831,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -829,6 +848,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -851,6 +871,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -875,6 +896,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -896,6 +918,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -925,6 +948,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -946,6 +970,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -962,6 +987,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { onChanged(); return getUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -982,6 +1008,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -1011,6 +1038,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { } private boolean ignoreWarnings_; + /** * * @@ -1026,6 +1054,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { public boolean getIgnoreWarnings() { return ignoreWarnings_; } + /** * * @@ -1045,6 +1074,7 @@ public Builder setIgnoreWarnings(boolean value) { onChanged(); return this; } + /** * * 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..6a87af70a4 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface UpdateAppProfileRequestOrBuilder @@ -38,6 +38,7 @@ public interface UpdateAppProfileRequestOrBuilder * @return Whether the appProfile field is set. */ boolean hasAppProfile(); + /** * * @@ -52,6 +53,7 @@ public interface UpdateAppProfileRequestOrBuilder * @return The appProfile. */ com.google.bigtable.admin.v2.AppProfile getAppProfile(); + /** * * @@ -79,6 +81,7 @@ public interface UpdateAppProfileRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -93,6 +96,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..0fc8a0bc76 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class UpdateAuthorizedViewMetadata extends com.google.protobuf.Gene // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateAuthorizedViewMetadata) UpdateAuthorizedViewMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use UpdateAuthorizedViewMetadata.newBuilder() to construct. private UpdateAuthorizedViewMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,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 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -99,6 +102,7 @@ public com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest getOriginalReque ? com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.getDefaultInstance() : originalRequest_; } + /** * * @@ -119,6 +123,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 +139,7 @@ public com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest getOriginalReque public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -149,6 +155,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -165,6 +172,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -180,6 +188,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -195,6 +204,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -402,6 +412,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -646,6 +657,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.Builder, com.google.bigtable.admin.v2.UpdateAuthorizedViewRequestOrBuilder> originalRequestBuilder_; + /** * * @@ -661,6 +673,7 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -682,6 +695,7 @@ public com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest getOriginalReque return originalRequestBuilder_.getMessage(); } } + /** * * @@ -706,6 +720,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -727,6 +742,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -757,6 +773,7 @@ public Builder mergeOriginalRequest( } return this; } + /** * * @@ -777,6 +794,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -793,6 +811,7 @@ public Builder clearOriginalRequest() { onChanged(); return getOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -813,6 +832,7 @@ public Builder clearOriginalRequest() { : originalRequest_; } } + /** * * @@ -846,6 +866,7 @@ public Builder clearOriginalRequest() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -860,6 +881,7 @@ public Builder clearOriginalRequest() { public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -880,6 +902,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -902,6 +925,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -921,6 +945,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -948,6 +973,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -967,6 +993,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -981,6 +1008,7 @@ public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { onChanged(); return getRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -999,6 +1027,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -1031,6 +1060,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -1045,6 +1075,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1065,6 +1096,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -1087,6 +1119,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1106,6 +1139,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1133,6 +1167,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1152,6 +1187,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -1166,6 +1202,7 @@ public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { onChanged(); return getFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1184,6 +1221,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * 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..8cb6380805 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface UpdateAuthorizedViewMetadataOrBuilder @@ -37,6 +37,7 @@ public interface UpdateAuthorizedViewMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -50,6 +51,7 @@ public interface UpdateAuthorizedViewMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest getOriginalRequest(); + /** * * @@ -74,6 +76,7 @@ public interface UpdateAuthorizedViewMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -86,6 +89,7 @@ public interface UpdateAuthorizedViewMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -109,6 +113,7 @@ public interface UpdateAuthorizedViewMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -121,6 +126,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..02bac3c5ae 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class UpdateAuthorizedViewRequest extends com.google.protobuf.Gener // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateAuthorizedViewRequest) UpdateAuthorizedViewRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use UpdateAuthorizedViewRequest.newBuilder() to construct. private UpdateAuthorizedViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,14 +66,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 +87,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 +110,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 +134,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 +157,7 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewOrB public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -174,6 +180,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -197,6 +204,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { public static final int IGNORE_WARNINGS_FIELD_NUMBER = 3; private boolean ignoreWarnings_ = false; + /** * * @@ -402,6 +410,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -639,14 +648,15 @@ public Builder mergeFrom( 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 +668,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 +694,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 +722,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 +748,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 +782,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 +807,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}`.
          * 
    * * @@ -811,14 +827,15 @@ public com.google.bigtable.admin.v2.AuthorizedView.Builder getAuthorizedViewBuil onChanged(); return getAuthorizedViewFieldBuilder().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,14 +851,15 @@ 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}`.
          * 
    * * @@ -871,6 +889,7 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewOrB com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -892,6 +911,7 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewOrB public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -919,6 +939,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -948,6 +969,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -974,6 +996,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -1008,6 +1031,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -1034,6 +1058,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -1055,6 +1080,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { onChanged(); return getUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -1080,6 +1106,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -1114,6 +1141,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { } private boolean ignoreWarnings_; + /** * * @@ -1130,6 +1158,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { public boolean getIgnoreWarnings() { return ignoreWarnings_; } + /** * * @@ -1150,6 +1179,7 @@ public Builder setIgnoreWarnings(boolean value) { onChanged(); return this; } + /** * * 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..4d305d9eae 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface UpdateAuthorizedViewRequestOrBuilder @@ -30,8 +30,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 +41,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 +59,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 +95,7 @@ public interface UpdateAuthorizedViewRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -112,6 +115,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..2a7b5913ea 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class UpdateBackupRequest extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateBackupRequest) UpdateBackupRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use UpdateBackupRequest.newBuilder() to construct. private UpdateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,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_; + /** * * @@ -85,6 +87,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasBackup() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -105,6 +108,7 @@ public boolean hasBackup() { public com.google.bigtable.admin.v2.Backup getBackup() { return backup_ == null ? com.google.bigtable.admin.v2.Backup.getDefaultInstance() : backup_; } + /** * * @@ -126,6 +130,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 +151,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -166,6 +172,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -363,6 +370,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -586,6 +594,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.Backup.Builder, com.google.bigtable.admin.v2.BackupOrBuilder> backupBuilder_; + /** * * @@ -605,6 +614,7 @@ public Builder mergeFrom( public boolean hasBackup() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -628,6 +638,7 @@ public com.google.bigtable.admin.v2.Backup getBackup() { return backupBuilder_.getMessage(); } } + /** * * @@ -655,6 +666,7 @@ public Builder setBackup(com.google.bigtable.admin.v2.Backup value) { onChanged(); return this; } + /** * * @@ -679,6 +691,7 @@ public Builder setBackup(com.google.bigtable.admin.v2.Backup.Builder builderForV onChanged(); return this; } + /** * * @@ -711,6 +724,7 @@ public Builder mergeBackup(com.google.bigtable.admin.v2.Backup value) { } return this; } + /** * * @@ -735,6 +749,7 @@ public Builder clearBackup() { onChanged(); return this; } + /** * * @@ -754,6 +769,7 @@ public com.google.bigtable.admin.v2.Backup.Builder getBackupBuilder() { onChanged(); return getBackupFieldBuilder().getBuilder(); } + /** * * @@ -775,6 +791,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupOrBuilder() { return backup_ == null ? com.google.bigtable.admin.v2.Backup.getDefaultInstance() : backup_; } } + /** * * @@ -812,6 +829,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupOrBuilder() { com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -831,6 +849,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -856,6 +875,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -883,6 +903,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -907,6 +928,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -939,6 +961,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -963,6 +986,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -982,6 +1006,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { onChanged(); return getUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -1005,6 +1030,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * 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..a591574fd2 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface UpdateBackupRequestOrBuilder @@ -41,6 +41,7 @@ public interface UpdateBackupRequestOrBuilder * @return Whether the backup field is set. */ boolean hasBackup(); + /** * * @@ -58,6 +59,7 @@ public interface UpdateBackupRequestOrBuilder * @return The backup. */ com.google.bigtable.admin.v2.Backup getBackup(); + /** * * @@ -91,6 +93,7 @@ public interface UpdateBackupRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -108,6 +111,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..34ad2a578a 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class UpdateClusterMetadata extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateClusterMetadata) UpdateClusterMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use UpdateClusterMetadata.newBuilder() to construct. private UpdateClusterMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,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 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -96,6 +99,7 @@ public com.google.bigtable.admin.v2.Cluster getOriginalRequest() { ? com.google.bigtable.admin.v2.Cluster.getDefaultInstance() : originalRequest_; } + /** * * @@ -114,6 +118,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 +134,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getOriginalRequestOrBuilder public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -144,6 +150,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -160,6 +167,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -175,6 +183,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -190,6 +199,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -396,6 +406,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -639,6 +650,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder> originalRequestBuilder_; + /** * * @@ -653,6 +665,7 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -673,6 +686,7 @@ public com.google.bigtable.admin.v2.Cluster getOriginalRequest() { return originalRequestBuilder_.getMessage(); } } + /** * * @@ -695,6 +709,7 @@ public Builder setOriginalRequest(com.google.bigtable.admin.v2.Cluster value) { onChanged(); return this; } + /** * * @@ -715,6 +730,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -742,6 +758,7 @@ public Builder mergeOriginalRequest(com.google.bigtable.admin.v2.Cluster value) } return this; } + /** * * @@ -761,6 +778,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -775,6 +793,7 @@ public com.google.bigtable.admin.v2.Cluster.Builder getOriginalRequestBuilder() onChanged(); return getOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -793,6 +812,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getOriginalRequestOrBuilder : originalRequest_; } } + /** * * @@ -825,6 +845,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getOriginalRequestOrBuilder com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -839,6 +860,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getOriginalRequestOrBuilder public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -859,6 +881,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -881,6 +904,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -900,6 +924,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -927,6 +952,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -946,6 +972,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -960,6 +987,7 @@ public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { onChanged(); return getRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -978,6 +1006,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -1010,6 +1039,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -1024,6 +1054,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1044,6 +1075,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -1066,6 +1098,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1085,6 +1118,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1112,6 +1146,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1131,6 +1166,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -1145,6 +1181,7 @@ public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { onChanged(); return getFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1163,6 +1200,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * 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..f73ce1639e 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface UpdateClusterMetadataOrBuilder @@ -36,6 +36,7 @@ public interface UpdateClusterMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -48,6 +49,7 @@ public interface UpdateClusterMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.Cluster getOriginalRequest(); + /** * * @@ -71,6 +73,7 @@ public interface UpdateClusterMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -83,6 +86,7 @@ public interface UpdateClusterMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -106,6 +110,7 @@ public interface UpdateClusterMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -118,6 +123,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..e26e09a9c2 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -33,6 +33,7 @@ public final class UpdateInstanceMetadata extends com.google.protobuf.GeneratedM // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateInstanceMetadata) UpdateInstanceMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use UpdateInstanceMetadata.newBuilder() to construct. private UpdateInstanceMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,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 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -96,6 +99,7 @@ public com.google.bigtable.admin.v2.PartialUpdateInstanceRequest getOriginalRequ ? com.google.bigtable.admin.v2.PartialUpdateInstanceRequest.getDefaultInstance() : originalRequest_; } + /** * * @@ -115,6 +119,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 +135,7 @@ public com.google.bigtable.admin.v2.PartialUpdateInstanceRequest getOriginalRequ public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -145,6 +151,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -161,6 +168,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -176,6 +184,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -191,6 +200,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -397,6 +407,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -640,6 +651,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.PartialUpdateInstanceRequest.Builder, com.google.bigtable.admin.v2.PartialUpdateInstanceRequestOrBuilder> originalRequestBuilder_; + /** * * @@ -654,6 +666,7 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -674,6 +687,7 @@ public com.google.bigtable.admin.v2.PartialUpdateInstanceRequest getOriginalRequ return originalRequestBuilder_.getMessage(); } } + /** * * @@ -697,6 +711,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -717,6 +732,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -746,6 +762,7 @@ public Builder mergeOriginalRequest( } return this; } + /** * * @@ -765,6 +782,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -780,6 +798,7 @@ public Builder clearOriginalRequest() { onChanged(); return getOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -799,6 +818,7 @@ public Builder clearOriginalRequest() { : originalRequest_; } } + /** * * @@ -831,6 +851,7 @@ public Builder clearOriginalRequest() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -845,6 +866,7 @@ public Builder clearOriginalRequest() { public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -865,6 +887,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -887,6 +910,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -906,6 +930,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -933,6 +958,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -952,6 +978,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -966,6 +993,7 @@ public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { onChanged(); return getRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -984,6 +1012,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -1016,6 +1045,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -1030,6 +1060,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1050,6 +1081,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -1072,6 +1104,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1091,6 +1124,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1118,6 +1152,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1137,6 +1172,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -1151,6 +1187,7 @@ public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { onChanged(); return getFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1169,6 +1206,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * 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..b129422c57 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_instance_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface UpdateInstanceMetadataOrBuilder @@ -36,6 +36,7 @@ public interface UpdateInstanceMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -48,6 +49,7 @@ public interface UpdateInstanceMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.PartialUpdateInstanceRequest getOriginalRequest(); + /** * * @@ -71,6 +73,7 @@ public interface UpdateInstanceMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -83,6 +86,7 @@ public interface UpdateInstanceMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -106,6 +110,7 @@ public interface UpdateInstanceMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -118,6 +123,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..2dc61453e8 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewMetadata.java @@ -0,0 +1,1299 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * The metadata for the Operation returned by UpdateLogicalView.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateLogicalViewMetadata} + */ +public final class UpdateLogicalViewMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateLogicalViewMetadata) + UpdateLogicalViewMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateLogicalViewMetadata.newBuilder() to construct. + private UpdateLogicalViewMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateLogicalViewMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOriginalRequestFieldBuilder(); + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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.SingleFieldBuilderV3< + 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 getOriginalRequestFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.UpdateLogicalViewRequest, + com.google.bigtable.admin.v2.UpdateLogicalViewRequest.Builder, + com.google.bigtable.admin.v2.UpdateLogicalViewRequestOrBuilder> + getOriginalRequestFieldBuilder() { + if (originalRequestBuilder_ == null) { + originalRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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.SingleFieldBuilderV3< + 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 getStartTimeFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
    +     * 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 getEndTimeFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..e5342e4c2a --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewMetadataOrBuilder.java @@ -0,0 +1,140 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..58eb125a7f --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewRequest.java @@ -0,0 +1,1098 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Request message for BigtableInstanceAdmin.UpdateLogicalView.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateLogicalViewRequest} + */ +public final class UpdateLogicalViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateLogicalViewRequest) + UpdateLogicalViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateLogicalViewRequest.newBuilder() to construct. + private UpdateLogicalViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateLogicalViewRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLogicalViewFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getLogicalViewFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().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.SingleFieldBuilderV3< + 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 getLogicalViewFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.LogicalView, + com.google.bigtable.admin.v2.LogicalView.Builder, + com.google.bigtable.admin.v2.LogicalViewOrBuilder> + getLogicalViewFieldBuilder() { + if (logicalViewBuilder_ == null) { + logicalViewBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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.SingleFieldBuilderV3< + 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 getUpdateMaskFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + 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.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..91c2f52114 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewRequestOrBuilder.java @@ -0,0 +1,121 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..5eedc6a30c --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewMetadata.java @@ -0,0 +1,1302 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * The metadata for the Operation returned by UpdateMaterializedView.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateMaterializedViewMetadata} + */ +public final class UpdateMaterializedViewMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateMaterializedViewMetadata) + UpdateMaterializedViewMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateMaterializedViewMetadata.newBuilder() to construct. + private UpdateMaterializedViewMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateMaterializedViewMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOriginalRequestFieldBuilder(); + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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.SingleFieldBuilderV3< + 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 getOriginalRequestFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest, + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.Builder, + com.google.bigtable.admin.v2.UpdateMaterializedViewRequestOrBuilder> + getOriginalRequestFieldBuilder() { + if (originalRequestBuilder_ == null) { + originalRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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.SingleFieldBuilderV3< + 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 getStartTimeFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
    +     * 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 getEndTimeFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..1ba01ac512 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewMetadataOrBuilder.java @@ -0,0 +1,140 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..bc9fe9eb16 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewRequest.java @@ -0,0 +1,1100 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Request message for BigtableInstanceAdmin.UpdateMaterializedView.
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateMaterializedViewRequest} + */ +public final class UpdateMaterializedViewRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateMaterializedViewRequest) + UpdateMaterializedViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateMaterializedViewRequest.newBuilder() to construct. + private UpdateMaterializedViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateMaterializedViewRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMaterializedViewFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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( + getMaterializedViewFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().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.SingleFieldBuilderV3< + 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 getMaterializedViewFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.MaterializedView, + com.google.bigtable.admin.v2.MaterializedView.Builder, + com.google.bigtable.admin.v2.MaterializedViewOrBuilder> + getMaterializedViewFieldBuilder() { + if (materializedViewBuilder_ == null) { + materializedViewBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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.SingleFieldBuilderV3< + 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 getUpdateMaskFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + 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.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..69ba905d5d --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewRequestOrBuilder.java @@ -0,0 +1,121 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_instance_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..2e4b0c15a9 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleMetadata.java @@ -0,0 +1,1206 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +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} + */ +public final class UpdateSchemaBundleMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateSchemaBundleMetadata) + UpdateSchemaBundleMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateSchemaBundleMetadata.newBuilder() to construct. + private UpdateSchemaBundleMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateSchemaBundleMetadata() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateSchemaBundleMetadata(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + 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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().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.SingleFieldBuilderV3< + 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 getStartTimeFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
    +     * 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 getEndTimeFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..31b4b10579 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleMetadataOrBuilder.java @@ -0,0 +1,130 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..0db84313ca --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleRequest.java @@ -0,0 +1,1209 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * The request for
    + * [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateSchemaBundleRequest} + */ +public final class UpdateSchemaBundleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateSchemaBundleRequest) + UpdateSchemaBundleRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateSchemaBundleRequest.newBuilder() to construct. + private UpdateSchemaBundleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateSchemaBundleRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSchemaBundleFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getSchemaBundleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().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.SingleFieldBuilderV3< + 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 getSchemaBundleFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.SchemaBundle, + com.google.bigtable.admin.v2.SchemaBundle.Builder, + com.google.bigtable.admin.v2.SchemaBundleOrBuilder> + getSchemaBundleFieldBuilder() { + if (schemaBundleBuilder_ == null) { + schemaBundleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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.SingleFieldBuilderV3< + 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 getUpdateMaskFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..111369c578 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleRequestOrBuilder.java @@ -0,0 +1,137 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.admin.v2; + +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..a3e325636e 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class UpdateTableMetadata extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateTableMetadata) UpdateTableMetadataOrBuilder { private static final long serialVersionUID = 0L; + // Use UpdateTableMetadata.newBuilder() to construct. private UpdateTableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -92,6 +94,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -118,6 +121,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int START_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -133,6 +137,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -148,6 +153,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -164,6 +170,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -179,6 +186,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -194,6 +202,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -395,6 +404,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -628,6 +638,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -650,6 +661,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -672,6 +684,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -693,6 +706,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -710,6 +724,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -739,6 +754,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -753,6 +769,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasStartTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -771,6 +788,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -793,6 +811,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -812,6 +831,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -839,6 +859,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -858,6 +879,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -872,6 +894,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -888,6 +911,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -920,6 +944,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -934,6 +959,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -952,6 +978,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -974,6 +1001,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -993,6 +1021,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1020,6 +1049,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1039,6 +1069,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1053,6 +1084,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1069,6 +1101,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * 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..d8f037ae52 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface UpdateTableMetadataOrBuilder @@ -36,6 +36,7 @@ public interface UpdateTableMetadataOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -61,6 +62,7 @@ public interface UpdateTableMetadataOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -73,6 +75,7 @@ public interface UpdateTableMetadataOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -96,6 +99,7 @@ public interface UpdateTableMetadataOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -108,6 +112,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..dbd45e7df4 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; /** @@ -34,6 +34,7 @@ public final class UpdateTableRequest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateTableRequest) UpdateTableRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use UpdateTableRequest.newBuilder() to construct. private UpdateTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,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 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasTable() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -99,6 +102,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 +121,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 +135,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 +150,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -157,6 +164,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 +179,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -184,6 +193,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 +207,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 +246,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 +264,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 +291,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 +311,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; @@ -375,6 +413,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -435,6 +474,7 @@ public Builder clear() { updateMaskBuilder_.dispose(); updateMaskBuilder_ = null; } + ignoreWarnings_ = false; return this; } @@ -480,6 +520,9 @@ 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_; } @@ -535,6 +578,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; @@ -573,6 +619,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 24: + { + ignoreWarnings_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -598,6 +650,7 @@ public Builder mergeFrom( com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder> tableBuilder_; + /** * * @@ -614,6 +667,7 @@ public Builder mergeFrom( public boolean hasTable() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -634,6 +688,7 @@ public com.google.bigtable.admin.v2.Table getTable() { return tableBuilder_.getMessage(); } } + /** * * @@ -658,6 +713,7 @@ public Builder setTable(com.google.bigtable.admin.v2.Table value) { onChanged(); return this; } + /** * * @@ -679,6 +735,7 @@ public Builder setTable(com.google.bigtable.admin.v2.Table.Builder builderForVal onChanged(); return this; } + /** * * @@ -708,6 +765,7 @@ public Builder mergeTable(com.google.bigtable.admin.v2.Table value) { } return this; } + /** * * @@ -729,6 +787,7 @@ public Builder clearTable() { onChanged(); return this; } + /** * * @@ -745,6 +804,7 @@ public com.google.bigtable.admin.v2.Table.Builder getTableBuilder() { onChanged(); return getTableFieldBuilder().getBuilder(); } + /** * * @@ -763,6 +823,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { return table_ == null ? com.google.bigtable.admin.v2.Table.getDefaultInstance() : table_; } } + /** * * @@ -797,6 +858,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -810,6 +872,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 +886,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -836,6 +900,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 +920,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -868,6 +934,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 +956,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -902,6 +970,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 +989,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -933,6 +1003,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 +1030,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -972,6 +1044,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 +1063,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -1003,6 +1077,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. @@ -1016,6 +1091,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { onChanged(); return getUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -1029,6 +1105,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 +1123,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -1059,6 +1137,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. @@ -1084,6 +1163,62 @@ 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 boolean getIgnoreWarnings() { + return ignoreWarnings_; + } + + /** + * + * + *
    +     * 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; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); 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..5bac7e8074 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/admin/v2/bigtable_table_admin.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.admin.v2; public interface UpdateTableRequestOrBuilder @@ -38,6 +38,7 @@ public interface UpdateTableRequestOrBuilder * @return Whether the table field is set. */ boolean hasTable(); + /** * * @@ -52,6 +53,7 @@ public interface UpdateTableRequestOrBuilder * @return The table. */ com.google.bigtable.admin.v2.Table getTable(); + /** * * @@ -78,6 +80,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 +92,7 @@ public interface UpdateTableRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -102,6 +106,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 +118,7 @@ public interface UpdateTableRequestOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * @@ -126,6 +132,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 +142,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 a070246cc7..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. @@ -29,7 +29,7 @@ import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; +option go_package = "cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb"; option java_multiple_files = true; option java_outer_classname = "BigtableInstanceAdminProto"; option java_package = "com.google.bigtable.admin.v2"; @@ -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 1a3ab2c832..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. @@ -31,7 +31,7 @@ import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; +option go_package = "cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb"; option java_multiple_files = true; option java_outer_classname = "BigtableTableAdminProto"; option java_package = "com.google.bigtable.admin.v2"; @@ -360,7 +360,7 @@ service BigtableTableAdmin { // 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.RestoreTableMetadata]. The + // [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The // [response][google.longrunning.Operation.response] type is // [Table][google.bigtable.admin.v2.Table], if successful. rpc RestoreTable(RestoreTableRequest) returns (google.longrunning.Operation) { @@ -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 @@ -1219,7 +1302,7 @@ message ListBackupsResponse { // [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]. message CopyBackupRequest { // Required. The name of the destination cluster that will contain the backup - // copy. The cluster must already exists. Values are of the form: + // copy. The cluster must already exist. Values are of the form: // `projects/{project}/instances/{instance}/clusters/{cluster}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -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 cdfdb11d7b..0d8c184ec0 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 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. @@ -19,7 +19,7 @@ package google.bigtable.admin.v2; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; +option go_package = "cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb"; option java_multiple_files = true; option java_outer_classname = "CommonProto"; option java_package = "com.google.bigtable.admin.v2"; 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 5075a1990d..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. @@ -22,7 +22,7 @@ import "google/bigtable/admin/v2/common.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; +option go_package = "cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb"; option java_multiple_files = true; option java_outer_classname = "InstanceProto"; option java_package = "com.google.bigtable.admin.v2"; @@ -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 387297a8fb..68913d057a 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 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. @@ -24,7 +24,7 @@ import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; +option go_package = "cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb"; option java_multiple_files = true; option java_outer_classname = "TableProto"; option java_package = "com.google.bigtable.admin.v2"; @@ -204,6 +204,64 @@ message Table { // Otherwise, automated backups are disabled. AutomatedBackupPolicy automated_backup_policy = 13; } + + // 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 @@ -456,6 +514,23 @@ message Backup { READY = 2; } + // The type of the backup. + enum BackupType { + // Not specified. + BACKUP_TYPE_UNSPECIFIED = 0; + + // 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 = 1; + + // 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 = 2; + } + // A globally unique identifier for the backup which cannot be // changed. Values are of the form // `projects/{project}/instances/{instance}/clusters/{cluster}/ @@ -478,14 +553,17 @@ message Backup { // Output only. Name of the backup from which this backup was copied. If a // backup is not created by copying a backup, this field will be empty. Values - // are of the form: projects//instances//backups/. + // are of the form: + // projects//instances//clusters//backups/ string source_backup = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Required. The expiration time of the backup, with microseconds - // granularity that must be at least 6 hours and at most 90 days - // from the time the request is received. Once the `expire_time` - // has passed, Cloud Bigtable will delete the backup and free the - // resources used by the backup. + // Required. The expiration time of the backup. + // When creating a backup or updating its `expire_time`, the value must be + // greater than the backup creation time by: + // - At least 6 hours + // - At most 90 days + // + // Once the `expire_time` has passed, Cloud Bigtable will delete the backup. google.protobuf.Timestamp expire_time = 3 [(google.api.field_behavior) = REQUIRED]; @@ -511,6 +589,19 @@ message Backup { // Output only. The encryption information for the backup. EncryptionInfo encryption_info = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Indicates the backup type of the backup. + BackupType backup_type = 11; + + // The time at which the hot backup will be converted to a standard backup. + // Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the + // hot backup to a standard backup. This value must be greater than the backup + // creation time by: + // - At least 24 hours + // + // This field only applies for hot backups. When creating or updating a + // standard backup, attempting to set this field will fail the request. + google.protobuf.Timestamp hot_to_standard_time = 12; } // Information about a backup. @@ -533,7 +624,8 @@ message BackupInfo { // Output only. Name of the backup from which this backup was copied. If a // backup is not created by copying a backup, this field will be empty. Values - // are of the form: projects//instances//backups/. + // are of the form: + // projects//instances//clusters//backups/ string source_backup = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -545,3 +637,51 @@ enum RestoreSourceType { // A backup was used as the source of the restore. BACKUP = 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 0532961896..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. @@ -19,7 +19,7 @@ package google.bigtable.admin.v2; import "google/api/field_behavior.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; +option go_package = "cloud.google.com/go/bigtable/admin/apiv2/adminpb;adminpb"; option java_multiple_files = true; option java_outer_classname = "TypesProto"; option java_package = "com.google.bigtable.admin.v2"; @@ -31,40 +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. -// This might involve composing a series of steps into an "encoding chain," for -// example to convert from INT64 -> STRING -> raw bytes. In most cases, a "link" -// in the encoding chain will be based an on existing GoogleSQL conversion -// function like `CAST`. +// an `Encoding` which describes how to convert to or from the underlying data. // -// Each link in the encoding chain also defines the following properties: -// * Natural sort: 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 to a fixed-width STRING does *not* -// preserve sort order when dealing with negative numbers. -// INT64(1) > INT64(-1), but STRING("-00001") > STRING("00001). -// - The overall encoding chain has this property if *every* link does. -// * 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. -// - The overall encoding chain has this property if *any* link does. -// * Compatibility: Which other systems have matching encoding schemes? For -// example, does this encoding have a GoogleSQL equivalent? HBase? Java? +// 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")`. 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" - // * Natural sort? 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. @@ -74,64 +68,280 @@ 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 { - // UTF-8 encoding - // * Natural sort? No (ASCII characters only) - // * Self-delimiting? No - // * Compatibility? - // - BigQuery Federation `TEXT` encoding - // - HBase `Bytes.toBytes` - // - Java `String#getBytes(StandardCharsets.UTF_8)` - message Utf8Raw {} + // Deprecated: prefer the equivalent `Utf8Bytes`. + message Utf8Raw { + option deprecated = true; + } + + // 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. oneof encoding { - // Use `Utf8Raw` encoding. - Utf8Raw utf8_raw = 1; + // Deprecated: if set, converts to an empty `utf8_bytes`. + Utf8Raw utf8_raw = 1 [deprecated = true]; + + // Use `Utf8Bytes` encoding. + Utf8Bytes utf8_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; } // 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. - // * Natural sort? 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 { - // The underlying `Bytes` type, which may be able to encode further. - Bytes bytes_type = 1; + // Deprecated: ignored if set. + 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; } + // bool + // Values of type `Bool` are stored in `Value.bool_value`. + message Bool {} + + // Float32 + // Values of type `Float32` are stored in `Value.float_value`. + message Float32 {} + + // Float64 + // Values of type `Float64` are stored in `Value.float_value`. + message Float64 {} + + // Timestamp + // Values of type `Timestamp` are stored in `Value.timestamp_value`. + 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`. + message Date {} + + // 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`. + message Struct { + // A struct field and its type. + message Field { + // The field name (optional). Fields without a `field_name` are considered + // anonymous and cannot be referenced by name. + string field_name = 1; + + // The type of values in this field. + 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. + // Values of type `Array` are stored in `Value.array_value`. + message Array { + // The type of the elements in the array. This must not be `Array`. + Type element_type = 1; + } + + // A mapping of keys to values of a given type. + // Values of type `Map` are stored in a `Value.array_value` where each entry + // is another `Value.array_value` with two elements (the key and the value, + // in that order). + // Normally encoded Map values won't have repeated keys, however, clients are + // expected to handle the case in which they do. If the same key appears + // multiple times, the _last_ value takes precedence. + message Map { + // The type of a map key. + // Only `Bytes`, `String`, and `Int64` are allowed as key types. + Type key_type = 1; + + // The type of the values in a map. + Type value_type = 2; + } + // A value that combines incremental updates into a summarized value. // // Data is never directly written or read using type `Aggregate`. Writes will @@ -143,6 +353,25 @@ message Type { // State: same as input message Sum {} + // Computes the max of the input values. + // Allowed input: `Int64` + // State: same as input + message Max {} + + // Computes the min of the input values. + // Allowed input: `Int64` + // State: same as input + message Min {} + + // Computes an approximate unique count over the input values. When using + // raw data as input, be careful to use a consistent encoding. Otherwise + // the same value encoded differently could count more than once, or two + // distinct values could count as identical. + // Input: Any, or omit for Raw + // State: TBD + // 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. // Use `AddInput` mutations to accumulate new inputs. @@ -157,6 +386,15 @@ message Type { oneof aggregator { // Sum aggregator. Sum sum = 4; + + // HyperLogLogPlusPlusUniqueCount aggregator. + HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + + // Max aggregator. + Max max = 6; + + // Min aggregator. + Min min = 7; } } @@ -171,7 +409,37 @@ message Type { // Int64 Int64 int64_type = 5; + // Float32 + Float32 float32_type = 12; + + // Float64 + Float64 float64_type = 9; + + // Bool + Bool bool_type = 8; + + // Timestamp + Timestamp timestamp_type = 10; + + // Date + Date date_type = 11; + // Aggregate Aggregate aggregate_type = 6; + + // Struct + Struct struct_type = 7; + + // Array + Array array_type = 3; + + // 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 b28736fd8e..0d1c3eaf7c 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.40.1-SNAPSHOT + 2.65.1-SNAPSHOT proto-google-cloud-bigtable-v2 PROTO library for proto-google-cloud-bigtable-v2 com.google.cloud google-cloud-bigtable-parent - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.40.1-SNAPSHOT + 2.65.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 new file mode 100644 index 0000000000..8f15d3d793 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ArrayValue.java @@ -0,0 +1,948 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +/** + * + * + *
    + * `ArrayValue` is an ordered list of `Value`.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.ArrayValue} + */ +public final class ArrayValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ArrayValue) + ArrayValueOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ArrayValue.newBuilder() to construct. + private ArrayValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ArrayValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ArrayValue.class, + com.google.bigtable.v2.ArrayValue.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List values_; + + /** + * + * + *
    +   * The ordered elements in the array.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + + /** + * + * + *
    +   * The ordered elements in the array.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + @java.lang.Override + public java.util.List getValuesOrBuilderList() { + return values_; + } + + /** + * + * + *
    +   * The ordered elements in the array.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + @java.lang.Override + public int getValuesCount() { + return values_.size(); + } + + /** + * + * + *
    +   * The ordered elements in the array.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Value getValues(int index) { + return values_.get(index); + } + + /** + * + * + *
    +   * The ordered elements in the array.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.ValueOrBuilder getValuesOrBuilder(int index) { + return values_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(1, values_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, values_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.v2.ArrayValue)) { + return super.equals(obj); + } + com.google.bigtable.v2.ArrayValue other = (com.google.bigtable.v2.ArrayValue) obj; + + if (!getValuesList().equals(other.getValuesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.ArrayValue parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ArrayValue 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.ArrayValue parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ArrayValue 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.ArrayValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ArrayValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ArrayValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.ArrayValue 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; + } + + /** + * + * + *
    +   * `ArrayValue` is an ordered list of `Value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.ArrayValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ArrayValue) + com.google.bigtable.v2.ArrayValueOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ArrayValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ArrayValue.class, + com.google.bigtable.v2.ArrayValue.Builder.class); + } + + // Construct using com.google.bigtable.v2.ArrayValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + } else { + values_ = null; + valuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ArrayValue_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.ArrayValue getDefaultInstanceForType() { + return com.google.bigtable.v2.ArrayValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.ArrayValue build() { + com.google.bigtable.v2.ArrayValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.ArrayValue buildPartial() { + com.google.bigtable.v2.ArrayValue result = new com.google.bigtable.v2.ArrayValue(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.bigtable.v2.ArrayValue result) { + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + } + + 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) { + return mergeFrom((com.google.bigtable.v2.ArrayValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.ArrayValue other) { + if (other == com.google.bigtable.v2.ArrayValue.getDefaultInstance()) return this; + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValuesFieldBuilder() + : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.v2.Value m = + input.readMessage(com.google.bigtable.v2.Value.parser(), extensionRegistry); + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(m); + } else { + valuesBuilder_.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 values_ = + java.util.Collections.emptyList(); + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder> + valuesBuilder_; + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public com.google.bigtable.v2.Value getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public Builder setValues(int index, com.google.bigtable.v2.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public Builder setValues(int index, com.google.bigtable.v2.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public Builder addValues(com.google.bigtable.v2.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public Builder addValues(int index, com.google.bigtable.v2.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public Builder addValues(com.google.bigtable.v2.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public Builder addValues(int index, com.google.bigtable.v2.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public Builder addAllValues(java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public com.google.bigtable.v2.Value.Builder getValuesBuilder(int index) { + return getValuesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public com.google.bigtable.v2.ValueOrBuilder getValuesOrBuilder(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public com.google.bigtable.v2.Value.Builder addValuesBuilder() { + return getValuesFieldBuilder().addBuilder(com.google.bigtable.v2.Value.getDefaultInstance()); + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public com.google.bigtable.v2.Value.Builder addValuesBuilder(int index) { + return getValuesFieldBuilder() + .addBuilder(index, com.google.bigtable.v2.Value.getDefaultInstance()); + } + + /** + * + * + *
    +     * The ordered elements in the array.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + public java.util.List getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder>( + values_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + values_ = null; + } + return valuesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ArrayValue) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ArrayValue) + private static final com.google.bigtable.v2.ArrayValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.ArrayValue(); + } + + public static com.google.bigtable.v2.ArrayValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArrayValue 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.ArrayValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} 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 new file mode 100644 index 0000000000..993a1fa35c --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ArrayValueOrBuilder.java @@ -0,0 +1,81 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +public interface ArrayValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ArrayValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The ordered elements in the array.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + java.util.List getValuesList(); + + /** + * + * + *
    +   * The ordered elements in the array.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + com.google.bigtable.v2.Value getValues(int index); + + /** + * + * + *
    +   * The ordered elements in the array.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + int getValuesCount(); + + /** + * + * + *
    +   * The ordered elements in the array.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + java.util.List getValuesOrBuilderList(); + + /** + * + * + *
    +   * The ordered elements in the array.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 1; + */ + com.google.bigtable.v2.ValueOrBuilder getValuesOrBuilder(int index); +} 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..472348fe27 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 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. 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 c62d4fe26f..cab80b5019 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public final class BigtableProto { @@ -136,6 +136,30 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_descriptor; static final com.google.protobuf.GeneratedMessageV3.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 + 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 + 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 + 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_PrepareQueryResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -145,264 +169,330 @@ 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_record2\357!\n\010Bigt" - + "able\022\333\003\n\010ReadRows\022#.google.bigtable.v2.R" - + "eadRowsRequest\032$.google.bigtable.v2.Read" - + "RowsResponse\"\201\003\332A\ntable_name\332A\031table_nam" - + "e,app_profile_id\202\323\344\223\002\232\001\"9/v2/{table_name" - + "=projects/*/instances/*/tables/*}:readRo" - + "ws:\001*ZZ\"U/v2/{authorized_view_name=proje" - + "cts/*/instances/*/tables/*/authorizedVie" - + "ws/*}:readRows:\001*\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\356\003\n\rSampleRowKeys\022(.google.bigtable.v" - + "2.SampleRowKeysRequest\032).google.bigtable" - + ".v2.SampleRowKeysResponse\"\205\003\332A\ntable_nam" - + "e\332A\031table_name,app_profile_id\202\323\344\223\002\236\001\022>/v" - + "2/{table_name=projects/*/instances/*/tab" - + "les/*}:sampleRowKeysZ\\\022Z/v2/{authorized_" - + "view_name=projects/*/instances/*/tables/" - + "*/authorizedViews/*}:sampleRowKeys\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_vie" - + "w_name=projects/*/instances/*/tables/*/a" - + "uthorizedViews/*}0\001\022\202\004\n\tMutateRow\022$.goog" - + "le.bigtable.v2.MutateRowRequest\032%.google" - + ".bigtable.v2.MutateRowResponse\"\247\003\332A\034tabl" - + "e_name,row_key,mutations\332A+table_name,ro" - + "w_key,mutations,app_profile_id\202\323\344\223\002\234\001\":/" - + "v2/{table_name=projects/*/instances/*/ta" - + "bles/*}:mutateRow:\001*Z[\"V/v2/{authorized_" - + "view_name=projects/*/instances/*/tables/" - + "*/authorizedViews/*}:mutateRow:\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\365\003\n\nMutateRows\022%.google" - + ".bigtable.v2.MutateRowsRequest\032&.google." - + "bigtable.v2.MutateRowsResponse\"\225\003\332A\022tabl" - + "e_name,entries\332A!table_name,entries,app_" - + "profile_id\202\323\344\223\002\236\001\";/v2/{table_name=proje" - + "cts/*/instances/*/tables/*}:mutateRows:\001" - + "*Z\\\"W/v2/{authorized_view_name=projects/" - + "*/instances/*/tables/*/authorizedViews/*" - + "}:mutateRows:\001*\212\323\344\223\002\260\001\022:\n\ntable_name\022,{t" - + "able_name=projects/*/instances/*/tables/" - + "*}\022\020\n\016app_profile_id\022`\n\024authorized_view_" - + "name\022H{authorized_view_name=projects/*/i" - + "nstances/*/tables/*/authorizedViews/*}0\001" - + "\022\366\004\n\021CheckAndMutateRow\022,.google.bigtable" - + ".v2.CheckAndMutateRowRequest\032-.google.bi" - + "gtable.v2.CheckAndMutateRowResponse\"\203\004\332A" - + "Btable_name,row_key,predicate_filter,tru" - + "e_mutations,false_mutations\332AQtable_name" - + ",row_key,predicate_filter,true_mutations" - + ",false_mutations,app_profile_id\202\323\344\223\002\254\001\"B" - + "/v2/{table_name=projects/*/instances/*/t" - + "ables/*}:checkAndMutateRow:\001*Zc\"^/v2/{au" - + "thorized_view_name=projects/*/instances/" - + "*/tables/*/authorizedViews/*}:checkAndMu" - + "tateRow:\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\022" - + "H{authorized_view_name=projects/*/instan" - + "ces/*/tables/*/authorizedViews/*}\022\356\001\n\013Pi" - + "ngAndWarm\022&.google.bigtable.v2.PingAndWa" - + "rmRequest\032\'.google.bigtable.v2.PingAndWa" - + "rmResponse\"\215\001\332A\004name\332A\023name,app_profile_" - + "id\202\323\344\223\002+\"&/v2/{name=projects/*/instances" - + "/*}:ping:\001*\212\323\344\223\0029\022%\n\004name\022\035{name=project" - + "s/*/instances/*}\022\020\n\016app_profile_id\022\247\004\n\022R" - + "eadModifyWriteRow\022-.google.bigtable.v2.R" - + "eadModifyWriteRowRequest\032..google.bigtab" - + "le.v2.ReadModifyWriteRowResponse\"\261\003\332A\030ta" - + "ble_name,row_key,rules\332A\'table_name,row_" - + "key,rules,app_profile_id\202\323\344\223\002\256\001\"C/v2/{ta" - + "ble_name=projects/*/instances/*/tables/*" - + "}:readModifyWriteRow:\001*Zd\"_/v2/{authoriz" - + "ed_view_name=projects/*/instances/*/tabl" - + "es/*/authorizedViews/*}:readModifyWriteR" - + "ow:\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{aut" - + "horized_view_name=projects/*/instances/*" - + "/tables/*/authorizedViews/*}\022\273\002\n%Generat" - + "eInitialChangeStreamPartitions\022@.google." - + "bigtable.v2.GenerateInitialChangeStreamP" - + "artitionsRequest\032A.google.bigtable.v2.Ge" - + "nerateInitialChangeStreamPartitionsRespo" - + "nse\"\212\001\332A\ntable_name\332A\031table_name,app_pro" - + "file_id\202\323\344\223\002[\"V/v2/{table_name=projects/" - + "*/instances/*/tables/*}:generateInitialC" - + "hangeStreamPartitions:\001*0\001\022\346\001\n\020ReadChang" - + "eStream\022+.google.bigtable.v2.ReadChangeS" - + "treamRequest\032,.google.bigtable.v2.ReadCh" - + "angeStreamResponse\"u\332A\ntable_name\332A\031tabl" - + "e_name,app_profile_id\202\323\344\223\002F\"A/v2/{table_" - + "name=projects/*/instances/*/tables/*}:re" - + "adChangeStream:\001*0\001\032\333\002\312A\027bigtable.google" - + "apis.com\322A\275\002https://www.googleapis.com/a" - + "uth/bigtable.data,https://www.googleapis" - + ".com/auth/bigtable.data.readonly,https:/" - + "/www.googleapis.com/auth/cloud-bigtable." - + "data,https://www.googleapis.com/auth/clo" - + "ud-bigtable.data.readonly,https://www.go" - + "ogleapis.com/auth/cloud-platform,https:/" - + "/www.googleapis.com/auth/cloud-platform." - + "read-onlyB\366\003\n\026com.google.bigtable.v2B\rBi" - + "gtableProtoP\001Z:google.golang.org/genprot" - + "o/googleapis/bigtable/v2;bigtable\252\002\030Goog" - + "le.Cloud.Bigtable.V2\312\002\030Google\\Cloud\\Bigt" - + "able\\V2\352\002\033Google::Cloud::Bigtable::V2\352AP" - + "\n%bigtableadmin.googleapis.com/Instance\022" - + "\'projects/{project}/instances/{instance}" - + "\352A\\\n\"bigtableadmin.googleapis.com/Table\022" - + "6projects/{project}/instances/{instance}" - + "/tables/{table}\352A\207\001\n+bigtableadmin.googl" - + "eapis.com/AuthorizedView\022Xprojects/{proj" - + "ect}/instances/{instance}/tables/{table}" - + "/authorizedViews/{authorized_view}b\006prot" - + "o3" + + "able/v2/request_stats.proto\032\036google/bigt" + + "able/v2/types.proto\032\036google/protobuf/dur" + + "ation.proto\032\037google/protobuf/timestamp.p" + + "roto\032\036google/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.g" + + "oogle.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.bi" + + "gtable.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.googl" + + "e.bigtable.v2.ReadChangeStreamResponse.DataChangeH\000\022K\n" + + "\theartbeat\030\002 \001(\01326.google." + + "bigtable.v2.ReadChangeStreamResponse.HeartbeatH\000\022P\n" + + "\014close_stream\030\003 \001(\01328.google." + + "bigtable.v2.ReadChangeStreamResponse.CloseStreamH\000\032\364\001\n\r" + + "MutationChunk\022X\n\n" + + "chunk_info\030\001 \001(\0132D.google.bigtable.v2.ReadChange" + + "StreamResponse.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(\0162<.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:.google.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+.g" + + "oogle.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.v" + + "2.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\263%\n" + + "\010Bigtable\022\302\003\n" + + "\010ReadRows\022#.go" + + "ogle.bigtable.v2.ReadRowsRequest\032$.google.bigtable.v2.ReadRowsResponse\"\350\002\332A\n" + + "table_name\332A\031table_name,app_profile_id\202\323\344\223\002\232" + + "\001\"9/v2/{table_name=projects/*/instances/" + + "*/tables/*}:readRows:\001*ZZ\"U/v2/{authorized_view_name=projects/*/instances/*/tabl" + + "es/*/authorizedViews/*}:readRows:\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\325\003\n\r" + + "SampleRowKeys\022(.google.bigtable.v2.Sampl" + + "eRowKeysRequest\032).google.bigtable.v2.SampleRowKeysResponse\"\354\002\332A\n" + + "table_name\332A\031table_name,app_profile_id\202\323\344\223\002\236\001\022>/v2/{tabl" + + "e_name=projects/*/instances/*/tables/*}:sampleRowKeysZ\\\022Z/v2/{authorized_view_na" + + "me=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys\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" + + "\024auth" + + "orized_view_name\022/{table_name=projects/*/instances/*/tables/*}/**0\001\022\351\003\n" + + "\tMutateRow\022$.google.bigtable.v2.MutateRowRequest\032" + + "%.google.bigtable.v2.MutateRowResponse\"\216" + + "\003\332A\034table_name,row_key,mutations\332A+table" + + "_name,row_key,mutations,app_profile_id\202\323" + + "\344\223\002\234\001\":/v2/{table_name=projects/*/instan" + + "ces/*/tables/*}:mutateRow:\001*Z[\"V/v2/{authorized_view_name=projects/*/instances/*" + + "/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_n" + + "ame=projects/*/instances/*/tables/*}/**\022\334\003\n\n" + + "MutateRows\022%.google.bigtable.v2.MutateRowsRequest\032&.google.bigtable.v2.Mutat" + + "eRowsResponse\"\374\002\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\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.v" + + "2.CheckAndMutateRowRequest\032-.google.bigt" + + "able.v2.CheckAndMutateRowResponse\"\352\003\332ABt" + + "able_name,row_key,predicate_filter,true_mutations,false_mutations\332AQtable_name,r" + + "ow_key,predicate_filter,true_mutations,f" + + "alse_mutations,app_profile_id\202\323\344\223\002\254\001\"B/v" + + "2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow:\001*Zc\"^/v2/{auth" + + "orized_view_name=projects/*/instances/*/" + + "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_view_name\022/{" + + "table_name=projects/*/instances/*/tables/*}/**\022\356\001\n" + + "\013PingAndWarm\022&.google.bigtable.v2.PingAndWarmRequest\032\'.google.bigtable" + + ".v2.PingAndWarmResponse\"\215\001\332A\004name\332A\023name" + + ",app_profile_id\202\323\344\223\002+\"&/v2/{name=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.ReadModifyWriteRowRequest\032.." + + "google.bigtable.v2.ReadModifyWriteRowRes" + + "ponse\"\230\003\332A\030table_name,row_key,rules\332A\'ta" + + "ble_name,row_key,rules,app_profile_id\202\323\344" + + "\223\002\256\001\"C/v2/{table_name=projects/*/instanc" + + "es/*/tables/*}:readModifyWriteRow:\001*Zd\"_/v2/{authorized_view_name=projects/*/ins" + + "tances/*/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" + + "\024authorized_vi" + + "ew_name\022/{table_name=projects/*/instances/*/tables/*}/**\022\273\002\n" + + "%GenerateInitialChangeStreamPartitions\022@.google.bigtable.v2." + + "GenerateInitialChangeStreamPartitionsReq" + + "uest\032A.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse\"\212\001\332A\n" + + "table_name\332A\031table_name,app_profile_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.ReadChangeStreamRequest" + + "\032,.google.bigtable.v2.ReadChangeStreamResponse\"u\332A\n" + + "table_name\332A\031table_name,app_p" + + "rofile_id\202\323\344\223\002F\"A/v2/{table_name=project" + + "s/*/instances/*/tables/*}:readChangeStream:\001*0\001\022\251\002\n" + + "\014PrepareQuery\022\'.google.bigtable.v2.PrepareQueryRequest\032(.google.bigta" + + "ble.v2.PrepareQueryResponse\"\305\001\332A\023instanc" + + "e_name,query\332A\"instance_name,query,app_p" + + "rofile_id\202\323\344\223\002<\"7/v2/{instance_name=proj" + + "ects/*/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.ExecuteQueryRe" + + "quest\032(.google.bigtable.v2.ExecuteQueryR" + + "esponse\"\305\001\332A\023instance_name,query\332A\"insta" + + "nce_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\032\333\002\312A\027bigtable.googleapis.com\322A" + + "\275\002https://www.googleapis.com/auth/bigtable.data,https://www.googleapis.com/auth/" + + "bigtable.data.readonly,https://www.googleapis.com/auth/cloud-bigtable.data,https" + + "://www.googleapis.com/auth/cloud-bigtable.data.readonly,https://www.googleapis.c" + + "om/auth/cloud-platform,https://www.googl" + + "eapis.com/auth/cloud-platform.read-onlyB\365\004\n" + + "\026com.google.bigtable.v2B\r" + + "BigtableProtoP\001Z8cloud.google.com/go/bigtable/apiv2/" + + "bigtablepb;bigtablepb\252\002\030Google.Cloud.Big" + + "table.V2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Google::Cloud::Bigtable::V2\352AP\n" + + "%bigtablead" + + "min.googleapis.com/Instance\022\'projects/{project}/instances/{instance}\352A\\\n" + + "\"bigtableadmin.googleapis.com/Table\0226projects/{p" + + "roject}/instances/{instance}/tables/{table}\352A\207\001\n" + + "+bigtableadmin.googleapis.com/AuthorizedView\022Xprojects/{project}/instanc" + + "es/{instance}/tables/{table}/authorizedViews/{authorized_view}\352A~\n" + + "-bigtableadmin.googleapis.com/MaterializedView\022Mprojec" + + "ts/{project}/instances/{instance}/materializedViews/{materialized_view}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -415,6 +505,7 @@ 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.TypesProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.protobuf.WrappersProto.getDescriptor(), @@ -428,6 +519,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "TableName", "AuthorizedViewName", + "MaterializedViewName", "AppProfileId", "Rows", "Filter", @@ -466,7 +558,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.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); @@ -482,7 +574,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.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); @@ -504,7 +601,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.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); @@ -679,6 +776,61 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Status", "ContinuationTokens", "NewPartitions", }); + internal_static_google_bigtable_v2_ExecuteQueryRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_bigtable_v2_ExecuteQueryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_ParamsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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); + internal_static_google_bigtable_v2_ExecuteQueryResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ExecuteQueryResponse_descriptor, + new java.lang.String[] { + "Metadata", "Results", "Response", + }); + internal_static_google_bigtable_v2_PrepareQueryRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_bigtable_v2_PrepareQueryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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.getNestedTypes().get(0); + internal_static_google_bigtable_v2_PrepareQueryRequest_ParamTypesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_PrepareQueryRequest_ParamTypesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_bigtable_v2_PrepareQueryResponse_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_bigtable_v2_PrepareQueryResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_PrepareQueryResponse_descriptor, + new java.lang.String[] { + "Metadata", "PreparedQuery", "ValidUntil", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -698,6 +850,7 @@ 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.TypesProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.protobuf.WrappersProto.getDescriptor(); 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..7871bffee1 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class Cell extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.Cell) CellOrBuilder { private static final long serialVersionUID = 0L; + // Use Cell.newBuilder() to construct. private Cell(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,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 +89,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 +113,7 @@ public com.google.protobuf.ByteString getValue() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList labels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -124,6 +128,7 @@ public com.google.protobuf.ByteString getValue() { public com.google.protobuf.ProtocolStringList getLabelsList() { return labels_; } + /** * * @@ -138,6 +143,7 @@ public com.google.protobuf.ProtocolStringList getLabelsList() { public int getLabelsCount() { return labels_.size(); } + /** * * @@ -153,6 +159,7 @@ public int getLabelsCount() { public java.lang.String getLabels(int index) { return labels_.get(index); } + /** * * @@ -351,6 +358,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -563,6 +571,7 @@ public Builder mergeFrom( private int bitField0_; private long timestampMicros_; + /** * * @@ -583,6 +592,7 @@ public Builder mergeFrom( public long getTimestampMicros() { return timestampMicros_; } + /** * * @@ -607,6 +617,7 @@ public Builder setTimestampMicros(long value) { onChanged(); return this; } + /** * * @@ -631,6 +642,7 @@ public Builder clearTimestampMicros() { } private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -648,6 +660,7 @@ public Builder clearTimestampMicros() { public com.google.protobuf.ByteString getValue() { return value_; } + /** * * @@ -671,6 +684,7 @@ public Builder setValue(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -700,6 +714,7 @@ private void ensureLabelsIsMutable() { } bitField0_ |= 0x00000004; } + /** * * @@ -715,6 +730,7 @@ public com.google.protobuf.ProtocolStringList getLabelsList() { labels_.makeImmutable(); return labels_; } + /** * * @@ -729,6 +745,7 @@ public com.google.protobuf.ProtocolStringList getLabelsList() { public int getLabelsCount() { return labels_.size(); } + /** * * @@ -744,6 +761,7 @@ public int getLabelsCount() { public java.lang.String getLabels(int index) { return labels_.get(index); } + /** * * @@ -759,6 +777,7 @@ public java.lang.String getLabels(int index) { public com.google.protobuf.ByteString getLabelsBytes(int index) { return labels_.getByteString(index); } + /** * * @@ -782,6 +801,7 @@ public Builder setLabels(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -804,6 +824,7 @@ public Builder addLabels(java.lang.String value) { onChanged(); return this; } + /** * * @@ -823,6 +844,7 @@ public Builder addAllLabels(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -841,6 +863,7 @@ public Builder clearLabels() { onChanged(); return this; } + /** * * 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..d8121e8295 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface CellOrBuilder @@ -69,6 +69,7 @@ public interface CellOrBuilder * @return A list containing the labels. */ java.util.List getLabelsList(); + /** * * @@ -81,6 +82,7 @@ public interface CellOrBuilder * @return The count of labels. */ int getLabelsCount(); + /** * * @@ -94,6 +96,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..e76cb7cbf5 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class CheckAndMutateRowRequest extends com.google.protobuf.Generate // @@protoc_insertion_point(message_implements:google.bigtable.v2.CheckAndMutateRowRequest) CheckAndMutateRowRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use CheckAndMutateRowRequest.newBuilder() to construct. private CheckAndMutateRowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -73,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -102,6 +104,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -136,6 +139,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object authorizedViewName_ = ""; + /** * * @@ -165,6 +169,7 @@ public java.lang.String getAuthorizedViewName() { return s; } } + /** * * @@ -199,6 +204,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -223,6 +229,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -250,6 +257,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 +277,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 +296,7 @@ public com.google.protobuf.ByteString getRowKey() { public boolean hasPredicateFilter() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -307,6 +317,7 @@ public com.google.bigtable.v2.RowFilter getPredicateFilter() { ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : predicateFilter_; } + /** * * @@ -330,6 +341,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { @SuppressWarnings("serial") private java.util.List trueMutations_; + /** * * @@ -347,6 +359,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { public java.util.List getTrueMutationsList() { return trueMutations_; } + /** * * @@ -365,6 +378,7 @@ public java.util.List getTrueMutationsList() { getTrueMutationsOrBuilderList() { return trueMutations_; } + /** * * @@ -382,6 +396,7 @@ public java.util.List getTrueMutationsList() { public int getTrueMutationsCount() { return trueMutations_.size(); } + /** * * @@ -399,6 +414,7 @@ public int getTrueMutationsCount() { public com.google.bigtable.v2.Mutation getTrueMutations(int index) { return trueMutations_.get(index); } + /** * * @@ -421,6 +437,7 @@ public com.google.bigtable.v2.MutationOrBuilder getTrueMutationsOrBuilder(int in @SuppressWarnings("serial") private java.util.List falseMutations_; + /** * * @@ -438,6 +455,7 @@ public com.google.bigtable.v2.MutationOrBuilder getTrueMutationsOrBuilder(int in public java.util.List getFalseMutationsList() { return falseMutations_; } + /** * * @@ -456,6 +474,7 @@ public java.util.List getFalseMutationsList() { getFalseMutationsOrBuilderList() { return falseMutations_; } + /** * * @@ -473,6 +492,7 @@ public java.util.List getFalseMutationsList() { public int getFalseMutationsCount() { return falseMutations_.size(); } + /** * * @@ -490,6 +510,7 @@ public int getFalseMutationsCount() { public com.google.bigtable.v2.Mutation getFalseMutations(int index) { return falseMutations_.get(index); } + /** * * @@ -730,6 +751,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1104,6 +1126,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -1132,6 +1155,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -1160,6 +1184,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1187,6 +1212,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1210,6 +1236,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -1240,6 +1267,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object authorizedViewName_ = ""; + /** * * @@ -1268,6 +1296,7 @@ public java.lang.String getAuthorizedViewName() { return (java.lang.String) ref; } } + /** * * @@ -1296,6 +1325,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1323,6 +1353,7 @@ public Builder setAuthorizedViewName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1346,6 +1377,7 @@ public Builder clearAuthorizedViewName() { onChanged(); return this; } + /** * * @@ -1376,6 +1408,7 @@ public Builder setAuthorizedViewNameBytes(com.google.protobuf.ByteString value) } private java.lang.Object appProfileId_ = ""; + /** * * @@ -1399,6 +1432,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -1422,6 +1456,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1444,6 +1479,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1462,6 +1498,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -1487,6 +1524,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -1503,6 +1541,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getRowKey() { return rowKey_; } + /** * * @@ -1525,6 +1564,7 @@ public Builder setRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1550,6 +1590,7 @@ public Builder clearRowKey() { com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> predicateFilterBuilder_; + /** * * @@ -1567,6 +1608,7 @@ public Builder clearRowKey() { public boolean hasPredicateFilter() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1590,6 +1632,7 @@ public com.google.bigtable.v2.RowFilter getPredicateFilter() { return predicateFilterBuilder_.getMessage(); } } + /** * * @@ -1615,6 +1658,7 @@ public Builder setPredicateFilter(com.google.bigtable.v2.RowFilter value) { onChanged(); return this; } + /** * * @@ -1637,6 +1681,7 @@ public Builder setPredicateFilter(com.google.bigtable.v2.RowFilter.Builder build onChanged(); return this; } + /** * * @@ -1667,6 +1712,7 @@ public Builder mergePredicateFilter(com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -1689,6 +1735,7 @@ public Builder clearPredicateFilter() { onChanged(); return this; } + /** * * @@ -1706,6 +1753,7 @@ public com.google.bigtable.v2.RowFilter.Builder getPredicateFilterBuilder() { onChanged(); return getPredicateFilterFieldBuilder().getBuilder(); } + /** * * @@ -1727,6 +1775,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { : predicateFilter_; } } + /** * * @@ -1792,6 +1841,7 @@ public java.util.List getTrueMutationsList() { return trueMutationsBuilder_.getMessageList(); } } + /** * * @@ -1812,6 +1862,7 @@ public int getTrueMutationsCount() { return trueMutationsBuilder_.getCount(); } } + /** * * @@ -1832,6 +1883,7 @@ public com.google.bigtable.v2.Mutation getTrueMutations(int index) { return trueMutationsBuilder_.getMessage(index); } } + /** * * @@ -1858,6 +1910,7 @@ public Builder setTrueMutations(int index, com.google.bigtable.v2.Mutation value } return this; } + /** * * @@ -1882,6 +1935,7 @@ public Builder setTrueMutations( } return this; } + /** * * @@ -1908,6 +1962,7 @@ public Builder addTrueMutations(com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -1934,6 +1989,7 @@ public Builder addTrueMutations(int index, com.google.bigtable.v2.Mutation value } return this; } + /** * * @@ -1957,6 +2013,7 @@ public Builder addTrueMutations(com.google.bigtable.v2.Mutation.Builder builderF } return this; } + /** * * @@ -1981,6 +2038,7 @@ public Builder addTrueMutations( } return this; } + /** * * @@ -2005,6 +2063,7 @@ public Builder addAllTrueMutations( } return this; } + /** * * @@ -2028,6 +2087,7 @@ public Builder clearTrueMutations() { } return this; } + /** * * @@ -2051,6 +2111,7 @@ public Builder removeTrueMutations(int index) { } return this; } + /** * * @@ -2067,6 +2128,7 @@ public Builder removeTrueMutations(int index) { public com.google.bigtable.v2.Mutation.Builder getTrueMutationsBuilder(int index) { return getTrueMutationsFieldBuilder().getBuilder(index); } + /** * * @@ -2087,6 +2149,7 @@ public com.google.bigtable.v2.MutationOrBuilder getTrueMutationsOrBuilder(int in return trueMutationsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -2108,6 +2171,7 @@ public com.google.bigtable.v2.MutationOrBuilder getTrueMutationsOrBuilder(int in return java.util.Collections.unmodifiableList(trueMutations_); } } + /** * * @@ -2125,6 +2189,7 @@ public com.google.bigtable.v2.Mutation.Builder addTrueMutationsBuilder() { return getTrueMutationsFieldBuilder() .addBuilder(com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -2142,6 +2207,7 @@ public com.google.bigtable.v2.Mutation.Builder addTrueMutationsBuilder(int index return getTrueMutationsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -2215,6 +2281,7 @@ public java.util.List getFalseMutationsList() { return falseMutationsBuilder_.getMessageList(); } } + /** * * @@ -2235,6 +2302,7 @@ public int getFalseMutationsCount() { return falseMutationsBuilder_.getCount(); } } + /** * * @@ -2255,6 +2323,7 @@ public com.google.bigtable.v2.Mutation getFalseMutations(int index) { return falseMutationsBuilder_.getMessage(index); } } + /** * * @@ -2281,6 +2350,7 @@ public Builder setFalseMutations(int index, com.google.bigtable.v2.Mutation valu } return this; } + /** * * @@ -2305,6 +2375,7 @@ public Builder setFalseMutations( } return this; } + /** * * @@ -2331,6 +2402,7 @@ public Builder addFalseMutations(com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -2357,6 +2429,7 @@ public Builder addFalseMutations(int index, com.google.bigtable.v2.Mutation valu } return this; } + /** * * @@ -2380,6 +2453,7 @@ public Builder addFalseMutations(com.google.bigtable.v2.Mutation.Builder builder } return this; } + /** * * @@ -2404,6 +2478,7 @@ public Builder addFalseMutations( } return this; } + /** * * @@ -2428,6 +2503,7 @@ public Builder addAllFalseMutations( } return this; } + /** * * @@ -2451,6 +2527,7 @@ public Builder clearFalseMutations() { } return this; } + /** * * @@ -2474,6 +2551,7 @@ public Builder removeFalseMutations(int index) { } return this; } + /** * * @@ -2490,6 +2568,7 @@ public Builder removeFalseMutations(int index) { public com.google.bigtable.v2.Mutation.Builder getFalseMutationsBuilder(int index) { return getFalseMutationsFieldBuilder().getBuilder(index); } + /** * * @@ -2510,6 +2589,7 @@ public com.google.bigtable.v2.MutationOrBuilder getFalseMutationsOrBuilder(int i return falseMutationsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -2531,6 +2611,7 @@ public com.google.bigtable.v2.MutationOrBuilder getFalseMutationsOrBuilder(int i return java.util.Collections.unmodifiableList(falseMutations_); } } + /** * * @@ -2548,6 +2629,7 @@ public com.google.bigtable.v2.Mutation.Builder addFalseMutationsBuilder() { return getFalseMutationsFieldBuilder() .addBuilder(com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -2565,6 +2647,7 @@ public com.google.bigtable.v2.Mutation.Builder addFalseMutationsBuilder(int inde return getFalseMutationsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * 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..0c119cf895 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface CheckAndMutateRowRequestOrBuilder @@ -42,6 +42,7 @@ public interface CheckAndMutateRowRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -79,6 +80,7 @@ public interface CheckAndMutateRowRequestOrBuilder * @return The authorizedViewName. */ java.lang.String getAuthorizedViewName(); + /** * * @@ -111,6 +113,7 @@ public interface CheckAndMutateRowRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -154,6 +157,7 @@ public interface CheckAndMutateRowRequestOrBuilder * @return Whether the predicateFilter field is set. */ boolean hasPredicateFilter(); + /** * * @@ -169,6 +173,7 @@ public interface CheckAndMutateRowRequestOrBuilder * @return The predicateFilter. */ com.google.bigtable.v2.RowFilter getPredicateFilter(); + /** * * @@ -197,6 +202,7 @@ public interface CheckAndMutateRowRequestOrBuilder * repeated .google.bigtable.v2.Mutation true_mutations = 4; */ java.util.List getTrueMutationsList(); + /** * * @@ -211,6 +217,7 @@ public interface CheckAndMutateRowRequestOrBuilder * repeated .google.bigtable.v2.Mutation true_mutations = 4; */ com.google.bigtable.v2.Mutation getTrueMutations(int index); + /** * * @@ -225,6 +232,7 @@ public interface CheckAndMutateRowRequestOrBuilder * repeated .google.bigtable.v2.Mutation true_mutations = 4; */ int getTrueMutationsCount(); + /** * * @@ -240,6 +248,7 @@ public interface CheckAndMutateRowRequestOrBuilder */ java.util.List getTrueMutationsOrBuilderList(); + /** * * @@ -269,6 +278,7 @@ public interface CheckAndMutateRowRequestOrBuilder * repeated .google.bigtable.v2.Mutation false_mutations = 5; */ java.util.List getFalseMutationsList(); + /** * * @@ -283,6 +293,7 @@ public interface CheckAndMutateRowRequestOrBuilder * repeated .google.bigtable.v2.Mutation false_mutations = 5; */ com.google.bigtable.v2.Mutation getFalseMutations(int index); + /** * * @@ -297,6 +308,7 @@ public interface CheckAndMutateRowRequestOrBuilder * repeated .google.bigtable.v2.Mutation false_mutations = 5; */ int getFalseMutationsCount(); + /** * * @@ -312,6 +324,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..76a46ac08a 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class CheckAndMutateRowResponse extends com.google.protobuf.Generat // @@protoc_insertion_point(message_implements:google.bigtable.v2.CheckAndMutateRowResponse) CheckAndMutateRowResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use CheckAndMutateRowResponse.newBuilder() to construct. private CheckAndMutateRowResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -63,6 +64,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int PREDICATE_MATCHED_FIELD_NUMBER = 1; private boolean predicateMatched_ = false; + /** * * @@ -239,6 +241,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -421,6 +424,7 @@ public Builder mergeFrom( private int bitField0_; private boolean predicateMatched_; + /** * * @@ -437,6 +441,7 @@ public Builder mergeFrom( public boolean getPredicateMatched() { return predicateMatched_; } + /** * * @@ -457,6 +462,7 @@ public Builder setPredicateMatched(boolean value) { onChanged(); return this; } + /** * * 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..8a75173fe2 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface CheckAndMutateRowResponseOrBuilder 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..0c56ab76d7 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -34,6 +34,7 @@ public final class Column extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.Column) ColumnOrBuilder { private static final long serialVersionUID = 0L; + // Use Column.newBuilder() to construct. private Column(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,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 +91,7 @@ public com.google.protobuf.ByteString getQualifier() { @SuppressWarnings("serial") private java.util.List cells_; + /** * * @@ -102,6 +105,7 @@ public com.google.protobuf.ByteString getQualifier() { public java.util.List getCellsList() { return cells_; } + /** * * @@ -115,6 +119,7 @@ public java.util.List getCellsList() { public java.util.List getCellsOrBuilderList() { return cells_; } + /** * * @@ -128,6 +133,7 @@ public java.util.List getCellsOr public int getCellsCount() { return cells_.size(); } + /** * * @@ -141,6 +147,7 @@ public int getCellsCount() { public com.google.bigtable.v2.Cell getCells(int index) { return cells_.get(index); } + /** * * @@ -323,6 +330,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -560,6 +568,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ByteString qualifier_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -579,6 +588,7 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getQualifier() { return qualifier_; } + /** * * @@ -604,6 +614,7 @@ public Builder setQualifier(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -657,6 +668,7 @@ public java.util.List getCellsList() { return cellsBuilder_.getMessageList(); } } + /** * * @@ -673,6 +685,7 @@ public int getCellsCount() { return cellsBuilder_.getCount(); } } + /** * * @@ -689,6 +702,7 @@ public com.google.bigtable.v2.Cell getCells(int index) { return cellsBuilder_.getMessage(index); } } + /** * * @@ -711,6 +725,7 @@ public Builder setCells(int index, com.google.bigtable.v2.Cell value) { } return this; } + /** * * @@ -730,6 +745,7 @@ public Builder setCells(int index, com.google.bigtable.v2.Cell.Builder builderFo } return this; } + /** * * @@ -752,6 +768,7 @@ public Builder addCells(com.google.bigtable.v2.Cell value) { } return this; } + /** * * @@ -774,6 +791,7 @@ public Builder addCells(int index, com.google.bigtable.v2.Cell value) { } return this; } + /** * * @@ -793,6 +811,7 @@ public Builder addCells(com.google.bigtable.v2.Cell.Builder builderForValue) { } return this; } + /** * * @@ -812,6 +831,7 @@ public Builder addCells(int index, com.google.bigtable.v2.Cell.Builder builderFo } return this; } + /** * * @@ -831,6 +851,7 @@ public Builder addAllCells(java.lang.Iterable getCellsOr return java.util.Collections.unmodifiableList(cells_); } } + /** * * @@ -925,6 +951,7 @@ public java.util.List getCellsOr public com.google.bigtable.v2.Cell.Builder addCellsBuilder() { return getCellsFieldBuilder().addBuilder(com.google.bigtable.v2.Cell.getDefaultInstance()); } + /** * * @@ -938,6 +965,7 @@ public com.google.bigtable.v2.Cell.Builder addCellsBuilder(int index) { return getCellsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Cell.getDefaultInstance()); } + /** * * 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 new file mode 100644 index 0000000000..f4243ae0c6 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnMetadata.java @@ -0,0 +1,913 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +/** + * + * + *
    + * Describes a column in a Bigtable Query Language result set.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.ColumnMetadata} + */ +public final class ColumnMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ColumnMetadata) + ColumnMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ColumnMetadata.newBuilder() to construct. + private ColumnMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ColumnMetadata() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ColumnMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ColumnMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ColumnMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ColumnMetadata.class, + com.google.bigtable.v2.ColumnMetadata.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
    +   * The name of the column.
    +   * 
    + * + * 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 name of the column.
    +   * 
    + * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private com.google.bigtable.v2.Type type_; + + /** + * + * + *
    +   * The type of the column.
    +   * 
    + * + * .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 the column.
    +   * 
    + * + * .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 the column.
    +   * 
    + * + * .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.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.ColumnMetadata)) { + return super.equals(obj); + } + com.google.bigtable.v2.ColumnMetadata other = (com.google.bigtable.v2.ColumnMetadata) obj; + + if (!getName().equals(other.getName())) return false; + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (!getType().equals(other.getType())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.ColumnMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ColumnMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ColumnMetadata parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ColumnMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ColumnMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ColumnMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ColumnMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.ColumnMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * Describes a column in a Bigtable Query Language result set.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.ColumnMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ColumnMetadata) + com.google.bigtable.v2.ColumnMetadataOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ColumnMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ColumnMetadata.class, + com.google.bigtable.v2.ColumnMetadata.Builder.class); + } + + // Construct using com.google.bigtable.v2.ColumnMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTypeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ColumnMetadata_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.ColumnMetadata getDefaultInstanceForType() { + return com.google.bigtable.v2.ColumnMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.ColumnMetadata build() { + com.google.bigtable.v2.ColumnMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.ColumnMetadata buildPartial() { + com.google.bigtable.v2.ColumnMetadata result = + new com.google.bigtable.v2.ColumnMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.ColumnMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + 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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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) { + return mergeFrom((com.google.bigtable.v2.ColumnMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.ColumnMetadata other) { + if (other == com.google.bigtable.v2.ColumnMetadata.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasType()) { + mergeType(other.getType()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
    +     * The name of the column.
    +     * 
    + * + * 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 name of the column.
    +     * 
    + * + * 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 name of the column.
    +     * 
    + * + * 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 name of the column.
    +     * 
    + * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * The name of the column.
    +     * 
    + * + * 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.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 the column.
    +     * 
    + * + * .google.bigtable.v2.Type type = 2; + * + * @return Whether the type field is set. + */ + public boolean hasType() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +     * The type of the column.
    +     * 
    + * + * .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 the column.
    +     * 
    + * + * .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 the column.
    +     * 
    + * + * .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 the column.
    +     * 
    + * + * .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 the column.
    +     * 
    + * + * .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 the column.
    +     * 
    + * + * .google.bigtable.v2.Type type = 2; + */ + public com.google.bigtable.v2.Type.Builder getTypeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * The type of the column.
    +     * 
    + * + * .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 the column.
    +     * 
    + * + * .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_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ColumnMetadata) + private static final com.google.bigtable.v2.ColumnMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.ColumnMetadata(); + } + + public static com.google.bigtable.v2.ColumnMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ColumnMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.bigtable.v2.ColumnMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} 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 new file mode 100644 index 0000000000..aef1597fcf --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnMetadataOrBuilder.java @@ -0,0 +1,89 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +public interface ColumnMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ColumnMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The name of the column.
    +   * 
    + * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
    +   * The name of the column.
    +   * 
    + * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
    +   * The type of the column.
    +   * 
    + * + * .google.bigtable.v2.Type type = 2; + * + * @return Whether the type field is set. + */ + boolean hasType(); + + /** + * + * + *
    +   * The type of the column.
    +   * 
    + * + * .google.bigtable.v2.Type type = 2; + * + * @return The type. + */ + com.google.bigtable.v2.Type getType(); + + /** + * + * + *
    +   * The type of the column.
    +   * 
    + * + * .google.bigtable.v2.Type type = 2; + */ + com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder(); +} 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..1c2720e690 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface ColumnOrBuilder @@ -51,6 +51,7 @@ public interface ColumnOrBuilder * repeated .google.bigtable.v2.Cell cells = 2; */ java.util.List getCellsList(); + /** * * @@ -61,6 +62,7 @@ public interface ColumnOrBuilder * repeated .google.bigtable.v2.Cell cells = 2; */ com.google.bigtable.v2.Cell getCells(int index); + /** * * @@ -71,6 +73,7 @@ public interface ColumnOrBuilder * repeated .google.bigtable.v2.Cell cells = 2; */ int getCellsCount(); + /** * * @@ -81,6 +84,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..1d29fc8867 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -36,6 +36,7 @@ public final class ColumnRange extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.ColumnRange) ColumnRangeOrBuilder { private static final long serialVersionUID = 0L; + // Use ColumnRange.newBuilder() to construct. private ColumnRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -83,6 +84,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 +134,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 +171,7 @@ public EndQualifierCase getEndQualifierCase() { @SuppressWarnings("serial") private volatile java.lang.Object familyName_ = ""; + /** * * @@ -191,6 +195,7 @@ public java.lang.String getFamilyName() { return s; } } + /** * * @@ -216,6 +221,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { } public static final int START_QUALIFIER_CLOSED_FIELD_NUMBER = 2; + /** * * @@ -231,6 +237,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { public boolean hasStartQualifierClosed() { return startQualifierCase_ == 2; } + /** * * @@ -251,6 +258,7 @@ public com.google.protobuf.ByteString getStartQualifierClosed() { } public static final int START_QUALIFIER_OPEN_FIELD_NUMBER = 3; + /** * * @@ -266,6 +274,7 @@ public com.google.protobuf.ByteString getStartQualifierClosed() { public boolean hasStartQualifierOpen() { return startQualifierCase_ == 3; } + /** * * @@ -286,6 +295,7 @@ public com.google.protobuf.ByteString getStartQualifierOpen() { } public static final int END_QUALIFIER_CLOSED_FIELD_NUMBER = 4; + /** * * @@ -301,6 +311,7 @@ public com.google.protobuf.ByteString getStartQualifierOpen() { public boolean hasEndQualifierClosed() { return endQualifierCase_ == 4; } + /** * * @@ -321,6 +332,7 @@ public com.google.protobuf.ByteString getEndQualifierClosed() { } public static final int END_QUALIFIER_OPEN_FIELD_NUMBER = 5; + /** * * @@ -336,6 +348,7 @@ public com.google.protobuf.ByteString getEndQualifierClosed() { public boolean hasEndQualifierOpen() { return endQualifierCase_ == 5; } + /** * * @@ -590,6 +603,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -871,6 +885,7 @@ public Builder clearEndQualifier() { private int bitField0_; private java.lang.Object familyName_ = ""; + /** * * @@ -893,6 +908,7 @@ public java.lang.String getFamilyName() { return (java.lang.String) ref; } } + /** * * @@ -915,6 +931,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -936,6 +953,7 @@ public Builder setFamilyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -953,6 +971,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -990,6 +1009,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { public boolean hasStartQualifierClosed() { return startQualifierCase_ == 2; } + /** * * @@ -1007,6 +1027,7 @@ public com.google.protobuf.ByteString getStartQualifierClosed() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1028,6 +1049,7 @@ public Builder setStartQualifierClosed(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1062,6 +1084,7 @@ public Builder clearStartQualifierClosed() { public boolean hasStartQualifierOpen() { return startQualifierCase_ == 3; } + /** * * @@ -1079,6 +1102,7 @@ public com.google.protobuf.ByteString getStartQualifierOpen() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1100,6 +1124,7 @@ public Builder setStartQualifierOpen(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1134,6 +1159,7 @@ public Builder clearStartQualifierOpen() { public boolean hasEndQualifierClosed() { return endQualifierCase_ == 4; } + /** * * @@ -1151,6 +1177,7 @@ public com.google.protobuf.ByteString getEndQualifierClosed() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1172,6 +1199,7 @@ public Builder setEndQualifierClosed(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1206,6 +1234,7 @@ public Builder clearEndQualifierClosed() { public boolean hasEndQualifierOpen() { return endQualifierCase_ == 5; } + /** * * @@ -1223,6 +1252,7 @@ public com.google.protobuf.ByteString getEndQualifierOpen() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1244,6 +1274,7 @@ public Builder setEndQualifierOpen(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * 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..26fdf2e390 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface ColumnRangeOrBuilder @@ -36,6 +36,7 @@ public interface ColumnRangeOrBuilder * @return The familyName. */ java.lang.String getFamilyName(); + /** * * @@ -61,6 +62,7 @@ public interface ColumnRangeOrBuilder * @return Whether the startQualifierClosed field is set. */ boolean hasStartQualifierClosed(); + /** * * @@ -86,6 +88,7 @@ public interface ColumnRangeOrBuilder * @return Whether the startQualifierOpen field is set. */ boolean hasStartQualifierOpen(); + /** * * @@ -111,6 +114,7 @@ public interface ColumnRangeOrBuilder * @return Whether the endQualifierClosed field is set. */ boolean hasEndQualifierClosed(); + /** * * @@ -136,6 +140,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 7c48796856..63bc90a428 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public final class DataProto { @@ -48,6 +48,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_v2_Value_descriptor; static final com.google.protobuf.GeneratedMessageV3.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 + 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 @@ -96,6 +100,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_v2_Mutation_AddToCell_descriptor; static final com.google.protobuf.GeneratedMessageV3.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 + 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 @@ -124,6 +132,38 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_v2_StreamContinuationToken_descriptor; static final com.google.protobuf.GeneratedMessageV3.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 + 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 + 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 + 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 + 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 + 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 + 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 + 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.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_Idempotency_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -133,103 +173,190 @@ 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\"@\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\tqualifi" - + "er\030\001 \001(\014\022\'\n\005cells\030\002 \003(\0132\030.google.bigtabl" - + "e.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\"Y\n\005Va" - + "lue\022\023\n\traw_value\030\010 \001(\014H\000\022\036\n\024raw_timestam" - + "p_micros\030\t \001(\003H\000\022\023\n\tint_value\030\006 \001(\003H\000B\006\n" - + "\004kind\"\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(\014" - + "H\001B\013\n\tstart_keyB\t\n\007end_key\"L\n\006RowSet\022\020\n\010" - + "row_keys\030\001 \003(\014\0220\n\nrow_ranges\030\002 \003(\0132\034.goo" - + "gle.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_q" - + "ualifierB\017\n\rend_qualifier\"N\n\016TimestampRa" - + "nge\022\036\n\026start_timestamp_micros\030\001 \001(\003\022\034\n\024e" - + "nd_timestamp_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\016end_value_open\030\004 \001(\014H\001B\r\n\013star" - + "t_valueB\013\n\tend_value\"\337\010\n\tRowFilter\0224\n\005ch" - + "ain\030\001 \001(\0132#.google.bigtable.v2.RowFilter" - + ".ChainH\000\022>\n\ninterleave\030\002 \001(\0132(.google.bi" - + "gtable.v2.RowFilter.InterleaveH\000\022<\n\tcond" - + "ition\030\003 \001(\0132\'.google.bigtable.v2.RowFilt" - + "er.ConditionH\000\022\016\n\004sink\030\020 \001(\010H\000\022\031\n\017pass_a" - + "ll_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_nam" - + "e_regex_filter\030\005 \001(\tH\000\022\'\n\035column_qualifi" - + "er_regex_filter\030\006 \001(\014H\000\022>\n\023column_range_" - + "filter\030\007 \001(\0132\037.google.bigtable.v2.Column" - + "RangeH\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_ran" - + "ge_filter\030\017 \001(\0132\036.google.bigtable.v2.Val" - + "ueRangeH\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(\010" - + "H\000\022!\n\027apply_label_transformer\030\023 \001(\tH\000\0327\n" - + "\005Chain\022.\n\007filters\030\001 \003(\0132\035.google.bigtabl" - + "e.v2.RowFilter\032<\n\nInterleave\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.g" - + "oogle.bigtable.v2.RowFilter\0222\n\013true_filt" - + "er\030\002 \001(\0132\035.google.bigtable.v2.RowFilter\022" - + "3\n\014false_filter\030\003 \001(\0132\035.google.bigtable." - + "v2.RowFilterB\010\n\006filter\"\270\006\n\010Mutation\0228\n\010s" - + "et_cell\030\001 \001(\0132$.google.bigtable.v2.Mutat" - + "ion.SetCellH\000\022=\n\013add_to_cell\030\005 \001(\0132&.goo" - + "gle.bigtable.v2.Mutation.AddToCellH\000\022K\n\022" - + "delete_from_column\030\002 \001(\0132-.google.bigtab" - + "le.v2.Mutation.DeleteFromColumnH\000\022K\n\022del" - + "ete_from_family\030\003 \001(\0132-.google.bigtable." - + "v2.Mutation.DeleteFromFamilyH\000\022E\n\017delete" - + "_from_row\030\004 \001(\0132*.google.bigtable.v2.Mut" - + "ation.DeleteFromRowH\000\032a\n\007SetCell\022\023\n\013fami" - + "ly_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\020c" - + "olumn_qualifier\030\002 \001(\0132\031.google.bigtable." - + "v2.Value\022,\n\ttimestamp\030\003 \001(\0132\031.google.big" - + "table.v2.Value\022(\n\005input\030\004 \001(\0132\031.google.b" - + "igtable.v2.Value\032y\n\020DeleteFromColumn\022\023\n\013" - + "family_name\030\001 \001(\t\022\030\n\020column_qualifier\030\002 " - + "\001(\014\0226\n\ntime_range\030\003 \001(\0132\".google.bigtabl" - + "e.v2.TimestampRange\032\'\n\020DeleteFromFamily\022" - + "\023\n\013family_name\030\001 \001(\t\032\017\n\rDeleteFromRowB\n\n" - + "\010mutation\"\200\001\n\023ReadModifyWriteRule\022\023\n\013fam" - + "ily_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_am" - + "ount\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\006" - + "tokens\030\001 \003(\0132+.google.bigtable.v2.Stream" - + "ContinuationToken\"`\n\027StreamContinuationT" - + "oken\0226\n\tpartition\030\001 \001(\0132#.google.bigtabl" - + "e.v2.StreamPartition\022\r\n\005token\030\002 \001(\tB\265\001\n\026" - + "com.google.bigtable.v2B\tDataProtoP\001Z:goo" - + "gle.golang.org/genproto/googleapis/bigta" - + "ble/v2;bigtable\252\002\030Google.Cloud.Bigtable." - + "V2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Google::" - + "Cloud::Bigtable::V2b\006proto3" + + "roto\032\036google/bigtable/v2/types.proto\032\037go" + + "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.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( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.bigtable.v2.TypesProto.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_fieldAccessorTable = @@ -264,17 +391,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_Value_descriptor, new java.lang.String[] { - "RawValue", "RawTimestampMicros", "IntValue", "Kind", + "Type", + "RawValue", + "RawTimestampMicros", + "BytesValue", + "StringValue", + "IntValue", + "BoolValue", + "FloatValue", + "TimestampValue", + "DateValue", + "ArrayValue", + "Kind", }); - internal_static_google_bigtable_v2_RowRange_descriptor = + internal_static_google_bigtable_v2_ArrayValue_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_google_bigtable_v2_ArrayValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.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(6); + internal_static_google_bigtable_v2_RowSet_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_google_bigtable_v2_RowSet_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_RowSet_descriptor, @@ -282,7 +428,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RowKeys", "RowRanges", }); internal_static_google_bigtable_v2_ColumnRange_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_bigtable_v2_ColumnRange_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_ColumnRange_descriptor, @@ -296,7 +442,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EndQualifier", }); internal_static_google_bigtable_v2_TimestampRange_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_google_bigtable_v2_TimestampRange_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_TimestampRange_descriptor, @@ -304,7 +450,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StartTimestampMicros", "EndTimestampMicros", }); internal_static_google_bigtable_v2_ValueRange_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_bigtable_v2_ValueRange_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_ValueRange_descriptor, @@ -317,7 +463,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EndValue", }); internal_static_google_bigtable_v2_RowFilter_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_google_bigtable_v2_RowFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_RowFilter_descriptor, @@ -368,13 +514,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PredicateFilter", "TrueFilter", "FalseFilter", }); internal_static_google_bigtable_v2_Mutation_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(12); internal_static_google_bigtable_v2_Mutation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_Mutation_descriptor, new java.lang.String[] { "SetCell", "AddToCell", + "MergeToCell", "DeleteFromColumn", "DeleteFromFamily", "DeleteFromRow", @@ -396,8 +543,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "FamilyName", "ColumnQualifier", "Timestamp", "Input", }); - internal_static_google_bigtable_v2_Mutation_DeleteFromColumn_descriptor = + internal_static_google_bigtable_v2_Mutation_MergeToCell_descriptor = internal_static_google_bigtable_v2_Mutation_descriptor.getNestedTypes().get(2); + internal_static_google_bigtable_v2_Mutation_MergeToCell_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_DeleteFromColumn_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_Mutation_DeleteFromColumn_descriptor, @@ -405,7 +560,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FamilyName", "ColumnQualifier", "TimeRange", }); internal_static_google_bigtable_v2_Mutation_DeleteFromFamily_descriptor = - internal_static_google_bigtable_v2_Mutation_descriptor.getNestedTypes().get(3); + internal_static_google_bigtable_v2_Mutation_descriptor.getNestedTypes().get(4); internal_static_google_bigtable_v2_Mutation_DeleteFromFamily_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_Mutation_DeleteFromFamily_descriptor, @@ -413,13 +568,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FamilyName", }); internal_static_google_bigtable_v2_Mutation_DeleteFromRow_descriptor = - internal_static_google_bigtable_v2_Mutation_descriptor.getNestedTypes().get(4); + internal_static_google_bigtable_v2_Mutation_descriptor.getNestedTypes().get(5); internal_static_google_bigtable_v2_Mutation_DeleteFromRow_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_Mutation_DeleteFromRow_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_v2_ReadModifyWriteRule_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(13); internal_static_google_bigtable_v2_ReadModifyWriteRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_ReadModifyWriteRule_descriptor, @@ -427,7 +582,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FamilyName", "ColumnQualifier", "AppendValue", "IncrementAmount", "Rule", }); internal_static_google_bigtable_v2_StreamPartition_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(14); internal_static_google_bigtable_v2_StreamPartition_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_StreamPartition_descriptor, @@ -435,7 +590,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RowRange", }); internal_static_google_bigtable_v2_StreamContinuationTokens_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_google_bigtable_v2_StreamContinuationTokens_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_StreamContinuationTokens_descriptor, @@ -443,14 +598,83 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Tokens", }); internal_static_google_bigtable_v2_StreamContinuationToken_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_bigtable_v2_StreamContinuationToken_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.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_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ProtoFormat_descriptor, new java.lang.String[] {}); + internal_static_google_bigtable_v2_ColumnMetadata_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_bigtable_v2_ColumnMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ProtoSchema_descriptor, + new java.lang.String[] { + "Columns", + }); + internal_static_google_bigtable_v2_ResultSetMetadata_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_bigtable_v2_ResultSetMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ProtoRows_descriptor, + new java.lang.String[] { + "Values", + }); + internal_static_google_bigtable_v2_ProtoRowsBatch_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_bigtable_v2_ProtoRowsBatch_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ProtoRowsBatch_descriptor, + new java.lang.String[] { + "BatchData", + }); + internal_static_google_bigtable_v2_PartialResultSet_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_bigtable_v2_PartialResultSet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_PartialResultSet_descriptor, + new java.lang.String[] { + "ProtoRowsBatch", + "BatchChecksum", + "ResumeToken", + "Reset", + "EstimatedBatchSize", + "PartialRows", + }); + internal_static_google_bigtable_v2_Idempotency_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_bigtable_v2_Idempotency_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_Idempotency_descriptor, + new java.lang.String[] { + "Token", "StartTime", + }); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.bigtable.v2.TypesProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) 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 new file mode 100644 index 0000000000..30adb733d3 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryRequest.java @@ -0,0 +1,2470 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +/** + * + * + *
    + * Request message for Bigtable.ExecuteQuery
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.ExecuteQueryRequest} + */ +public final class ExecuteQueryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ExecuteQueryRequest) + ExecuteQueryRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ExecuteQueryRequest.newBuilder() to construct. + private ExecuteQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + 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; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetParams(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_ExecuteQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ExecuteQueryRequest.class, + com.google.bigtable.v2.ExecuteQueryRequest.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 { + @java.lang.Deprecated + 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 replication. 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 replication. 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.
    +   *
    +   * 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]; + * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1086 + * @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) { + 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.
    +   *
    +   * 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]; + * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1086 + * @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) { + 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 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; + + /** + * + * + *
    +   * Protocol buffer format as described by ProtoSchema and ProtoRows
    +   * messages.
    +   * 
    + * + * .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=1107 + * @return Whether the protoFormat field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasProtoFormat() { + return dataFormatCase_ == 4; + } + + /** + * + * + *
    +   * Protocol buffer format as described by ProtoSchema and ProtoRows
    +   * messages.
    +   * 
    + * + * .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=1107 + * @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(); + } + + /** + * + * + *
    +   * Protocol buffer format as described by ProtoSchema and ProtoRows
    +   * messages.
    +   * 
    + * + * .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_; + } + return com.google.bigtable.v2.ProtoFormat.getDefaultInstance(); + } + + public static final int RESUME_TOKEN_FIELD_NUMBER = 8; + private com.google.protobuf.ByteString resumeToken_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +   * Optional. If this request is resuming a previously interrupted query
    +   * execution, `resume_token` should be copied from the last
    +   * PartialResultSet yielded before the interruption. Doing this
    +   * enables the query execution to resume where the last one left
    +   * off.
    +   * The rest of the request parameters must exactly match the
    +   * request that yielded this token. Otherwise the request will fail.
    +   * 
    + * + * bytes resume_token = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The resumeToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResumeToken() { + return resumeToken_; + } + + public static final int PARAMS_FIELD_NUMBER = 7; + + private static final class ParamsDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_ExecuteQueryRequest_ParamsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.bigtable.v2.Value.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField params_; + + private com.google.protobuf.MapField + internalGetParams() { + if (params_ == null) { + return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); + } + return params_; + } + + public int getParamsCount() { + return internalGetParams().getMap().size(); + } + + /** + * + * + *
    +   * Required. params contains string type keys and Bigtable type values that
    +   * bind to placeholders in the query string. 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
    +   * `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.
    +   *
    +   * 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.
    +   *
    +   * 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`.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public boolean containsParams(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetParams().getMap().containsKey(key); + } + + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getParams() { + return getParamsMap(); + } + + /** + * + * + *
    +   * Required. params contains string type keys and Bigtable type values that
    +   * bind to placeholders in the query string. 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
    +   * `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.
    +   *
    +   * 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.
    +   *
    +   * 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`.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.Map getParamsMap() { + return internalGetParams().getMap(); + } + + /** + * + * + *
    +   * Required. params contains string type keys and Bigtable type values that
    +   * bind to placeholders in the query string. 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
    +   * `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.
    +   *
    +   * 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.
    +   *
    +   * 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`.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public /* nullable */ com.google.bigtable.v2.Value getParamsOrDefault( + java.lang.String key, + /* nullable */ + com.google.bigtable.v2.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
    +   * Required. params contains string type keys and Bigtable type values that
    +   * bind to placeholders in the query string. 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
    +   * `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.
    +   *
    +   * 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.
    +   *
    +   * 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`.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.bigtable.v2.Value getParamsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appProfileId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, query_); + } + if (dataFormatCase_ == 4) { + output.writeMessage(4, (com.google.bigtable.v2.ProtoFormat) dataFormat_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 7); + if (!resumeToken_.isEmpty()) { + output.writeBytes(8, resumeToken_); + } + if (!preparedQuery_.isEmpty()) { + output.writeBytes(9, preparedQuery_); + } + 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(instanceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appProfileId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.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 : + internalGetParams().getMap().entrySet()) { + com.google.protobuf.MapEntry params__ = + ParamsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, params__); + } + 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; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.v2.ExecuteQueryRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.ExecuteQueryRequest other = + (com.google.bigtable.v2.ExecuteQueryRequest) 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; + 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(); + 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()) { + hash = (37 * hash) + PARAMS_FIELD_NUMBER; + hash = (53 * hash) + internalGetParams().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.ExecuteQueryRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ExecuteQueryRequest 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.ExecuteQueryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ExecuteQueryRequest 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.ExecuteQueryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ExecuteQueryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ExecuteQueryRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.ExecuteQueryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * Request message for Bigtable.ExecuteQuery
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.ExecuteQueryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ExecuteQueryRequest) + com.google.bigtable.v2.ExecuteQueryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_ExecuteQueryRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetParams(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetMutableParams(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_ExecuteQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ExecuteQueryRequest.class, + com.google.bigtable.v2.ExecuteQueryRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.ExecuteQueryRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceName_ = ""; + appProfileId_ = ""; + query_ = ""; + preparedQuery_ = com.google.protobuf.ByteString.EMPTY; + if (protoFormatBuilder_ != null) { + protoFormatBuilder_.clear(); + } + resumeToken_ = com.google.protobuf.ByteString.EMPTY; + internalGetMutableParams().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_ExecuteQueryRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.ExecuteQueryRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.ExecuteQueryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.ExecuteQueryRequest build() { + com.google.bigtable.v2.ExecuteQueryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.ExecuteQueryRequest buildPartial() { + com.google.bigtable.v2.ExecuteQueryRequest result = + new com.google.bigtable.v2.ExecuteQueryRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.ExecuteQueryRequest 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_ & 0x00000008) != 0)) { + result.preparedQuery_ = preparedQuery_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.resumeToken_ = resumeToken_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.params_ = internalGetParams().build(ParamsDefaultEntryHolder.defaultEntry); + } + } + + private void buildPartialOneofs(com.google.bigtable.v2.ExecuteQueryRequest result) { + result.dataFormatCase_ = dataFormatCase_; + result.dataFormat_ = this.dataFormat_; + if (dataFormatCase_ == 4 && protoFormatBuilder_ != null) { + result.dataFormat_ = protoFormatBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.ExecuteQueryRequest) { + return mergeFrom((com.google.bigtable.v2.ExecuteQueryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.ExecuteQueryRequest other) { + if (other == com.google.bigtable.v2.ExecuteQueryRequest.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(); + } + if (other.getPreparedQuery() != com.google.protobuf.ByteString.EMPTY) { + setPreparedQuery(other.getPreparedQuery()); + } + if (other.getResumeToken() != com.google.protobuf.ByteString.EMPTY) { + setResumeToken(other.getResumeToken()); + } + internalGetMutableParams().mergeFrom(other.internalGetParams()); + bitField0_ |= 0x00000040; + 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(getProtoFormatFieldBuilder().getBuilder(), extensionRegistry); + dataFormatCase_ = 4; + break; + } // case 34 + case 58: + { + com.google.protobuf.MapEntry + params__ = + input.readMessage( + ParamsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableParams() + .ensureBuilderMap() + .put(params__.getKey(), params__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + resumeToken_ = input.readBytes(); + bitField0_ |= 0x00000020; + break; + } // case 66 + case 74: + { + preparedQuery_ = input.readBytes(); + bitField0_ |= 0x00000008; + 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 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 replication. 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 replication. 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 replication. 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 replication. 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 replication. 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.
    +     *
    +     * 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]; + * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1086 + * @return The query. + */ + @java.lang.Deprecated + 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.
    +     *
    +     * 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]; + * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1086 + * @return The bytes for query. + */ + @java.lang.Deprecated + 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.
    +     *
    +     * 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]; + * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1086 + * @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(); + } + query_ = value; + 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 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1086 + * @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 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1086 + * @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(); + } + checkByteStringIsUtf8(value); + query_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + 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.SingleFieldBuilderV3< + 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 [deprecated = true]; + * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.proto_format is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1107 + * @return Whether the protoFormat field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasProtoFormat() { + return dataFormatCase_ == 4; + } + + /** + * + * + *
    +     * Protocol buffer format as described by ProtoSchema and ProtoRows
    +     * messages.
    +     * 
    + * + * .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=1107 + * @return The protoFormat. + */ + @java.lang.Override + @java.lang.Deprecated + 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 [deprecated = true]; + */ + @java.lang.Deprecated + 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 [deprecated = true]; + */ + @java.lang.Deprecated + 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 [deprecated = true]; + */ + @java.lang.Deprecated + 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 [deprecated = true]; + */ + @java.lang.Deprecated + 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 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.bigtable.v2.ProtoFormat.Builder getProtoFormatBuilder() { + return getProtoFormatFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Protocol buffer format as described by ProtoSchema and ProtoRows
    +     * messages.
    +     * 
    + * + * .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(); + } 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 [deprecated = true]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ProtoFormat, + com.google.bigtable.v2.ProtoFormat.Builder, + com.google.bigtable.v2.ProtoFormatOrBuilder> + getProtoFormatFieldBuilder() { + if (protoFormatBuilder_ == null) { + if (!(dataFormatCase_ == 4)) { + dataFormat_ = com.google.bigtable.v2.ProtoFormat.getDefaultInstance(); + } + protoFormatBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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 com.google.protobuf.ByteString resumeToken_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +     * Optional. If this request is resuming a previously interrupted query
    +     * execution, `resume_token` should be copied from the last
    +     * PartialResultSet yielded before the interruption. Doing this
    +     * enables the query execution to resume where the last one left
    +     * off.
    +     * The rest of the request parameters must exactly match the
    +     * request that yielded this token. Otherwise the request will fail.
    +     * 
    + * + * bytes resume_token = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The resumeToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResumeToken() { + return resumeToken_; + } + + /** + * + * + *
    +     * Optional. If this request is resuming a previously interrupted query
    +     * execution, `resume_token` should be copied from the last
    +     * PartialResultSet yielded before the interruption. Doing this
    +     * enables the query execution to resume where the last one left
    +     * off.
    +     * The rest of the request parameters must exactly match the
    +     * request that yielded this token. Otherwise the request will fail.
    +     * 
    + * + * bytes resume_token = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The resumeToken to set. + * @return This builder for chaining. + */ + public Builder setResumeToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + resumeToken_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. If this request is resuming a previously interrupted query
    +     * execution, `resume_token` should be copied from the last
    +     * PartialResultSet yielded before the interruption. Doing this
    +     * enables the query execution to resume where the last one left
    +     * off.
    +     * The rest of the request parameters must exactly match the
    +     * request that yielded this token. Otherwise the request will fail.
    +     * 
    + * + * bytes resume_token = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearResumeToken() { + bitField0_ = (bitField0_ & ~0x00000020); + resumeToken_ = getDefaultInstance().getResumeToken(); + onChanged(); + return this; + } + + private static final class ParamsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, com.google.bigtable.v2.ValueOrBuilder, com.google.bigtable.v2.Value> { + @java.lang.Override + public com.google.bigtable.v2.Value build(com.google.bigtable.v2.ValueOrBuilder val) { + if (val instanceof com.google.bigtable.v2.Value) { + return (com.google.bigtable.v2.Value) val; + } + return ((com.google.bigtable.v2.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return ParamsDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final ParamsConverter paramsConverter = new ParamsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.bigtable.v2.ValueOrBuilder, + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder> + params_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.bigtable.v2.ValueOrBuilder, + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder> + internalGetParams() { + if (params_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(paramsConverter); + } + return params_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.bigtable.v2.ValueOrBuilder, + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder> + internalGetMutableParams() { + if (params_ == null) { + params_ = new com.google.protobuf.MapFieldBuilder<>(paramsConverter); + } + bitField0_ |= 0x00000040; + onChanged(); + return params_; + } + + public int getParamsCount() { + return internalGetParams().ensureBuilderMap().size(); + } + + /** + * + * + *
    +     * Required. params contains string type keys and Bigtable type values that
    +     * bind to placeholders in the query string. 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
    +     * `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.
    +     *
    +     * 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.
    +     *
    +     * 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`.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public boolean containsParams(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetParams().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getParams() { + return getParamsMap(); + } + + /** + * + * + *
    +     * Required. params contains string type keys and Bigtable type values that
    +     * bind to placeholders in the query string. 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
    +     * `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.
    +     *
    +     * 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.
    +     *
    +     * 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`.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.Map getParamsMap() { + return internalGetParams().getImmutableMap(); + } + + /** + * + * + *
    +     * Required. params contains string type keys and Bigtable type values that
    +     * bind to placeholders in the query string. 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
    +     * `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.
    +     *
    +     * 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.
    +     *
    +     * 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`.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public /* nullable */ com.google.bigtable.v2.Value getParamsOrDefault( + java.lang.String key, + /* nullable */ + com.google.bigtable.v2.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableParams().ensureBuilderMap(); + return map.containsKey(key) ? paramsConverter.build(map.get(key)) : defaultValue; + } + + /** + * + * + *
    +     * Required. params contains string type keys and Bigtable type values that
    +     * bind to placeholders in the query string. 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
    +     * `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.
    +     *
    +     * 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.
    +     *
    +     * 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`.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.bigtable.v2.Value getParamsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableParams().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return paramsConverter.build(map.get(key)); + } + + public Builder clearParams() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableParams().clear(); + return this; + } + + /** + * + * + *
    +     * Required. params contains string type keys and Bigtable type values that
    +     * bind to placeholders in the query string. 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
    +     * `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.
    +     *
    +     * 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.
    +     *
    +     * 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`.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeParams(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableParams().ensureBuilderMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableParams() { + bitField0_ |= 0x00000040; + return internalGetMutableParams().ensureMessageMap(); + } + + /** + * + * + *
    +     * Required. params contains string type keys and Bigtable type values that
    +     * bind to placeholders in the query string. 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
    +     * `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.
    +     *
    +     * 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.
    +     *
    +     * 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`.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder putParams(java.lang.String key, com.google.bigtable.v2.Value value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableParams().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + + /** + * + * + *
    +     * Required. params contains string type keys and Bigtable type values that
    +     * bind to placeholders in the query string. 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
    +     * `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.
    +     *
    +     * 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.
    +     *
    +     * 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`.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder putAllParams( + java.util.Map values) { + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableParams().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + /** + * + * + *
    +     * Required. params contains string type keys and Bigtable type values that
    +     * bind to placeholders in the query string. 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
    +     * `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.
    +     *
    +     * 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.
    +     *
    +     * 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`.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.v2.Value.Builder putParamsBuilderIfAbsent(java.lang.String key) { + java.util.Map builderMap = + internalGetMutableParams().ensureBuilderMap(); + com.google.bigtable.v2.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.bigtable.v2.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.bigtable.v2.Value) { + entry = ((com.google.bigtable.v2.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ExecuteQueryRequest) + private static final com.google.bigtable.v2.ExecuteQueryRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.ExecuteQueryRequest(); + } + + public static com.google.bigtable.v2.ExecuteQueryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecuteQueryRequest 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.ExecuteQueryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} 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 new file mode 100644 index 0000000000..a5bc3c20e9 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryRequestOrBuilder.java @@ -0,0 +1,398 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +public interface ExecuteQueryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ExecuteQueryRequest) + 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 replication. 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 replication. 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.
    +   *
    +   * 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]; + * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1086 + * @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 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1086 + * @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(); + + /** + * + * + *
    +   * Protocol buffer format as described by ProtoSchema and ProtoRows
    +   * messages.
    +   * 
    + * + * .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=1107 + * @return Whether the protoFormat field is set. + */ + @java.lang.Deprecated + boolean hasProtoFormat(); + + /** + * + * + *
    +   * Protocol buffer format as described by ProtoSchema and ProtoRows
    +   * messages.
    +   * 
    + * + * .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=1107 + * @return The protoFormat. + */ + @java.lang.Deprecated + com.google.bigtable.v2.ProtoFormat getProtoFormat(); + + /** + * + * + *
    +   * Protocol buffer format as described by ProtoSchema and ProtoRows
    +   * messages.
    +   * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; + */ + @java.lang.Deprecated + com.google.bigtable.v2.ProtoFormatOrBuilder getProtoFormatOrBuilder(); + + /** + * + * + *
    +   * Optional. If this request is resuming a previously interrupted query
    +   * execution, `resume_token` should be copied from the last
    +   * PartialResultSet yielded before the interruption. Doing this
    +   * enables the query execution to resume where the last one left
    +   * off.
    +   * The rest of the request parameters must exactly match the
    +   * request that yielded this token. Otherwise the request will fail.
    +   * 
    + * + * bytes resume_token = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The resumeToken. + */ + com.google.protobuf.ByteString getResumeToken(); + + /** + * + * + *
    +   * Required. params contains string type keys and Bigtable type values that
    +   * bind to placeholders in the query string. 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
    +   * `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.
    +   *
    +   * 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.
    +   *
    +   * 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`.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getParamsCount(); + + /** + * + * + *
    +   * Required. params contains string type keys and Bigtable type values that
    +   * bind to placeholders in the query string. 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
    +   * `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.
    +   *
    +   * 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.
    +   *
    +   * 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`.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + boolean containsParams(java.lang.String key); + + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getParams(); + + /** + * + * + *
    +   * Required. params contains string type keys and Bigtable type values that
    +   * bind to placeholders in the query string. 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
    +   * `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.
    +   *
    +   * 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.
    +   *
    +   * 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`.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.Map getParamsMap(); + + /** + * + * + *
    +   * Required. params contains string type keys and Bigtable type values that
    +   * bind to placeholders in the query string. 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
    +   * `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.
    +   *
    +   * 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.
    +   *
    +   * 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`.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + /* nullable */ + com.google.bigtable.v2.Value getParamsOrDefault( + java.lang.String key, + /* nullable */ + com.google.bigtable.v2.Value defaultValue); + + /** + * + * + *
    +   * Required. params contains string type keys and Bigtable type values that
    +   * bind to placeholders in the query string. 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
    +   * `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.
    +   *
    +   * 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.
    +   *
    +   * 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`.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Value> params = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.bigtable.v2.Value getParamsOrThrow(java.lang.String key); + + com.google.bigtable.v2.ExecuteQueryRequest.DataFormatCase getDataFormatCase(); +} 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 new file mode 100644 index 0000000000..50e3ade69e --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryResponse.java @@ -0,0 +1,1172 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +/** + * + * + *
    + * Response message for Bigtable.ExecuteQuery
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.ExecuteQueryResponse} + */ +public final class ExecuteQueryResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ExecuteQueryResponse) + ExecuteQueryResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ExecuteQueryResponse.newBuilder() to construct. + private ExecuteQueryResponse(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_ExecuteQueryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ExecuteQueryResponse.class, + com.google.bigtable.v2.ExecuteQueryResponse.Builder.class); + } + + private int responseCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object response_; + + public enum ResponseCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + METADATA(1), + RESULTS(2), + RESPONSE_NOT_SET(0); + private final int value; + + 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. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResponseCase valueOf(int value) { + return forNumber(value); + } + + public static ResponseCase forNumber(int value) { + switch (value) { + case 1: + return METADATA; + case 2: + return RESULTS; + case 0: + return RESPONSE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResponseCase getResponseCase() { + return ResponseCase.forNumber(responseCase_); + } + + public static final int METADATA_FIELD_NUMBER = 1; + + /** + * + * + *
    +   * Structure of rows in this response stream. The first (and only the first)
    +   * response streamed from the server will be of this type.
    +   * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return responseCase_ == 1; + } + + /** + * + * + *
    +   * Structure of rows in this response stream. The first (and only the first)
    +   * response streamed from the server will be of this type.
    +   * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.bigtable.v2.ResultSetMetadata getMetadata() { + if (responseCase_ == 1) { + return (com.google.bigtable.v2.ResultSetMetadata) response_; + } + return com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance(); + } + + /** + * + * + *
    +   * Structure of rows in this response stream. The first (and only the first)
    +   * response streamed from the server will be of this type.
    +   * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.ResultSetMetadataOrBuilder getMetadataOrBuilder() { + if (responseCase_ == 1) { + return (com.google.bigtable.v2.ResultSetMetadata) response_; + } + return com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance(); + } + + public static final int RESULTS_FIELD_NUMBER = 2; + + /** + * + * + *
    +   * A partial result set with row data potentially including additional
    +   * instructions on how recent past and future partial responses should be
    +   * interpreted.
    +   * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + * + * @return Whether the results field is set. + */ + @java.lang.Override + public boolean hasResults() { + return responseCase_ == 2; + } + + /** + * + * + *
    +   * A partial result set with row data potentially including additional
    +   * instructions on how recent past and future partial responses should be
    +   * interpreted.
    +   * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + * + * @return The results. + */ + @java.lang.Override + public com.google.bigtable.v2.PartialResultSet getResults() { + if (responseCase_ == 2) { + return (com.google.bigtable.v2.PartialResultSet) response_; + } + return com.google.bigtable.v2.PartialResultSet.getDefaultInstance(); + } + + /** + * + * + *
    +   * A partial result set with row data potentially including additional
    +   * instructions on how recent past and future partial responses should be
    +   * interpreted.
    +   * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.PartialResultSetOrBuilder getResultsOrBuilder() { + if (responseCase_ == 2) { + return (com.google.bigtable.v2.PartialResultSet) response_; + } + return com.google.bigtable.v2.PartialResultSet.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 (responseCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.v2.ResultSetMetadata) response_); + } + if (responseCase_ == 2) { + output.writeMessage(2, (com.google.bigtable.v2.PartialResultSet) response_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (responseCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.ResultSetMetadata) response_); + } + if (responseCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.v2.PartialResultSet) response_); + } + 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.ExecuteQueryResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.ExecuteQueryResponse other = + (com.google.bigtable.v2.ExecuteQueryResponse) obj; + + if (!getResponseCase().equals(other.getResponseCase())) return false; + switch (responseCase_) { + case 1: + if (!getMetadata().equals(other.getMetadata())) return false; + break; + case 2: + if (!getResults().equals(other.getResults())) 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 (responseCase_) { + case 1: + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + break; + case 2: + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResults().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.ExecuteQueryResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ExecuteQueryResponse 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.ExecuteQueryResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ExecuteQueryResponse 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.ExecuteQueryResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ExecuteQueryResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ExecuteQueryResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.ExecuteQueryResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * Response message for Bigtable.ExecuteQuery
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.ExecuteQueryResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ExecuteQueryResponse) + com.google.bigtable.v2.ExecuteQueryResponseOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_ExecuteQueryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ExecuteQueryResponse.class, + com.google.bigtable.v2.ExecuteQueryResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.ExecuteQueryResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (metadataBuilder_ != null) { + metadataBuilder_.clear(); + } + if (resultsBuilder_ != null) { + resultsBuilder_.clear(); + } + responseCase_ = 0; + response_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_ExecuteQueryResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.ExecuteQueryResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.ExecuteQueryResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.ExecuteQueryResponse build() { + com.google.bigtable.v2.ExecuteQueryResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.ExecuteQueryResponse buildPartial() { + com.google.bigtable.v2.ExecuteQueryResponse result = + new com.google.bigtable.v2.ExecuteQueryResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.ExecuteQueryResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.ExecuteQueryResponse result) { + result.responseCase_ = responseCase_; + result.response_ = this.response_; + if (responseCase_ == 1 && metadataBuilder_ != null) { + result.response_ = metadataBuilder_.build(); + } + if (responseCase_ == 2 && resultsBuilder_ != null) { + result.response_ = resultsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.ExecuteQueryResponse) { + return mergeFrom((com.google.bigtable.v2.ExecuteQueryResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.ExecuteQueryResponse other) { + if (other == com.google.bigtable.v2.ExecuteQueryResponse.getDefaultInstance()) return this; + switch (other.getResponseCase()) { + case METADATA: + { + mergeMetadata(other.getMetadata()); + break; + } + case RESULTS: + { + mergeResults(other.getResults()); + break; + } + case RESPONSE_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(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + responseCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getResultsFieldBuilder().getBuilder(), extensionRegistry); + responseCase_ = 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 responseCase_ = 0; + private java.lang.Object response_; + + public ResponseCase getResponseCase() { + return ResponseCase.forNumber(responseCase_); + } + + public Builder clearResponse() { + responseCase_ = 0; + response_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ResultSetMetadata, + com.google.bigtable.v2.ResultSetMetadata.Builder, + com.google.bigtable.v2.ResultSetMetadataOrBuilder> + metadataBuilder_; + + /** + * + * + *
    +     * Structure of rows in this response stream. The first (and only the first)
    +     * response streamed from the server will be of this type.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return responseCase_ == 1; + } + + /** + * + * + *
    +     * Structure of rows in this response stream. The first (and only the first)
    +     * response streamed from the server will be of this type.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.bigtable.v2.ResultSetMetadata getMetadata() { + if (metadataBuilder_ == null) { + if (responseCase_ == 1) { + return (com.google.bigtable.v2.ResultSetMetadata) response_; + } + return com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance(); + } else { + if (responseCase_ == 1) { + return metadataBuilder_.getMessage(); + } + return com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Structure of rows in this response stream. The first (and only the first)
    +     * response streamed from the server will be of this type.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + public Builder setMetadata(com.google.bigtable.v2.ResultSetMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + responseCase_ = 1; + return this; + } + + /** + * + * + *
    +     * Structure of rows in this response stream. The first (and only the first)
    +     * response streamed from the server will be of this type.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + public Builder setMetadata(com.google.bigtable.v2.ResultSetMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 1; + return this; + } + + /** + * + * + *
    +     * Structure of rows in this response stream. The first (and only the first)
    +     * response streamed from the server will be of this type.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + public Builder mergeMetadata(com.google.bigtable.v2.ResultSetMetadata value) { + if (metadataBuilder_ == null) { + if (responseCase_ == 1 + && response_ != com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance()) { + response_ = + com.google.bigtable.v2.ResultSetMetadata.newBuilder( + (com.google.bigtable.v2.ResultSetMetadata) response_) + .mergeFrom(value) + .buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 1) { + metadataBuilder_.mergeFrom(value); + } else { + metadataBuilder_.setMessage(value); + } + } + responseCase_ = 1; + return this; + } + + /** + * + * + *
    +     * Structure of rows in this response stream. The first (and only the first)
    +     * response streamed from the server will be of this type.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + if (responseCase_ == 1) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 1) { + responseCase_ = 0; + response_ = null; + } + metadataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Structure of rows in this response stream. The first (and only the first)
    +     * response streamed from the server will be of this type.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + public com.google.bigtable.v2.ResultSetMetadata.Builder getMetadataBuilder() { + return getMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Structure of rows in this response stream. The first (and only the first)
    +     * response streamed from the server will be of this type.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.ResultSetMetadataOrBuilder getMetadataOrBuilder() { + if ((responseCase_ == 1) && (metadataBuilder_ != null)) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 1) { + return (com.google.bigtable.v2.ResultSetMetadata) response_; + } + return com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Structure of rows in this response stream. The first (and only the first)
    +     * response streamed from the server will be of this type.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ResultSetMetadata, + com.google.bigtable.v2.ResultSetMetadata.Builder, + com.google.bigtable.v2.ResultSetMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + if (!(responseCase_ == 1)) { + response_ = com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance(); + } + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ResultSetMetadata, + com.google.bigtable.v2.ResultSetMetadata.Builder, + com.google.bigtable.v2.ResultSetMetadataOrBuilder>( + (com.google.bigtable.v2.ResultSetMetadata) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 1; + onChanged(); + return metadataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.PartialResultSet, + com.google.bigtable.v2.PartialResultSet.Builder, + com.google.bigtable.v2.PartialResultSetOrBuilder> + resultsBuilder_; + + /** + * + * + *
    +     * A partial result set with row data potentially including additional
    +     * instructions on how recent past and future partial responses should be
    +     * interpreted.
    +     * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + * + * @return Whether the results field is set. + */ + @java.lang.Override + public boolean hasResults() { + return responseCase_ == 2; + } + + /** + * + * + *
    +     * A partial result set with row data potentially including additional
    +     * instructions on how recent past and future partial responses should be
    +     * interpreted.
    +     * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + * + * @return The results. + */ + @java.lang.Override + public com.google.bigtable.v2.PartialResultSet getResults() { + if (resultsBuilder_ == null) { + if (responseCase_ == 2) { + return (com.google.bigtable.v2.PartialResultSet) response_; + } + return com.google.bigtable.v2.PartialResultSet.getDefaultInstance(); + } else { + if (responseCase_ == 2) { + return resultsBuilder_.getMessage(); + } + return com.google.bigtable.v2.PartialResultSet.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * A partial result set with row data potentially including additional
    +     * instructions on how recent past and future partial responses should be
    +     * interpreted.
    +     * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + */ + public Builder setResults(com.google.bigtable.v2.PartialResultSet value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + resultsBuilder_.setMessage(value); + } + responseCase_ = 2; + return this; + } + + /** + * + * + *
    +     * A partial result set with row data potentially including additional
    +     * instructions on how recent past and future partial responses should be
    +     * interpreted.
    +     * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + */ + public Builder setResults(com.google.bigtable.v2.PartialResultSet.Builder builderForValue) { + if (resultsBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + resultsBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 2; + return this; + } + + /** + * + * + *
    +     * A partial result set with row data potentially including additional
    +     * instructions on how recent past and future partial responses should be
    +     * interpreted.
    +     * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + */ + public Builder mergeResults(com.google.bigtable.v2.PartialResultSet value) { + if (resultsBuilder_ == null) { + if (responseCase_ == 2 + && response_ != com.google.bigtable.v2.PartialResultSet.getDefaultInstance()) { + response_ = + com.google.bigtable.v2.PartialResultSet.newBuilder( + (com.google.bigtable.v2.PartialResultSet) response_) + .mergeFrom(value) + .buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 2) { + resultsBuilder_.mergeFrom(value); + } else { + resultsBuilder_.setMessage(value); + } + } + responseCase_ = 2; + return this; + } + + /** + * + * + *
    +     * A partial result set with row data potentially including additional
    +     * instructions on how recent past and future partial responses should be
    +     * interpreted.
    +     * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + if (responseCase_ == 2) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 2) { + responseCase_ = 0; + response_ = null; + } + resultsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * A partial result set with row data potentially including additional
    +     * instructions on how recent past and future partial responses should be
    +     * interpreted.
    +     * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + */ + public com.google.bigtable.v2.PartialResultSet.Builder getResultsBuilder() { + return getResultsFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * A partial result set with row data potentially including additional
    +     * instructions on how recent past and future partial responses should be
    +     * interpreted.
    +     * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.PartialResultSetOrBuilder getResultsOrBuilder() { + if ((responseCase_ == 2) && (resultsBuilder_ != null)) { + return resultsBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 2) { + return (com.google.bigtable.v2.PartialResultSet) response_; + } + return com.google.bigtable.v2.PartialResultSet.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * A partial result set with row data potentially including additional
    +     * instructions on how recent past and future partial responses should be
    +     * interpreted.
    +     * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.PartialResultSet, + com.google.bigtable.v2.PartialResultSet.Builder, + com.google.bigtable.v2.PartialResultSetOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + if (!(responseCase_ == 2)) { + response_ = com.google.bigtable.v2.PartialResultSet.getDefaultInstance(); + } + resultsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.PartialResultSet, + com.google.bigtable.v2.PartialResultSet.Builder, + com.google.bigtable.v2.PartialResultSetOrBuilder>( + (com.google.bigtable.v2.PartialResultSet) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 2; + onChanged(); + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ExecuteQueryResponse) + private static final com.google.bigtable.v2.ExecuteQueryResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.ExecuteQueryResponse(); + } + + public static com.google.bigtable.v2.ExecuteQueryResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecuteQueryResponse 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.ExecuteQueryResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} 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 new file mode 100644 index 0000000000..58d3445c41 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryResponseOrBuilder.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +public interface ExecuteQueryResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ExecuteQueryResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Structure of rows in this response stream. The first (and only the first)
    +   * response streamed from the server will be of this type.
    +   * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + + /** + * + * + *
    +   * Structure of rows in this response stream. The first (and only the first)
    +   * response streamed from the server will be of this type.
    +   * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + * + * @return The metadata. + */ + com.google.bigtable.v2.ResultSetMetadata getMetadata(); + + /** + * + * + *
    +   * Structure of rows in this response stream. The first (and only the first)
    +   * response streamed from the server will be of this type.
    +   * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + com.google.bigtable.v2.ResultSetMetadataOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
    +   * A partial result set with row data potentially including additional
    +   * instructions on how recent past and future partial responses should be
    +   * interpreted.
    +   * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + * + * @return Whether the results field is set. + */ + boolean hasResults(); + + /** + * + * + *
    +   * A partial result set with row data potentially including additional
    +   * instructions on how recent past and future partial responses should be
    +   * interpreted.
    +   * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + * + * @return The results. + */ + com.google.bigtable.v2.PartialResultSet getResults(); + + /** + * + * + *
    +   * A partial result set with row data potentially including additional
    +   * instructions on how recent past and future partial responses should be
    +   * interpreted.
    +   * 
    + * + * .google.bigtable.v2.PartialResultSet results = 2; + */ + com.google.bigtable.v2.PartialResultSetOrBuilder getResultsOrBuilder(); + + com.google.bigtable.v2.ExecuteQueryResponse.ResponseCase getResponseCase(); +} 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..5b42950459 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -34,6 +34,7 @@ public final class Family extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.Family) FamilyOrBuilder { private static final long serialVersionUID = 0L; + // Use Family.newBuilder() to construct. private Family(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +97,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -128,6 +131,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private java.util.List columns_; + /** * * @@ -141,6 +145,7 @@ public com.google.protobuf.ByteString getNameBytes() { public java.util.List getColumnsList() { return columns_; } + /** * * @@ -155,6 +160,7 @@ public java.util.List getColumnsList() { getColumnsOrBuilderList() { return columns_; } + /** * * @@ -168,6 +174,7 @@ public java.util.List getColumnsList() { public int getColumnsCount() { return columns_.size(); } + /** * * @@ -181,6 +188,7 @@ public int getColumnsCount() { public com.google.bigtable.v2.Column getColumns(int index) { return columns_.get(index); } + /** * * @@ -363,6 +371,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -602,6 +611,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -629,6 +639,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -656,6 +667,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -682,6 +694,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -704,6 +717,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -764,6 +778,7 @@ public java.util.List getColumnsList() { return columnsBuilder_.getMessageList(); } } + /** * * @@ -780,6 +795,7 @@ public int getColumnsCount() { return columnsBuilder_.getCount(); } } + /** * * @@ -796,6 +812,7 @@ public com.google.bigtable.v2.Column getColumns(int index) { return columnsBuilder_.getMessage(index); } } + /** * * @@ -818,6 +835,7 @@ public Builder setColumns(int index, com.google.bigtable.v2.Column value) { } return this; } + /** * * @@ -837,6 +855,7 @@ public Builder setColumns(int index, com.google.bigtable.v2.Column.Builder build } return this; } + /** * * @@ -859,6 +878,7 @@ public Builder addColumns(com.google.bigtable.v2.Column value) { } return this; } + /** * * @@ -881,6 +901,7 @@ public Builder addColumns(int index, com.google.bigtable.v2.Column value) { } return this; } + /** * * @@ -900,6 +921,7 @@ public Builder addColumns(com.google.bigtable.v2.Column.Builder builderForValue) } return this; } + /** * * @@ -919,6 +941,7 @@ public Builder addColumns(int index, com.google.bigtable.v2.Column.Builder build } return this; } + /** * * @@ -939,6 +962,7 @@ public Builder addAllColumns( } return this; } + /** * * @@ -958,6 +982,7 @@ public Builder clearColumns() { } return this; } + /** * * @@ -977,6 +1002,7 @@ public Builder removeColumns(int index) { } return this; } + /** * * @@ -989,6 +1015,7 @@ public Builder removeColumns(int index) { public com.google.bigtable.v2.Column.Builder getColumnsBuilder(int index) { return getColumnsFieldBuilder().getBuilder(index); } + /** * * @@ -1005,6 +1032,7 @@ public com.google.bigtable.v2.ColumnOrBuilder getColumnsOrBuilder(int index) { return columnsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1022,6 +1050,7 @@ public com.google.bigtable.v2.ColumnOrBuilder getColumnsOrBuilder(int index) { return java.util.Collections.unmodifiableList(columns_); } } + /** * * @@ -1035,6 +1064,7 @@ public com.google.bigtable.v2.Column.Builder addColumnsBuilder() { return getColumnsFieldBuilder() .addBuilder(com.google.bigtable.v2.Column.getDefaultInstance()); } + /** * * @@ -1048,6 +1078,7 @@ public com.google.bigtable.v2.Column.Builder addColumnsBuilder(int index) { return getColumnsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Column.getDefaultInstance()); } + /** * * 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..88dcf0ddf0 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface FamilyOrBuilder @@ -41,6 +41,7 @@ public interface FamilyOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -69,6 +70,7 @@ public interface FamilyOrBuilder * repeated .google.bigtable.v2.Column columns = 2; */ java.util.List getColumnsList(); + /** * * @@ -79,6 +81,7 @@ public interface FamilyOrBuilder * repeated .google.bigtable.v2.Column columns = 2; */ com.google.bigtable.v2.Column getColumns(int index); + /** * * @@ -89,6 +92,7 @@ public interface FamilyOrBuilder * repeated .google.bigtable.v2.Column columns = 2; */ int getColumnsCount(); + /** * * @@ -99,6 +103,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..052f8af137 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/feature_flags.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -40,6 +40,7 @@ public final class FeatureFlags extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.FeatureFlags) FeatureFlagsOrBuilder { private static final long serialVersionUID = 0L; + // Use FeatureFlags.newBuilder() to construct. private FeatureFlags(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -70,6 +71,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 +91,7 @@ public boolean getReverseScans() { public static final int MUTATE_ROWS_RATE_LIMIT_FIELD_NUMBER = 3; private boolean mutateRowsRateLimit_ = false; + /** * * @@ -109,6 +112,7 @@ public boolean getMutateRowsRateLimit() { public static final int MUTATE_ROWS_RATE_LIMIT2_FIELD_NUMBER = 5; private boolean mutateRowsRateLimit2_ = false; + /** * * @@ -129,6 +133,7 @@ public boolean getMutateRowsRateLimit2() { public static final int LAST_SCANNED_ROW_RESPONSES_FIELD_NUMBER = 4; private boolean lastScannedRowResponses_ = false; + /** * * @@ -148,6 +153,7 @@ public boolean getLastScannedRowResponses() { public static final int ROUTING_COOKIE_FIELD_NUMBER = 6; private boolean routingCookie_ = false; + /** * * @@ -167,6 +173,7 @@ public boolean getRoutingCookie() { public static final int RETRY_INFO_FIELD_NUMBER = 7; private boolean retryInfo_ = false; + /** * * @@ -186,6 +193,7 @@ public boolean getRetryInfo() { public static final int CLIENT_SIDE_METRICS_ENABLED_FIELD_NUMBER = 8; private boolean clientSideMetricsEnabled_ = false; + /** * * @@ -202,6 +210,44 @@ 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_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -237,6 +283,12 @@ 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_); + } getUnknownFields().writeTo(output); } @@ -267,6 +319,12 @@ 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_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -289,6 +347,8 @@ 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 (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -314,6 +374,10 @@ 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 = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -413,6 +477,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -466,6 +531,8 @@ public Builder clear() { routingCookie_ = false; retryInfo_ = false; clientSideMetricsEnabled_ = false; + trafficDirectorEnabled_ = false; + directAccessRequested_ = false; return this; } @@ -522,6 +589,12 @@ private void buildPartial0(com.google.bigtable.v2.FeatureFlags result) { if (((from_bitField0_ & 0x00000040) != 0)) { result.clientSideMetricsEnabled_ = clientSideMetricsEnabled_; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.trafficDirectorEnabled_ = trafficDirectorEnabled_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.directAccessRequested_ = directAccessRequested_; + } } @java.lang.Override @@ -590,6 +663,12 @@ 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()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -658,6 +737,18 @@ 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 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -678,6 +769,7 @@ public Builder mergeFrom( private int bitField0_; private boolean reverseScans_; + /** * * @@ -694,6 +786,7 @@ public Builder mergeFrom( public boolean getReverseScans() { return reverseScans_; } + /** * * @@ -714,6 +807,7 @@ public Builder setReverseScans(boolean value) { onChanged(); return this; } + /** * * @@ -734,6 +828,7 @@ public Builder clearReverseScans() { } private boolean mutateRowsRateLimit_; + /** * * @@ -751,6 +846,7 @@ public Builder clearReverseScans() { public boolean getMutateRowsRateLimit() { return mutateRowsRateLimit_; } + /** * * @@ -772,6 +868,7 @@ public Builder setMutateRowsRateLimit(boolean value) { onChanged(); return this; } + /** * * @@ -793,6 +890,7 @@ public Builder clearMutateRowsRateLimit() { } private boolean mutateRowsRateLimit2_; + /** * * @@ -810,6 +908,7 @@ public Builder clearMutateRowsRateLimit() { public boolean getMutateRowsRateLimit2() { return mutateRowsRateLimit2_; } + /** * * @@ -831,6 +930,7 @@ public Builder setMutateRowsRateLimit2(boolean value) { onChanged(); return this; } + /** * * @@ -852,6 +952,7 @@ public Builder clearMutateRowsRateLimit2() { } private boolean lastScannedRowResponses_; + /** * * @@ -868,6 +969,7 @@ public Builder clearMutateRowsRateLimit2() { public boolean getLastScannedRowResponses() { return lastScannedRowResponses_; } + /** * * @@ -888,6 +990,7 @@ public Builder setLastScannedRowResponses(boolean value) { onChanged(); return this; } + /** * * @@ -908,6 +1011,7 @@ public Builder clearLastScannedRowResponses() { } private boolean routingCookie_; + /** * * @@ -924,6 +1028,7 @@ public Builder clearLastScannedRowResponses() { public boolean getRoutingCookie() { return routingCookie_; } + /** * * @@ -944,6 +1049,7 @@ public Builder setRoutingCookie(boolean value) { onChanged(); return this; } + /** * * @@ -964,6 +1070,7 @@ public Builder clearRoutingCookie() { } private boolean retryInfo_; + /** * * @@ -980,6 +1087,7 @@ public Builder clearRoutingCookie() { public boolean getRetryInfo() { return retryInfo_; } + /** * * @@ -1000,6 +1108,7 @@ public Builder setRetryInfo(boolean value) { onChanged(); return this; } + /** * * @@ -1020,6 +1129,7 @@ public Builder clearRetryInfo() { } private boolean clientSideMetricsEnabled_; + /** * * @@ -1035,6 +1145,7 @@ public Builder clearRetryInfo() { public boolean getClientSideMetricsEnabled() { return clientSideMetricsEnabled_; } + /** * * @@ -1054,6 +1165,7 @@ public Builder setClientSideMetricsEnabled(boolean value) { onChanged(); return this; } + /** * * @@ -1072,6 +1184,118 @@ 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 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; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); 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..6765956633 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/feature_flags.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface FeatureFlagsOrBuilder @@ -122,4 +122,30 @@ 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(); } 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 79b2aa80f7..8cc32dba0a 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/feature_flags.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public final class FeatureFlagsProto { @@ -42,18 +42,19 @@ 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\"\236\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\275\001\n\026com.google.bigtable.v2B\021FeatureFl" - + "agsProtoP\001Z:google.golang.org/genproto/g" - + "oogleapis/bigtable/v2;bigtable\252\002\030Google." - + "Cloud.Bigtable.V2\312\002\030Google\\Cloud\\Bigtabl" - + "e\\V2\352\002\033Google::Cloud::Bigtable::V2b\006prot" - + "o3" + + "(\010\022 \n\030traffic_director_enabled\030\t \001(\010\022\037\n\027" + + "direct_access_requested\030\n \001(\010B\273\001\n\026com.go" + + "ogle.bigtable.v2B\021FeatureFlagsProtoP\001Z8c" + + "loud.google.com/go/bigtable/apiv2/bigtab" + + "lepb;bigtablepb\252\002\030Google.Cloud.Bigtable." + + "V2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Google::" + + "Cloud::Bigtable::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -71,6 +72,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RoutingCookie", "RetryInfo", "ClientSideMetricsEnabled", + "TrafficDirectorEnabled", + "DirectAccessRequested", }); } 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..5022faef3d 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/request_stats.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class FullReadStatsView extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.bigtable.v2.FullReadStatsView) FullReadStatsViewOrBuilder { private static final long serialVersionUID = 0L; + // Use FullReadStatsView.newBuilder() to construct. private FullReadStatsView(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,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 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasReadIterationStats() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -102,6 +105,7 @@ public com.google.bigtable.v2.ReadIterationStats getReadIterationStats() { ? com.google.bigtable.v2.ReadIterationStats.getDefaultInstance() : readIterationStats_; } + /** * * @@ -123,6 +127,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 +144,7 @@ public com.google.bigtable.v2.ReadIterationStatsOrBuilder getReadIterationStatsO public boolean hasRequestLatencyStats() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -157,6 +163,7 @@ public com.google.bigtable.v2.RequestLatencyStats getRequestLatencyStats() { ? com.google.bigtable.v2.RequestLatencyStats.getDefaultInstance() : requestLatencyStats_; } + /** * * @@ -351,6 +358,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -580,6 +588,7 @@ public Builder mergeFrom( com.google.bigtable.v2.ReadIterationStats.Builder, com.google.bigtable.v2.ReadIterationStatsOrBuilder> readIterationStatsBuilder_; + /** * * @@ -597,6 +606,7 @@ public Builder mergeFrom( public boolean hasReadIterationStats() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -620,6 +630,7 @@ public com.google.bigtable.v2.ReadIterationStats getReadIterationStats() { return readIterationStatsBuilder_.getMessage(); } } + /** * * @@ -645,6 +656,7 @@ public Builder setReadIterationStats(com.google.bigtable.v2.ReadIterationStats v onChanged(); return this; } + /** * * @@ -668,6 +680,7 @@ public Builder setReadIterationStats( onChanged(); return this; } + /** * * @@ -699,6 +712,7 @@ public Builder mergeReadIterationStats(com.google.bigtable.v2.ReadIterationStats } return this; } + /** * * @@ -721,6 +735,7 @@ public Builder clearReadIterationStats() { onChanged(); return this; } + /** * * @@ -738,6 +753,7 @@ public com.google.bigtable.v2.ReadIterationStats.Builder getReadIterationStatsBu onChanged(); return getReadIterationStatsFieldBuilder().getBuilder(); } + /** * * @@ -759,6 +775,7 @@ public com.google.bigtable.v2.ReadIterationStatsOrBuilder getReadIterationStatsO : readIterationStats_; } } + /** * * @@ -794,6 +811,7 @@ public com.google.bigtable.v2.ReadIterationStatsOrBuilder getReadIterationStatsO com.google.bigtable.v2.RequestLatencyStats.Builder, com.google.bigtable.v2.RequestLatencyStatsOrBuilder> requestLatencyStatsBuilder_; + /** * * @@ -809,6 +827,7 @@ public com.google.bigtable.v2.ReadIterationStatsOrBuilder getReadIterationStatsO public boolean hasRequestLatencyStats() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -830,6 +849,7 @@ public com.google.bigtable.v2.RequestLatencyStats getRequestLatencyStats() { return requestLatencyStatsBuilder_.getMessage(); } } + /** * * @@ -853,6 +873,7 @@ public Builder setRequestLatencyStats(com.google.bigtable.v2.RequestLatencyStats onChanged(); return this; } + /** * * @@ -874,6 +895,7 @@ public Builder setRequestLatencyStats( onChanged(); return this; } + /** * * @@ -903,6 +925,7 @@ public Builder mergeRequestLatencyStats(com.google.bigtable.v2.RequestLatencySta } return this; } + /** * * @@ -923,6 +946,7 @@ public Builder clearRequestLatencyStats() { onChanged(); return this; } + /** * * @@ -938,6 +962,7 @@ public com.google.bigtable.v2.RequestLatencyStats.Builder getRequestLatencyStats onChanged(); return getRequestLatencyStatsFieldBuilder().getBuilder(); } + /** * * @@ -957,6 +982,7 @@ public com.google.bigtable.v2.RequestLatencyStatsOrBuilder getRequestLatencyStat : requestLatencyStats_; } } + /** * * 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..f1f222c8c7 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/request_stats.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface FullReadStatsViewOrBuilder @@ -39,6 +39,7 @@ public interface FullReadStatsViewOrBuilder * @return Whether the readIterationStats field is set. */ boolean hasReadIterationStats(); + /** * * @@ -54,6 +55,7 @@ public interface FullReadStatsViewOrBuilder * @return The readIterationStats. */ com.google.bigtable.v2.ReadIterationStats getReadIterationStats(); + /** * * @@ -81,6 +83,7 @@ public interface FullReadStatsViewOrBuilder * @return Whether the requestLatencyStats field is set. */ boolean hasRequestLatencyStats(); + /** * * @@ -94,6 +97,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..db3cf62561 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -35,6 +35,7 @@ public final class GenerateInitialChangeStreamPartitionsRequest // @@protoc_insertion_point(message_implements:google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) GenerateInitialChangeStreamPartitionsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use GenerateInitialChangeStreamPartitionsRequest.newBuilder() to construct. private GenerateInitialChangeStreamPartitionsRequest( com.google.protobuf.GeneratedMessageV3.Builder builder) { @@ -71,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -99,6 +101,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -132,6 +135,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -157,6 +161,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -353,6 +358,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -560,6 +566,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -587,6 +594,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -614,6 +622,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -640,6 +649,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -662,6 +672,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -691,6 +702,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object appProfileId_ = ""; + /** * * @@ -715,6 +727,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -739,6 +752,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -762,6 +776,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -781,6 +796,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * 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..40e8f09fcd 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface GenerateInitialChangeStreamPartitionsRequestOrBuilder @@ -41,6 +41,7 @@ public interface GenerateInitialChangeStreamPartitionsRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -73,6 +74,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..9ac4442930 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -35,6 +35,7 @@ public final class GenerateInitialChangeStreamPartitionsResponse // @@protoc_insertion_point(message_implements:google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) GenerateInitialChangeStreamPartitionsResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use GenerateInitialChangeStreamPartitionsResponse.newBuilder() to construct. private GenerateInitialChangeStreamPartitionsResponse( com.google.protobuf.GeneratedMessageV3.Builder builder) { @@ -67,6 +68,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 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasPartition() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -99,6 +102,7 @@ public com.google.bigtable.v2.StreamPartition getPartition() { ? com.google.bigtable.v2.StreamPartition.getDefaultInstance() : partition_; } + /** * * @@ -281,6 +285,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -492,6 +497,7 @@ public Builder mergeFrom( com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder> partitionBuilder_; + /** * * @@ -506,6 +512,7 @@ public Builder mergeFrom( public boolean hasPartition() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -526,6 +533,7 @@ public com.google.bigtable.v2.StreamPartition getPartition() { return partitionBuilder_.getMessage(); } } + /** * * @@ -548,6 +556,7 @@ public Builder setPartition(com.google.bigtable.v2.StreamPartition value) { onChanged(); return this; } + /** * * @@ -567,6 +576,7 @@ public Builder setPartition(com.google.bigtable.v2.StreamPartition.Builder build onChanged(); return this; } + /** * * @@ -594,6 +604,7 @@ public Builder mergePartition(com.google.bigtable.v2.StreamPartition value) { } return this; } + /** * * @@ -613,6 +624,7 @@ public Builder clearPartition() { onChanged(); return this; } + /** * * @@ -627,6 +639,7 @@ public com.google.bigtable.v2.StreamPartition.Builder getPartitionBuilder() { onChanged(); return getPartitionFieldBuilder().getBuilder(); } + /** * * @@ -645,6 +658,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { : partition_; } } + /** * * 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..1abedccc35 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface GenerateInitialChangeStreamPartitionsResponseOrBuilder @@ -36,6 +36,7 @@ public interface GenerateInitialChangeStreamPartitionsResponseOrBuilder * @return Whether the partition field is set. */ boolean hasPartition(); + /** * * @@ -48,6 +49,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/Idempotency.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Idempotency.java new file mode 100644 index 0000000000..7c75bdc9f7 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Idempotency.java @@ -0,0 +1,892 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +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} + */ +public final class Idempotency extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Idempotency) + IdempotencyOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Idempotency.newBuilder() to construct. + private Idempotency(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Idempotency() { + token_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Idempotency(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.bigtable.v2.Idempotency parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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() != com.google.protobuf.ByteString.EMPTY) { + 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(getStartTimeFieldBuilder().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.SingleFieldBuilderV3< + 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 getStartTimeFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..65973c012c --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/IdempotencyOrBuilder.java @@ -0,0 +1,92 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +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..1a00296d0c 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 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. 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..552d1b4b0b --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewName.java @@ -0,0 +1,227 @@ +/* + * 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.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/MutateRowRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowRequest.java index 38ee1e6bb4..e281c9201e 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class MutateRowRequest extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.bigtable.v2.MutateRowRequest) MutateRowRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use MutateRowRequest.newBuilder() to construct. private MutateRowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,10 +68,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 +103,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -134,6 +138,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object authorizedViewName_ = ""; + /** * * @@ -163,6 +168,7 @@ public java.lang.String getAuthorizedViewName() { return s; } } + /** * * @@ -197,6 +203,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -221,6 +228,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -248,6 +256,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 +277,7 @@ public com.google.protobuf.ByteString getRowKey() { @SuppressWarnings("serial") private java.util.List mutations_; + /** * * @@ -285,6 +295,7 @@ public com.google.protobuf.ByteString getRowKey() { public java.util.List getMutationsList() { return mutations_; } + /** * * @@ -303,6 +314,7 @@ public java.util.List getMutationsList() { getMutationsOrBuilderList() { return mutations_; } + /** * * @@ -320,6 +332,7 @@ public java.util.List getMutationsList() { public int getMutationsCount() { return mutations_.size(); } + /** * * @@ -337,6 +350,7 @@ public int getMutationsCount() { public com.google.bigtable.v2.Mutation getMutations(int index) { return mutations_.get(index); } + /** * * @@ -355,6 +369,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 @@ -384,6 +454,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, authorizedViewName_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getIdempotency()); + } getUnknownFields().writeTo(output); } @@ -408,6 +481,9 @@ public int getSerializedSize() { 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; return size; @@ -428,6 +504,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 +531,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; @@ -551,6 +635,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -580,10 +665,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) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMutationsFieldBuilder(); + getIdempotencyFieldBuilder(); + } } @java.lang.Override @@ -601,6 +696,11 @@ public Builder clear() { mutationsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); + idempotency_ = null; + if (idempotencyBuilder_ != null) { + idempotencyBuilder_.dispose(); + idempotencyBuilder_ = null; + } return this; } @@ -662,6 +762,13 @@ private void buildPartial0(com.google.bigtable.v2.MutateRowRequest result) { if (((from_bitField0_ & 0x00000008) != 0)) { result.rowKey_ = rowKey_; } + 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 @@ -754,6 +861,9 @@ public Builder mergeFrom(com.google.bigtable.v2.MutateRowRequest other) { } } } + if (other.hasIdempotency()) { + mergeIdempotency(other.getIdempotency()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -816,6 +926,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 50 + case 66: + { + input.readMessage(getIdempotencyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -836,6 +952,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -864,6 +981,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -892,6 +1010,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -919,6 +1038,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -942,6 +1062,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -972,6 +1093,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object authorizedViewName_ = ""; + /** * * @@ -1000,6 +1122,7 @@ public java.lang.String getAuthorizedViewName() { return (java.lang.String) ref; } } + /** * * @@ -1028,6 +1151,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1055,6 +1179,7 @@ public Builder setAuthorizedViewName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1078,6 +1203,7 @@ public Builder clearAuthorizedViewName() { onChanged(); return this; } + /** * * @@ -1108,6 +1234,7 @@ public Builder setAuthorizedViewNameBytes(com.google.protobuf.ByteString value) } private java.lang.Object appProfileId_ = ""; + /** * * @@ -1131,6 +1258,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -1154,6 +1282,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1176,6 +1305,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1194,6 +1324,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -1219,6 +1350,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -1234,6 +1366,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getRowKey() { return rowKey_; } + /** * * @@ -1255,6 +1388,7 @@ public Builder setRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1309,6 +1443,7 @@ public java.util.List getMutationsList() { return mutationsBuilder_.getMessageList(); } } + /** * * @@ -1329,6 +1464,7 @@ public int getMutationsCount() { return mutationsBuilder_.getCount(); } } + /** * * @@ -1349,6 +1485,7 @@ public com.google.bigtable.v2.Mutation getMutations(int index) { return mutationsBuilder_.getMessage(index); } } + /** * * @@ -1375,6 +1512,7 @@ public Builder setMutations(int index, com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -1399,6 +1537,7 @@ public Builder setMutations( } return this; } + /** * * @@ -1425,6 +1564,7 @@ public Builder addMutations(com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -1451,6 +1591,7 @@ public Builder addMutations(int index, com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -1474,6 +1615,7 @@ public Builder addMutations(com.google.bigtable.v2.Mutation.Builder builderForVa } return this; } + /** * * @@ -1498,6 +1640,7 @@ public Builder addMutations( } return this; } + /** * * @@ -1522,6 +1665,7 @@ public Builder addAllMutations( } return this; } + /** * * @@ -1545,6 +1689,7 @@ public Builder clearMutations() { } return this; } + /** * * @@ -1568,6 +1713,7 @@ public Builder removeMutations(int index) { } return this; } + /** * * @@ -1584,6 +1730,7 @@ public Builder removeMutations(int index) { public com.google.bigtable.v2.Mutation.Builder getMutationsBuilder(int index) { return getMutationsFieldBuilder().getBuilder(index); } + /** * * @@ -1604,6 +1751,7 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index) return mutationsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1625,6 +1773,7 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index) return java.util.Collections.unmodifiableList(mutations_); } } + /** * * @@ -1642,6 +1791,7 @@ public com.google.bigtable.v2.Mutation.Builder addMutationsBuilder() { return getMutationsFieldBuilder() .addBuilder(com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -1659,6 +1809,7 @@ public com.google.bigtable.v2.Mutation.Builder addMutationsBuilder(int index) { return getMutationsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -1693,6 +1844,209 @@ public java.util.List getMutationsBuild return mutationsBuilder_; } + private com.google.bigtable.v2.Idempotency idempotency_; + private com.google.protobuf.SingleFieldBuilderV3< + 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); + } + + /** + * + * + *
    +     * 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 getIdempotencyFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.v2.Idempotency, + com.google.bigtable.v2.Idempotency.Builder, + com.google.bigtable.v2.IdempotencyOrBuilder> + getIdempotencyFieldBuilder() { + if (idempotencyBuilder_ == null) { + idempotencyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Idempotency, + com.google.bigtable.v2.Idempotency.Builder, + com.google.bigtable.v2.IdempotencyOrBuilder>( + getIdempotency(), getParentForChildren(), isClean()); + idempotency_ = null; + } + return idempotencyBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); 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..6c482056d9 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface MutateRowRequestOrBuilder @@ -42,6 +42,7 @@ public interface MutateRowRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -79,6 +80,7 @@ public interface MutateRowRequestOrBuilder * @return The authorizedViewName. */ java.lang.String getAuthorizedViewName(); + /** * * @@ -111,6 +113,7 @@ public interface MutateRowRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -152,6 +155,7 @@ public interface MutateRowRequestOrBuilder *
    */ java.util.List getMutationsList(); + /** * * @@ -166,6 +170,7 @@ public interface MutateRowRequestOrBuilder * */ com.google.bigtable.v2.Mutation getMutations(int index); + /** * * @@ -180,6 +185,7 @@ public interface MutateRowRequestOrBuilder * */ int getMutationsCount(); + /** * * @@ -194,6 +200,7 @@ public interface MutateRowRequestOrBuilder * */ java.util.List getMutationsOrBuilderList(); + /** * * @@ -208,4 +215,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..5b9bb7d328 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class MutateRowResponse extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.bigtable.v2.MutateRowResponse) MutateRowResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use MutateRowResponse.newBuilder() to construct. private MutateRowResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -210,6 +211,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * 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..c75b361bbe 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface MutateRowResponseOrBuilder 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..29e85bad73 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class MutateRowsRequest extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.bigtable.v2.MutateRowsRequest) MutateRowsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use MutateRowsRequest.newBuilder() to construct. private MutateRowsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -98,6 +99,7 @@ public interface EntryOrBuilder * */ java.util.List getMutationsList(); + /** * * @@ -112,6 +114,7 @@ public interface EntryOrBuilder * */ com.google.bigtable.v2.Mutation getMutations(int index); + /** * * @@ -126,6 +129,7 @@ public interface EntryOrBuilder * */ int getMutationsCount(); + /** * * @@ -140,6 +144,7 @@ public interface EntryOrBuilder * */ java.util.List getMutationsOrBuilderList(); + /** * * @@ -154,7 +159,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(); } + /** * * @@ -169,6 +215,7 @@ public static final class Entry extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.MutateRowsRequest.Entry) EntryOrBuilder { private static final long serialVersionUID = 0L; + // Use Entry.newBuilder() to construct. private Entry(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -200,8 +247,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 +271,7 @@ public com.google.protobuf.ByteString getRowKey() { @SuppressWarnings("serial") private java.util.List mutations_; + /** * * @@ -239,6 +289,7 @@ public com.google.protobuf.ByteString getRowKey() { public java.util.List getMutationsList() { return mutations_; } + /** * * @@ -257,6 +308,7 @@ public java.util.List getMutationsList() { getMutationsOrBuilderList() { return mutations_; } + /** * * @@ -274,6 +326,7 @@ public java.util.List getMutationsList() { public int getMutationsCount() { return mutations_.size(); } + /** * * @@ -291,6 +344,7 @@ public int getMutationsCount() { public com.google.bigtable.v2.Mutation getMutations(int index) { return mutations_.get(index); } + /** * * @@ -309,6 +363,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 +439,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 +457,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 +478,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 +499,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; @@ -480,6 +604,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -510,10 +635,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) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMutationsFieldBuilder(); + getIdempotencyFieldBuilder(); + } } @java.lang.Override @@ -528,6 +663,11 @@ public Builder clear() { mutationsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); + idempotency_ = null; + if (idempotencyBuilder_ != null) { + idempotencyBuilder_.dispose(); + idempotencyBuilder_ = null; + } return this; } @@ -581,6 +721,13 @@ private void buildPartial0(com.google.bigtable.v2.MutateRowsRequest.Entry result if (((from_bitField0_ & 0x00000001) != 0)) { result.rowKey_ = rowKey_; } + 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 @@ -661,6 +808,9 @@ public Builder mergeFrom(com.google.bigtable.v2.MutateRowsRequest.Entry other) { } } } + if (other.hasIdempotency()) { + mergeIdempotency(other.getIdempotency()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -706,6 +856,12 @@ public Builder mergeFrom( } break; } // case 18 + case 26: + { + input.readMessage(getIdempotencyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -726,6 +882,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -741,6 +898,7 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getRowKey() { return rowKey_; } + /** * * @@ -762,6 +920,7 @@ public Builder setRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -816,6 +975,7 @@ public java.util.List getMutationsList() { return mutationsBuilder_.getMessageList(); } } + /** * * @@ -836,6 +996,7 @@ public int getMutationsCount() { return mutationsBuilder_.getCount(); } } + /** * * @@ -856,6 +1017,7 @@ public com.google.bigtable.v2.Mutation getMutations(int index) { return mutationsBuilder_.getMessage(index); } } + /** * * @@ -882,6 +1044,7 @@ public Builder setMutations(int index, com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -906,6 +1069,7 @@ public Builder setMutations( } return this; } + /** * * @@ -932,6 +1096,7 @@ public Builder addMutations(com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -958,6 +1123,7 @@ public Builder addMutations(int index, com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -981,6 +1147,7 @@ public Builder addMutations(com.google.bigtable.v2.Mutation.Builder builderForVa } return this; } + /** * * @@ -1005,6 +1172,7 @@ public Builder addMutations( } return this; } + /** * * @@ -1029,6 +1197,7 @@ public Builder addAllMutations( } return this; } + /** * * @@ -1052,6 +1221,7 @@ public Builder clearMutations() { } return this; } + /** * * @@ -1075,6 +1245,7 @@ public Builder removeMutations(int index) { } return this; } + /** * * @@ -1091,6 +1262,7 @@ public Builder removeMutations(int index) { public com.google.bigtable.v2.Mutation.Builder getMutationsBuilder(int index) { return getMutationsFieldBuilder().getBuilder(index); } + /** * * @@ -1111,6 +1283,7 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index) return mutationsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1132,6 +1305,7 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index) return java.util.Collections.unmodifiableList(mutations_); } } + /** * * @@ -1149,6 +1323,7 @@ public com.google.bigtable.v2.Mutation.Builder addMutationsBuilder() { return getMutationsFieldBuilder() .addBuilder(com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -1166,6 +1341,7 @@ public com.google.bigtable.v2.Mutation.Builder addMutationsBuilder(int index) { return getMutationsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -1200,6 +1376,209 @@ public java.util.List getMutationsBuild return mutationsBuilder_; } + private com.google.bigtable.v2.Idempotency idempotency_; + private com.google.protobuf.SingleFieldBuilderV3< + 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); + } + + /** + * + * + *
    +       * 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 getIdempotencyFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.v2.Idempotency, + com.google.bigtable.v2.Idempotency.Builder, + com.google.bigtable.v2.IdempotencyOrBuilder> + getIdempotencyFieldBuilder() { + if (idempotencyBuilder_ == null) { + idempotencyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Idempotency, + com.google.bigtable.v2.Idempotency.Builder, + com.google.bigtable.v2.IdempotencyOrBuilder>( + getIdempotency(), getParentForChildren(), isClean()); + idempotency_ = null; + } + return idempotencyBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -1268,6 +1647,7 @@ public com.google.bigtable.v2.MutateRowsRequest.Entry getDefaultInstanceForType( @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -1297,6 +1677,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -1331,6 +1712,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object authorizedViewName_ = ""; + /** * * @@ -1360,6 +1742,7 @@ public java.lang.String getAuthorizedViewName() { return s; } } + /** * * @@ -1394,6 +1777,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -1418,6 +1802,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -1447,6 +1832,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { @SuppressWarnings("serial") private java.util.List entries_; + /** * * @@ -1466,6 +1852,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public java.util.List getEntriesList() { return entries_; } + /** * * @@ -1486,6 +1873,7 @@ public java.util.List getEntries getEntriesOrBuilderList() { return entries_; } + /** * * @@ -1505,6 +1893,7 @@ public java.util.List getEntries public int getEntriesCount() { return entries_.size(); } + /** * * @@ -1524,6 +1913,7 @@ public int getEntriesCount() { public com.google.bigtable.v2.MutateRowsRequest.Entry getEntries(int index) { return entries_.get(index); } + /** * * @@ -1731,6 +2121,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -2004,6 +2395,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -2032,6 +2424,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -2060,6 +2453,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2087,6 +2481,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2110,6 +2505,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -2140,6 +2536,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object authorizedViewName_ = ""; + /** * * @@ -2168,6 +2565,7 @@ public java.lang.String getAuthorizedViewName() { return (java.lang.String) ref; } } + /** * * @@ -2196,6 +2594,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2223,6 +2622,7 @@ public Builder setAuthorizedViewName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2246,6 +2646,7 @@ public Builder clearAuthorizedViewName() { onChanged(); return this; } + /** * * @@ -2276,6 +2677,7 @@ public Builder setAuthorizedViewNameBytes(com.google.protobuf.ByteString value) } private java.lang.Object appProfileId_ = ""; + /** * * @@ -2299,6 +2701,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -2322,6 +2725,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2344,6 +2748,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2362,6 +2767,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -2425,6 +2831,7 @@ public java.util.List getEntries return entriesBuilder_.getMessageList(); } } + /** * * @@ -2447,6 +2854,7 @@ public int getEntriesCount() { return entriesBuilder_.getCount(); } } + /** * * @@ -2469,6 +2877,7 @@ public com.google.bigtable.v2.MutateRowsRequest.Entry getEntries(int index) { return entriesBuilder_.getMessage(index); } } + /** * * @@ -2497,6 +2906,7 @@ public Builder setEntries(int index, com.google.bigtable.v2.MutateRowsRequest.En } return this; } + /** * * @@ -2523,6 +2933,7 @@ public Builder setEntries( } return this; } + /** * * @@ -2551,6 +2962,7 @@ public Builder addEntries(com.google.bigtable.v2.MutateRowsRequest.Entry value) } return this; } + /** * * @@ -2579,6 +2991,7 @@ public Builder addEntries(int index, com.google.bigtable.v2.MutateRowsRequest.En } return this; } + /** * * @@ -2605,6 +3018,7 @@ public Builder addEntries( } return this; } + /** * * @@ -2631,6 +3045,7 @@ public Builder addEntries( } return this; } + /** * * @@ -2657,6 +3072,7 @@ public Builder addAllEntries( } return this; } + /** * * @@ -2682,6 +3098,7 @@ public Builder clearEntries() { } return this; } + /** * * @@ -2707,6 +3124,7 @@ public Builder removeEntries(int index) { } return this; } + /** * * @@ -2725,6 +3143,7 @@ public Builder removeEntries(int index) { public com.google.bigtable.v2.MutateRowsRequest.Entry.Builder getEntriesBuilder(int index) { return getEntriesFieldBuilder().getBuilder(index); } + /** * * @@ -2747,6 +3166,7 @@ public com.google.bigtable.v2.MutateRowsRequest.EntryOrBuilder getEntriesOrBuild return entriesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -2770,6 +3190,7 @@ public com.google.bigtable.v2.MutateRowsRequest.EntryOrBuilder getEntriesOrBuild return java.util.Collections.unmodifiableList(entries_); } } + /** * * @@ -2789,6 +3210,7 @@ public com.google.bigtable.v2.MutateRowsRequest.Entry.Builder addEntriesBuilder( return getEntriesFieldBuilder() .addBuilder(com.google.bigtable.v2.MutateRowsRequest.Entry.getDefaultInstance()); } + /** * * @@ -2808,6 +3230,7 @@ public com.google.bigtable.v2.MutateRowsRequest.Entry.Builder addEntriesBuilder( return getEntriesFieldBuilder() .addBuilder(index, com.google.bigtable.v2.MutateRowsRequest.Entry.getDefaultInstance()); } + /** * * 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..bab2197df8 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface MutateRowsRequestOrBuilder @@ -42,6 +42,7 @@ public interface MutateRowsRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -79,6 +80,7 @@ public interface MutateRowsRequestOrBuilder * @return The authorizedViewName. */ java.lang.String getAuthorizedViewName(); + /** * * @@ -111,6 +113,7 @@ public interface MutateRowsRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -141,6 +144,7 @@ public interface MutateRowsRequestOrBuilder * */ java.util.List getEntriesList(); + /** * * @@ -157,6 +161,7 @@ public interface MutateRowsRequestOrBuilder * */ com.google.bigtable.v2.MutateRowsRequest.Entry getEntries(int index); + /** * * @@ -173,6 +178,7 @@ public interface MutateRowsRequestOrBuilder * */ int getEntriesCount(); + /** * * @@ -190,6 +196,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..c1d8a4ae39 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class MutateRowsResponse extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.bigtable.v2.MutateRowsResponse) MutateRowsResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use MutateRowsResponse.newBuilder() to construct. private MutateRowsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -97,6 +98,7 @@ public interface EntryOrBuilder * @return Whether the status field is set. */ boolean hasStatus(); + /** * * @@ -112,6 +114,7 @@ public interface EntryOrBuilder * @return The status. */ com.google.rpc.Status getStatus(); + /** * * @@ -126,6 +129,7 @@ public interface EntryOrBuilder */ com.google.rpc.StatusOrBuilder getStatusOrBuilder(); } + /** * * @@ -140,6 +144,7 @@ public static final class Entry extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.MutateRowsResponse.Entry) EntryOrBuilder { private static final long serialVersionUID = 0L; + // Use Entry.newBuilder() to construct. private Entry(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -171,6 +176,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 +196,7 @@ public long getIndex() { public static final int STATUS_FIELD_NUMBER = 2; private com.google.rpc.Status status_; + /** * * @@ -208,6 +215,7 @@ public long getIndex() { public boolean hasStatus() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -226,6 +234,7 @@ public boolean hasStatus() { public com.google.rpc.Status getStatus() { return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; } + /** * * @@ -417,6 +426,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -631,6 +641,7 @@ public Builder mergeFrom( private int bitField0_; private long index_; + /** * * @@ -647,6 +658,7 @@ public Builder mergeFrom( public long getIndex() { return index_; } + /** * * @@ -667,6 +679,7 @@ public Builder setIndex(long value) { onChanged(); return this; } + /** * * @@ -690,6 +703,7 @@ public Builder clearIndex() { private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusBuilder_; + /** * * @@ -707,6 +721,7 @@ public Builder clearIndex() { public boolean hasStatus() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -728,6 +743,7 @@ public com.google.rpc.Status getStatus() { return statusBuilder_.getMessage(); } } + /** * * @@ -753,6 +769,7 @@ public Builder setStatus(com.google.rpc.Status value) { onChanged(); return this; } + /** * * @@ -775,6 +792,7 @@ public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -805,6 +823,7 @@ public Builder mergeStatus(com.google.rpc.Status value) { } return this; } + /** * * @@ -827,6 +846,7 @@ public Builder clearStatus() { onChanged(); return this; } + /** * * @@ -844,6 +864,7 @@ public com.google.rpc.Status.Builder getStatusBuilder() { onChanged(); return getStatusFieldBuilder().getBuilder(); } + /** * * @@ -863,6 +884,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; } } + /** * * @@ -958,6 +980,7 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry getDefaultInstanceForType @SuppressWarnings("serial") private java.util.List entries_; + /** * * @@ -971,6 +994,7 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry getDefaultInstanceForType public java.util.List getEntriesList() { return entries_; } + /** * * @@ -985,6 +1009,7 @@ public java.util.List getEntrie getEntriesOrBuilderList() { return entries_; } + /** * * @@ -998,6 +1023,7 @@ public java.util.List getEntrie public int getEntriesCount() { return entries_.size(); } + /** * * @@ -1011,6 +1037,7 @@ public int getEntriesCount() { public com.google.bigtable.v2.MutateRowsResponse.Entry getEntries(int index) { return entries_.get(index); } + /** * * @@ -1027,6 +1054,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 +1072,7 @@ public com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder getEntriesOrBuil public boolean hasRateLimitInfo() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1063,6 +1092,7 @@ public com.google.bigtable.v2.RateLimitInfo getRateLimitInfo() { ? com.google.bigtable.v2.RateLimitInfo.getDefaultInstance() : rateLimitInfo_; } + /** * * @@ -1256,6 +1286,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1548,6 +1579,7 @@ public java.util.List getEntrie return entriesBuilder_.getMessageList(); } } + /** * * @@ -1564,6 +1596,7 @@ public int getEntriesCount() { return entriesBuilder_.getCount(); } } + /** * * @@ -1580,6 +1613,7 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry getEntries(int index) { return entriesBuilder_.getMessage(index); } } + /** * * @@ -1602,6 +1636,7 @@ public Builder setEntries(int index, com.google.bigtable.v2.MutateRowsResponse.E } return this; } + /** * * @@ -1622,6 +1657,7 @@ public Builder setEntries( } return this; } + /** * * @@ -1644,6 +1680,7 @@ public Builder addEntries(com.google.bigtable.v2.MutateRowsResponse.Entry value) } return this; } + /** * * @@ -1666,6 +1703,7 @@ public Builder addEntries(int index, com.google.bigtable.v2.MutateRowsResponse.E } return this; } + /** * * @@ -1686,6 +1724,7 @@ public Builder addEntries( } return this; } + /** * * @@ -1706,6 +1745,7 @@ public Builder addEntries( } return this; } + /** * * @@ -1726,6 +1766,7 @@ public Builder addAllEntries( } return this; } + /** * * @@ -1745,6 +1786,7 @@ public Builder clearEntries() { } return this; } + /** * * @@ -1764,6 +1806,7 @@ public Builder removeEntries(int index) { } return this; } + /** * * @@ -1776,6 +1819,7 @@ public Builder removeEntries(int index) { public com.google.bigtable.v2.MutateRowsResponse.Entry.Builder getEntriesBuilder(int index) { return getEntriesFieldBuilder().getBuilder(index); } + /** * * @@ -1792,6 +1836,7 @@ public com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder getEntriesOrBuil return entriesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1809,6 +1854,7 @@ public com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder getEntriesOrBuil return java.util.Collections.unmodifiableList(entries_); } } + /** * * @@ -1822,6 +1868,7 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry.Builder addEntriesBuilder return getEntriesFieldBuilder() .addBuilder(com.google.bigtable.v2.MutateRowsResponse.Entry.getDefaultInstance()); } + /** * * @@ -1835,6 +1882,7 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry.Builder addEntriesBuilder return getEntriesFieldBuilder() .addBuilder(index, com.google.bigtable.v2.MutateRowsResponse.Entry.getDefaultInstance()); } + /** * * @@ -1872,6 +1920,7 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry.Builder addEntriesBuilder com.google.bigtable.v2.RateLimitInfo.Builder, com.google.bigtable.v2.RateLimitInfoOrBuilder> rateLimitInfoBuilder_; + /** * * @@ -1888,6 +1937,7 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry.Builder addEntriesBuilder public boolean hasRateLimitInfo() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1910,6 +1960,7 @@ public com.google.bigtable.v2.RateLimitInfo getRateLimitInfo() { return rateLimitInfoBuilder_.getMessage(); } } + /** * * @@ -1934,6 +1985,7 @@ public Builder setRateLimitInfo(com.google.bigtable.v2.RateLimitInfo value) { onChanged(); return this; } + /** * * @@ -1955,6 +2007,7 @@ public Builder setRateLimitInfo(com.google.bigtable.v2.RateLimitInfo.Builder bui onChanged(); return this; } + /** * * @@ -1984,6 +2037,7 @@ public Builder mergeRateLimitInfo(com.google.bigtable.v2.RateLimitInfo value) { } return this; } + /** * * @@ -2005,6 +2059,7 @@ public Builder clearRateLimitInfo() { onChanged(); return this; } + /** * * @@ -2021,6 +2076,7 @@ public com.google.bigtable.v2.RateLimitInfo.Builder getRateLimitInfoBuilder() { onChanged(); return getRateLimitInfoFieldBuilder().getBuilder(); } + /** * * @@ -2041,6 +2097,7 @@ public com.google.bigtable.v2.RateLimitInfoOrBuilder getRateLimitInfoOrBuilder() : rateLimitInfo_; } } + /** * * 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..eba648f1ce 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface MutateRowsResponseOrBuilder @@ -34,6 +34,7 @@ public interface MutateRowsResponseOrBuilder * repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; */ java.util.List getEntriesList(); + /** * * @@ -44,6 +45,7 @@ public interface MutateRowsResponseOrBuilder * repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; */ com.google.bigtable.v2.MutateRowsResponse.Entry getEntries(int index); + /** * * @@ -54,6 +56,7 @@ public interface MutateRowsResponseOrBuilder * repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; */ int getEntriesCount(); + /** * * @@ -65,6 +68,7 @@ public interface MutateRowsResponseOrBuilder */ java.util.List getEntriesOrBuilderList(); + /** * * @@ -90,6 +94,7 @@ public interface MutateRowsResponseOrBuilder * @return Whether the rateLimitInfo field is set. */ boolean hasRateLimitInfo(); + /** * * @@ -104,6 +109,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 f4942aeaec..1690dd55a1 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class Mutation extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.Mutation) MutationOrBuilder { private static final long serialVersionUID = 0L; + // Use Mutation.newBuilder() to construct. private Mutation(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -77,6 +78,7 @@ public interface SetCellOrBuilder * @return The familyName. */ java.lang.String getFamilyName(); + /** * * @@ -135,6 +137,7 @@ public interface SetCellOrBuilder */ com.google.protobuf.ByteString getValue(); } + /** * * @@ -149,6 +152,7 @@ public static final class SetCell extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.Mutation.SetCell) SetCellOrBuilder { private static final long serialVersionUID = 0L; + // Use SetCell.newBuilder() to construct. private SetCell(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -185,6 +189,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object familyName_ = ""; + /** * * @@ -209,6 +214,7 @@ public java.lang.String getFamilyName() { return s; } } + /** * * @@ -236,6 +242,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 +262,7 @@ public com.google.protobuf.ByteString getColumnQualifier() { public static final int TIMESTAMP_MICROS_FIELD_NUMBER = 3; private long timestampMicros_ = 0L; + /** * * @@ -277,6 +285,7 @@ public long getTimestampMicros() { public static final int VALUE_FIELD_NUMBER = 4; private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -479,6 +488,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -704,6 +714,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object familyName_ = ""; + /** * * @@ -727,6 +738,7 @@ public java.lang.String getFamilyName() { return (java.lang.String) ref; } } + /** * * @@ -750,6 +762,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -772,6 +785,7 @@ public Builder setFamilyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -790,6 +804,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -816,6 +831,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { private com.google.protobuf.ByteString columnQualifier_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -832,6 +848,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getColumnQualifier() { return columnQualifier_; } + /** * * @@ -854,6 +871,7 @@ public Builder setColumnQualifier(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -874,6 +892,7 @@ public Builder clearColumnQualifier() { } private long timestampMicros_; + /** * * @@ -893,6 +912,7 @@ public Builder clearColumnQualifier() { public long getTimestampMicros() { return timestampMicros_; } + /** * * @@ -916,6 +936,7 @@ public Builder setTimestampMicros(long value) { onChanged(); return this; } + /** * * @@ -939,6 +960,7 @@ public Builder clearTimestampMicros() { } private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -954,6 +976,7 @@ public Builder clearTimestampMicros() { public com.google.protobuf.ByteString getValue() { return value_; } + /** * * @@ -975,6 +998,7 @@ public Builder setValue(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1076,6 +1100,7 @@ public interface AddToCellOrBuilder * @return The familyName. */ java.lang.String getFamilyName(); + /** * * @@ -1104,6 +1129,7 @@ public interface AddToCellOrBuilder * @return Whether the columnQualifier field is set. */ boolean hasColumnQualifier(); + /** * * @@ -1117,6 +1143,7 @@ public interface AddToCellOrBuilder * @return The columnQualifier. */ com.google.bigtable.v2.Value getColumnQualifier(); + /** * * @@ -1142,6 +1169,7 @@ public interface AddToCellOrBuilder * @return Whether the timestamp field is set. */ boolean hasTimestamp(); + /** * * @@ -1155,6 +1183,7 @@ public interface AddToCellOrBuilder * @return The timestamp. */ com.google.bigtable.v2.Value getTimestamp(); + /** * * @@ -1180,6 +1209,7 @@ public interface AddToCellOrBuilder * @return Whether the input field is set. */ boolean hasInput(); + /** * * @@ -1193,6 +1223,7 @@ public interface AddToCellOrBuilder * @return The input. */ com.google.bigtable.v2.Value getInput(); + /** * * @@ -1205,6 +1236,7 @@ public interface AddToCellOrBuilder */ com.google.bigtable.v2.ValueOrBuilder getInputOrBuilder(); } + /** * * @@ -1219,6 +1251,7 @@ public static final class AddToCell extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.bigtable.v2.Mutation.AddToCell) AddToCellOrBuilder { private static final long serialVersionUID = 0L; + // Use AddToCell.newBuilder() to construct. private AddToCell(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -1254,6 +1287,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object familyName_ = ""; + /** * * @@ -1279,6 +1313,7 @@ public java.lang.String getFamilyName() { return s; } } + /** * * @@ -1307,6 +1342,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 +1359,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { public boolean hasColumnQualifier() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1341,6 +1378,7 @@ public com.google.bigtable.v2.Value getColumnQualifier() { ? com.google.bigtable.v2.Value.getDefaultInstance() : columnQualifier_; } + /** * * @@ -1360,6 +1398,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 +1415,7 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { public boolean hasTimestamp() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1392,6 +1432,7 @@ public boolean hasTimestamp() { public com.google.bigtable.v2.Value getTimestamp() { return timestamp_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : timestamp_; } + /** * * @@ -1409,6 +1450,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 +1467,7 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { public boolean hasInput() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1441,6 +1484,7 @@ public boolean hasInput() { public com.google.bigtable.v2.Value getInput() { return input_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : input_; } + /** * * @@ -1658,6 +1702,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1913,6 +1958,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object familyName_ = ""; + /** * * @@ -1937,6 +1983,7 @@ public java.lang.String getFamilyName() { return (java.lang.String) ref; } } + /** * * @@ -1961,6 +2008,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1984,6 +2032,7 @@ public Builder setFamilyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2003,6 +2052,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -2034,6 +2084,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> columnQualifierBuilder_; + /** * * @@ -2049,6 +2100,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { public boolean hasColumnQualifier() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -2070,6 +2122,7 @@ public com.google.bigtable.v2.Value getColumnQualifier() { return columnQualifierBuilder_.getMessage(); } } + /** * * @@ -2093,6 +2146,7 @@ public Builder setColumnQualifier(com.google.bigtable.v2.Value value) { onChanged(); return this; } + /** * * @@ -2113,6 +2167,7 @@ public Builder setColumnQualifier(com.google.bigtable.v2.Value.Builder builderFo onChanged(); return this; } + /** * * @@ -2141,6 +2196,7 @@ public Builder mergeColumnQualifier(com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -2161,6 +2217,7 @@ public Builder clearColumnQualifier() { onChanged(); return this; } + /** * * @@ -2176,6 +2233,7 @@ public com.google.bigtable.v2.Value.Builder getColumnQualifierBuilder() { onChanged(); return getColumnQualifierFieldBuilder().getBuilder(); } + /** * * @@ -2195,6 +2253,7 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { : columnQualifier_; } } + /** * * @@ -2228,6 +2287,7 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> timestampBuilder_; + /** * * @@ -2243,6 +2303,7 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { public boolean hasTimestamp() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -2264,6 +2325,7 @@ public com.google.bigtable.v2.Value getTimestamp() { return timestampBuilder_.getMessage(); } } + /** * * @@ -2287,6 +2349,7 @@ public Builder setTimestamp(com.google.bigtable.v2.Value value) { onChanged(); return this; } + /** * * @@ -2307,6 +2370,7 @@ public Builder setTimestamp(com.google.bigtable.v2.Value.Builder builderForValue onChanged(); return this; } + /** * * @@ -2335,6 +2399,7 @@ public Builder mergeTimestamp(com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -2355,6 +2420,7 @@ public Builder clearTimestamp() { onChanged(); return this; } + /** * * @@ -2370,6 +2436,7 @@ public com.google.bigtable.v2.Value.Builder getTimestampBuilder() { onChanged(); return getTimestampFieldBuilder().getBuilder(); } + /** * * @@ -2389,6 +2456,7 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { : timestamp_; } } + /** * * @@ -2422,6 +2490,7 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> inputBuilder_; + /** * * @@ -2437,6 +2506,7 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { public boolean hasInput() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -2456,6 +2526,7 @@ public com.google.bigtable.v2.Value getInput() { return inputBuilder_.getMessage(); } } + /** * * @@ -2479,6 +2550,7 @@ public Builder setInput(com.google.bigtable.v2.Value value) { onChanged(); return this; } + /** * * @@ -2499,6 +2571,7 @@ public Builder setInput(com.google.bigtable.v2.Value.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -2527,6 +2600,7 @@ public Builder mergeInput(com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -2547,6 +2621,7 @@ public Builder clearInput() { onChanged(); return this; } + /** * * @@ -2562,6 +2637,7 @@ public com.google.bigtable.v2.Value.Builder getInputBuilder() { onChanged(); return getInputFieldBuilder().getBuilder(); } + /** * * @@ -2579,6 +2655,7 @@ public com.google.bigtable.v2.ValueOrBuilder getInputOrBuilder() { return input_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : input_; } } + /** * * @@ -2670,17 +2747,18 @@ public com.google.bigtable.v2.Mutation.AddToCell getDefaultInstanceForType() { } } - public interface DeleteFromColumnOrBuilder + public interface MergeToCellOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Mutation.DeleteFromColumn) + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Mutation.MergeToCell) com.google.protobuf.MessageOrBuilder { /** * * *
    -     * The name of the family from which cells should be deleted.
    -     * Must match `[-_.a-zA-Z0-9]+`
    +     * The name of the `Aggregate` family into which new data should be added.
    +     * This must be a family with a `value_type` of `Aggregate`.
    +     * Format: `[-_.a-zA-Z0-9]+`
          * 
    * * string family_name = 1; @@ -2688,12 +2766,14 @@ public interface DeleteFromColumnOrBuilder * @return The familyName. */ java.lang.String getFamilyName(); + /** * * *
    -     * The name of the family from which cells should be deleted.
    -     * Must match `[-_.a-zA-Z0-9]+`
    +     * The name of the `Aggregate` family into which new data should be added.
    +     * This must be a family with a `value_type` of `Aggregate`.
    +     * Format: `[-_.a-zA-Z0-9]+`
          * 
    * * string family_name = 1; @@ -2706,95 +2786,170 @@ public interface DeleteFromColumnOrBuilder * * *
    -     * The qualifier of the column from which cells should be deleted.
    -     * Can be any byte string, including the empty string.
    +     * The qualifier of the column into which new data should be added. This
    +     * must be a `raw_value`.
          * 
    * - * bytes column_qualifier = 2; + * .google.bigtable.v2.Value column_qualifier = 2; + * + * @return Whether the columnQualifier field is set. + */ + boolean hasColumnQualifier(); + + /** + * + * + *
    +     * The qualifier of the column into which new data should be added. This
    +     * must be a `raw_value`.
    +     * 
    + * + * .google.bigtable.v2.Value column_qualifier = 2; * * @return The columnQualifier. */ - com.google.protobuf.ByteString getColumnQualifier(); + com.google.bigtable.v2.Value getColumnQualifier(); /** * * *
    -     * The range of timestamps within which cells should be deleted.
    +     * The qualifier of the column into which new data should be added. This
    +     * must be a `raw_value`.
          * 
    * - * .google.bigtable.v2.TimestampRange time_range = 3; + * .google.bigtable.v2.Value column_qualifier = 2; + */ + com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder(); + + /** * - * @return Whether the timeRange field is set. + * + *
    +     * The timestamp of the cell to which new data should be added. This must
    +     * be a `raw_timestamp_micros` that matches the table's `granularity`.
    +     * 
    + * + * .google.bigtable.v2.Value timestamp = 3; + * + * @return Whether the timestamp field is set. */ - boolean hasTimeRange(); + boolean hasTimestamp(); + /** * * *
    -     * The range of timestamps within which cells should be deleted.
    +     * The timestamp of the cell to which new data should be added. This must
    +     * be a `raw_timestamp_micros` that matches the table's `granularity`.
          * 
    * - * .google.bigtable.v2.TimestampRange time_range = 3; + * .google.bigtable.v2.Value timestamp = 3; * - * @return The timeRange. + * @return The timestamp. */ - com.google.bigtable.v2.TimestampRange getTimeRange(); + com.google.bigtable.v2.Value getTimestamp(); + /** * * *
    -     * The range of timestamps within which cells should be deleted.
    +     * The timestamp of the cell to which new data should be added. This must
    +     * be a `raw_timestamp_micros` that matches the table's `granularity`.
          * 
    * - * .google.bigtable.v2.TimestampRange time_range = 3; + * .google.bigtable.v2.Value timestamp = 3; */ - com.google.bigtable.v2.TimestampRangeOrBuilder getTimeRangeOrBuilder(); + com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder(); + + /** + * + * + *
    +     * The input value to be merged into the specified cell. This must be
    +     * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +     * allowed, but has no effect.
    +     * 
    + * + * .google.bigtable.v2.Value input = 4; + * + * @return Whether the input field is set. + */ + boolean hasInput(); + + /** + * + * + *
    +     * The input value to be merged into the specified cell. This must be
    +     * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +     * allowed, but has no effect.
    +     * 
    + * + * .google.bigtable.v2.Value input = 4; + * + * @return The input. + */ + com.google.bigtable.v2.Value getInput(); + + /** + * + * + *
    +     * The input value to be merged into the specified cell. This must be
    +     * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +     * allowed, but has no effect.
    +     * 
    + * + * .google.bigtable.v2.Value input = 4; + */ + com.google.bigtable.v2.ValueOrBuilder getInputOrBuilder(); } + /** * * *
    -   * A Mutation which deletes cells from the specified column, optionally
    -   * restricting the deletions to a given timestamp range.
    +   * A Mutation which merges accumulated state into a cell in an `Aggregate`
    +   * family.
        * 
    * - * Protobuf type {@code google.bigtable.v2.Mutation.DeleteFromColumn} + * Protobuf type {@code google.bigtable.v2.Mutation.MergeToCell} */ - public static final class DeleteFromColumn extends com.google.protobuf.GeneratedMessageV3 + public static final class MergeToCell extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.bigtable.v2.Mutation.DeleteFromColumn) - DeleteFromColumnOrBuilder { + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Mutation.MergeToCell) + MergeToCellOrBuilder { private static final long serialVersionUID = 0L; - // Use DeleteFromColumn.newBuilder() to construct. - private DeleteFromColumn(com.google.protobuf.GeneratedMessageV3.Builder builder) { + + // Use MergeToCell.newBuilder() to construct. + private MergeToCell(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private DeleteFromColumn() { + private MergeToCell() { familyName_ = ""; - columnQualifier_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteFromColumn(); + return new MergeToCell(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto - .internal_static_google_bigtable_v2_Mutation_DeleteFromColumn_descriptor; + .internal_static_google_bigtable_v2_Mutation_MergeToCell_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto - .internal_static_google_bigtable_v2_Mutation_DeleteFromColumn_fieldAccessorTable + .internal_static_google_bigtable_v2_Mutation_MergeToCell_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Mutation.DeleteFromColumn.class, - com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder.class); + com.google.bigtable.v2.Mutation.MergeToCell.class, + com.google.bigtable.v2.Mutation.MergeToCell.Builder.class); } private int bitField0_; @@ -2802,12 +2957,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object familyName_ = ""; + /** * * *
    -     * The name of the family from which cells should be deleted.
    -     * Must match `[-_.a-zA-Z0-9]+`
    +     * The name of the `Aggregate` family into which new data should be added.
    +     * This must be a family with a `value_type` of `Aggregate`.
    +     * Format: `[-_.a-zA-Z0-9]+`
          * 
    * * string family_name = 1; @@ -2826,12 +2983,14 @@ public java.lang.String getFamilyName() { return s; } } + /** * * *
    -     * The name of the family from which cells should be deleted.
    -     * Must match `[-_.a-zA-Z0-9]+`
    +     * The name of the `Aggregate` family into which new data should be added.
    +     * This must be a family with a `value_type` of `Aggregate`.
    +     * Format: `[-_.a-zA-Z0-9]+`
          * 
    * * string family_name = 1; @@ -2852,58 +3011,1670 @@ 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; + private com.google.bigtable.v2.Value columnQualifier_; + /** * * *
    -     * The qualifier of the column from which cells should be deleted.
    -     * Can be any byte string, including the empty string.
    +     * The qualifier of the column into which new data should be added. This
    +     * must be a `raw_value`.
          * 
    * - * bytes column_qualifier = 2; + * .google.bigtable.v2.Value column_qualifier = 2; * - * @return The columnQualifier. + * @return Whether the columnQualifier field is set. */ @java.lang.Override - public com.google.protobuf.ByteString getColumnQualifier() { - return columnQualifier_; + public boolean hasColumnQualifier() { + return ((bitField0_ & 0x00000001) != 0); } - public static final int TIME_RANGE_FIELD_NUMBER = 3; - private com.google.bigtable.v2.TimestampRange timeRange_; /** * * *
    -     * The range of timestamps within which cells should be deleted.
    +     * The qualifier of the column into which new data should be added. This
    +     * must be a `raw_value`.
          * 
    * - * .google.bigtable.v2.TimestampRange time_range = 3; + * .google.bigtable.v2.Value column_qualifier = 2; * - * @return Whether the timeRange field is set. + * @return The columnQualifier. */ @java.lang.Override - public boolean hasTimeRange() { - return ((bitField0_ & 0x00000001) != 0); + public com.google.bigtable.v2.Value getColumnQualifier() { + return columnQualifier_ == null + ? com.google.bigtable.v2.Value.getDefaultInstance() + : columnQualifier_; } + /** * * *
    -     * The range of timestamps within which cells should be deleted.
    +     * The qualifier of the column into which new data should be added. This
    +     * must be a `raw_value`.
          * 
    * - * .google.bigtable.v2.TimestampRange time_range = 3; - * - * @return The timeRange. + * .google.bigtable.v2.Value column_qualifier = 2; */ @java.lang.Override - public com.google.bigtable.v2.TimestampRange getTimeRange() { - return timeRange_ == null - ? com.google.bigtable.v2.TimestampRange.getDefaultInstance() - : timeRange_; + public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { + return columnQualifier_ == null + ? com.google.bigtable.v2.Value.getDefaultInstance() + : columnQualifier_; + } + + public static final int TIMESTAMP_FIELD_NUMBER = 3; + private com.google.bigtable.v2.Value timestamp_; + + /** + * + * + *
    +     * The timestamp of the cell to which new data should be added. This must
    +     * be a `raw_timestamp_micros` that matches the table's `granularity`.
    +     * 
    + * + * .google.bigtable.v2.Value timestamp = 3; + * + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +     * The timestamp of the cell to which new data should be added. This must
    +     * be a `raw_timestamp_micros` that matches the table's `granularity`.
    +     * 
    + * + * .google.bigtable.v2.Value timestamp = 3; + * + * @return The timestamp. + */ + @java.lang.Override + public com.google.bigtable.v2.Value getTimestamp() { + return timestamp_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : timestamp_; + } + + /** + * + * + *
    +     * The timestamp of the cell to which new data should be added. This must
    +     * be a `raw_timestamp_micros` that matches the table's `granularity`.
    +     * 
    + * + * .google.bigtable.v2.Value timestamp = 3; + */ + @java.lang.Override + public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { + return timestamp_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : timestamp_; + } + + public static final int INPUT_FIELD_NUMBER = 4; + private com.google.bigtable.v2.Value input_; + + /** + * + * + *
    +     * The input value to be merged into the specified cell. This must be
    +     * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +     * allowed, but has no effect.
    +     * 
    + * + * .google.bigtable.v2.Value input = 4; + * + * @return Whether the input field is set. + */ + @java.lang.Override + public boolean hasInput() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +     * The input value to be merged into the specified cell. This must be
    +     * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +     * allowed, but has no effect.
    +     * 
    + * + * .google.bigtable.v2.Value input = 4; + * + * @return The input. + */ + @java.lang.Override + public com.google.bigtable.v2.Value getInput() { + return input_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : input_; + } + + /** + * + * + *
    +     * The input value to be merged into the specified cell. This must be
    +     * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +     * allowed, but has no effect.
    +     * 
    + * + * .google.bigtable.v2.Value input = 4; + */ + @java.lang.Override + public com.google.bigtable.v2.ValueOrBuilder getInputOrBuilder() { + return input_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : input_; + } + + 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(familyName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, familyName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getColumnQualifier()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getTimestamp()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getInput()); + } + 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(familyName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, familyName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getColumnQualifier()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTimestamp()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getInput()); + } + 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.Mutation.MergeToCell)) { + return super.equals(obj); + } + com.google.bigtable.v2.Mutation.MergeToCell other = + (com.google.bigtable.v2.Mutation.MergeToCell) obj; + + if (!getFamilyName().equals(other.getFamilyName())) return false; + if (hasColumnQualifier() != other.hasColumnQualifier()) return false; + if (hasColumnQualifier()) { + if (!getColumnQualifier().equals(other.getColumnQualifier())) return false; + } + if (hasTimestamp() != other.hasTimestamp()) return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) return false; + } + if (hasInput() != other.hasInput()) return false; + if (hasInput()) { + if (!getInput().equals(other.getInput())) 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) + FAMILY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFamilyName().hashCode(); + if (hasColumnQualifier()) { + hash = (37 * hash) + COLUMN_QUALIFIER_FIELD_NUMBER; + hash = (53 * hash) + getColumnQualifier().hashCode(); + } + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + if (hasInput()) { + hash = (37 * hash) + INPUT_FIELD_NUMBER; + hash = (53 * hash) + getInput().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Mutation.MergeToCell parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Mutation.MergeToCell 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.Mutation.MergeToCell parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Mutation.MergeToCell 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.Mutation.MergeToCell parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Mutation.MergeToCell parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + 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); + } + + 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( + 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); + } + + 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( + 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); + } + + 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( + 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.Mutation.MergeToCell prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * A Mutation which merges accumulated state into a cell in an `Aggregate`
    +     * family.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Mutation.MergeToCell} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Mutation.MergeToCell) + com.google.bigtable.v2.Mutation.MergeToCellOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_Mutation_MergeToCell_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Mutation.MergeToCell.class, + com.google.bigtable.v2.Mutation.MergeToCell.Builder.class); + } + + // Construct using com.google.bigtable.v2.Mutation.MergeToCell.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getColumnQualifierFieldBuilder(); + getTimestampFieldBuilder(); + getInputFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + familyName_ = ""; + columnQualifier_ = null; + if (columnQualifierBuilder_ != null) { + columnQualifierBuilder_.dispose(); + columnQualifierBuilder_ = null; + } + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + input_ = null; + if (inputBuilder_ != null) { + inputBuilder_.dispose(); + inputBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_Mutation_MergeToCell_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Mutation.MergeToCell getDefaultInstanceForType() { + return com.google.bigtable.v2.Mutation.MergeToCell.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Mutation.MergeToCell build() { + com.google.bigtable.v2.Mutation.MergeToCell result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Mutation.MergeToCell buildPartial() { + com.google.bigtable.v2.Mutation.MergeToCell result = + new com.google.bigtable.v2.Mutation.MergeToCell(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.Mutation.MergeToCell result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.familyName_ = familyName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.columnQualifier_ = + columnQualifierBuilder_ == null ? columnQualifier_ : columnQualifierBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.input_ = inputBuilder_ == null ? input_ : inputBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Mutation.MergeToCell) { + return mergeFrom((com.google.bigtable.v2.Mutation.MergeToCell) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Mutation.MergeToCell other) { + if (other == com.google.bigtable.v2.Mutation.MergeToCell.getDefaultInstance()) return this; + if (!other.getFamilyName().isEmpty()) { + familyName_ = other.familyName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasColumnQualifier()) { + mergeColumnQualifier(other.getColumnQualifier()); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (other.hasInput()) { + mergeInput(other.getInput()); + } + 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: + { + familyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getColumnQualifierFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getInputFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object familyName_ = ""; + + /** + * + * + *
    +       * The name of the `Aggregate` family into which new data should be added.
    +       * This must be a family with a `value_type` of `Aggregate`.
    +       * Format: `[-_.a-zA-Z0-9]+`
    +       * 
    + * + * string family_name = 1; + * + * @return The familyName. + */ + public java.lang.String getFamilyName() { + java.lang.Object ref = familyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + familyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * The name of the `Aggregate` family into which new data should be added.
    +       * This must be a family with a `value_type` of `Aggregate`.
    +       * Format: `[-_.a-zA-Z0-9]+`
    +       * 
    + * + * string family_name = 1; + * + * @return The bytes for familyName. + */ + public com.google.protobuf.ByteString getFamilyNameBytes() { + java.lang.Object ref = familyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + familyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * The name of the `Aggregate` family into which new data should be added.
    +       * This must be a family with a `value_type` of `Aggregate`.
    +       * Format: `[-_.a-zA-Z0-9]+`
    +       * 
    + * + * string family_name = 1; + * + * @param value The familyName to set. + * @return This builder for chaining. + */ + public Builder setFamilyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + familyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The name of the `Aggregate` family into which new data should be added.
    +       * This must be a family with a `value_type` of `Aggregate`.
    +       * Format: `[-_.a-zA-Z0-9]+`
    +       * 
    + * + * string family_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearFamilyName() { + familyName_ = getDefaultInstance().getFamilyName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +       * The name of the `Aggregate` family into which new data should be added.
    +       * This must be a family with a `value_type` of `Aggregate`.
    +       * Format: `[-_.a-zA-Z0-9]+`
    +       * 
    + * + * string family_name = 1; + * + * @param value The bytes for familyName to set. + * @return This builder for chaining. + */ + public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + familyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.bigtable.v2.Value columnQualifier_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder> + columnQualifierBuilder_; + + /** + * + * + *
    +       * The qualifier of the column into which new data should be added. This
    +       * must be a `raw_value`.
    +       * 
    + * + * .google.bigtable.v2.Value column_qualifier = 2; + * + * @return Whether the columnQualifier field is set. + */ + public boolean hasColumnQualifier() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +       * The qualifier of the column into which new data should be added. This
    +       * must be a `raw_value`.
    +       * 
    + * + * .google.bigtable.v2.Value column_qualifier = 2; + * + * @return The columnQualifier. + */ + public com.google.bigtable.v2.Value getColumnQualifier() { + if (columnQualifierBuilder_ == null) { + return columnQualifier_ == null + ? com.google.bigtable.v2.Value.getDefaultInstance() + : columnQualifier_; + } else { + return columnQualifierBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * The qualifier of the column into which new data should be added. This
    +       * must be a `raw_value`.
    +       * 
    + * + * .google.bigtable.v2.Value column_qualifier = 2; + */ + public Builder setColumnQualifier(com.google.bigtable.v2.Value value) { + if (columnQualifierBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + columnQualifier_ = value; + } else { + columnQualifierBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The qualifier of the column into which new data should be added. This
    +       * must be a `raw_value`.
    +       * 
    + * + * .google.bigtable.v2.Value column_qualifier = 2; + */ + public Builder setColumnQualifier(com.google.bigtable.v2.Value.Builder builderForValue) { + if (columnQualifierBuilder_ == null) { + columnQualifier_ = builderForValue.build(); + } else { + columnQualifierBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The qualifier of the column into which new data should be added. This
    +       * must be a `raw_value`.
    +       * 
    + * + * .google.bigtable.v2.Value column_qualifier = 2; + */ + public Builder mergeColumnQualifier(com.google.bigtable.v2.Value value) { + if (columnQualifierBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && columnQualifier_ != null + && columnQualifier_ != com.google.bigtable.v2.Value.getDefaultInstance()) { + getColumnQualifierBuilder().mergeFrom(value); + } else { + columnQualifier_ = value; + } + } else { + columnQualifierBuilder_.mergeFrom(value); + } + if (columnQualifier_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * The qualifier of the column into which new data should be added. This
    +       * must be a `raw_value`.
    +       * 
    + * + * .google.bigtable.v2.Value column_qualifier = 2; + */ + public Builder clearColumnQualifier() { + bitField0_ = (bitField0_ & ~0x00000002); + columnQualifier_ = null; + if (columnQualifierBuilder_ != null) { + columnQualifierBuilder_.dispose(); + columnQualifierBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * The qualifier of the column into which new data should be added. This
    +       * must be a `raw_value`.
    +       * 
    + * + * .google.bigtable.v2.Value column_qualifier = 2; + */ + public com.google.bigtable.v2.Value.Builder getColumnQualifierBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getColumnQualifierFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * The qualifier of the column into which new data should be added. This
    +       * must be a `raw_value`.
    +       * 
    + * + * .google.bigtable.v2.Value column_qualifier = 2; + */ + public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { + if (columnQualifierBuilder_ != null) { + return columnQualifierBuilder_.getMessageOrBuilder(); + } else { + return columnQualifier_ == null + ? com.google.bigtable.v2.Value.getDefaultInstance() + : columnQualifier_; + } + } + + /** + * + * + *
    +       * The qualifier of the column into which new data should be added. This
    +       * must be a `raw_value`.
    +       * 
    + * + * .google.bigtable.v2.Value column_qualifier = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder> + getColumnQualifierFieldBuilder() { + if (columnQualifierBuilder_ == null) { + columnQualifierBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder>( + getColumnQualifier(), getParentForChildren(), isClean()); + columnQualifier_ = null; + } + return columnQualifierBuilder_; + } + + private com.google.bigtable.v2.Value timestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder> + timestampBuilder_; + + /** + * + * + *
    +       * The timestamp of the cell to which new data should be added. This must
    +       * be a `raw_timestamp_micros` that matches the table's `granularity`.
    +       * 
    + * + * .google.bigtable.v2.Value timestamp = 3; + * + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +       * The timestamp of the cell to which new data should be added. This must
    +       * be a `raw_timestamp_micros` that matches the table's `granularity`.
    +       * 
    + * + * .google.bigtable.v2.Value timestamp = 3; + * + * @return The timestamp. + */ + public com.google.bigtable.v2.Value getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null + ? com.google.bigtable.v2.Value.getDefaultInstance() + : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * The timestamp of the cell to which new data should be added. This must
    +       * be a `raw_timestamp_micros` that matches the table's `granularity`.
    +       * 
    + * + * .google.bigtable.v2.Value timestamp = 3; + */ + public Builder setTimestamp(com.google.bigtable.v2.Value value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + } else { + timestampBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The timestamp of the cell to which new data should be added. This must
    +       * be a `raw_timestamp_micros` that matches the table's `granularity`.
    +       * 
    + * + * .google.bigtable.v2.Value timestamp = 3; + */ + public Builder setTimestamp(com.google.bigtable.v2.Value.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The timestamp of the cell to which new data should be added. This must
    +       * be a `raw_timestamp_micros` that matches the table's `granularity`.
    +       * 
    + * + * .google.bigtable.v2.Value timestamp = 3; + */ + public Builder mergeTimestamp(com.google.bigtable.v2.Value value) { + if (timestampBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && timestamp_ != null + && timestamp_ != com.google.bigtable.v2.Value.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); + } else { + timestamp_ = value; + } + } else { + timestampBuilder_.mergeFrom(value); + } + if (timestamp_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * The timestamp of the cell to which new data should be added. This must
    +       * be a `raw_timestamp_micros` that matches the table's `granularity`.
    +       * 
    + * + * .google.bigtable.v2.Value timestamp = 3; + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000004); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * The timestamp of the cell to which new data should be added. This must
    +       * be a `raw_timestamp_micros` that matches the table's `granularity`.
    +       * 
    + * + * .google.bigtable.v2.Value timestamp = 3; + */ + public com.google.bigtable.v2.Value.Builder getTimestampBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * The timestamp of the cell to which new data should be added. This must
    +       * be a `raw_timestamp_micros` that matches the table's `granularity`.
    +       * 
    + * + * .google.bigtable.v2.Value timestamp = 3; + */ + public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null + ? com.google.bigtable.v2.Value.getDefaultInstance() + : timestamp_; + } + } + + /** + * + * + *
    +       * The timestamp of the cell to which new data should be added. This must
    +       * be a `raw_timestamp_micros` that matches the table's `granularity`.
    +       * 
    + * + * .google.bigtable.v2.Value timestamp = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder> + getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder>( + getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + private com.google.bigtable.v2.Value input_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder> + inputBuilder_; + + /** + * + * + *
    +       * The input value to be merged into the specified cell. This must be
    +       * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +       * allowed, but has no effect.
    +       * 
    + * + * .google.bigtable.v2.Value input = 4; + * + * @return Whether the input field is set. + */ + public boolean hasInput() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
    +       * The input value to be merged into the specified cell. This must be
    +       * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +       * allowed, but has no effect.
    +       * 
    + * + * .google.bigtable.v2.Value input = 4; + * + * @return The input. + */ + public com.google.bigtable.v2.Value getInput() { + if (inputBuilder_ == null) { + return input_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : input_; + } else { + return inputBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * The input value to be merged into the specified cell. This must be
    +       * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +       * allowed, but has no effect.
    +       * 
    + * + * .google.bigtable.v2.Value input = 4; + */ + public Builder setInput(com.google.bigtable.v2.Value value) { + if (inputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + input_ = value; + } else { + inputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The input value to be merged into the specified cell. This must be
    +       * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +       * allowed, but has no effect.
    +       * 
    + * + * .google.bigtable.v2.Value input = 4; + */ + public Builder setInput(com.google.bigtable.v2.Value.Builder builderForValue) { + if (inputBuilder_ == null) { + input_ = builderForValue.build(); + } else { + inputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The input value to be merged into the specified cell. This must be
    +       * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +       * allowed, but has no effect.
    +       * 
    + * + * .google.bigtable.v2.Value input = 4; + */ + public Builder mergeInput(com.google.bigtable.v2.Value value) { + if (inputBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && input_ != null + && input_ != com.google.bigtable.v2.Value.getDefaultInstance()) { + getInputBuilder().mergeFrom(value); + } else { + input_ = value; + } + } else { + inputBuilder_.mergeFrom(value); + } + if (input_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * The input value to be merged into the specified cell. This must be
    +       * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +       * allowed, but has no effect.
    +       * 
    + * + * .google.bigtable.v2.Value input = 4; + */ + public Builder clearInput() { + bitField0_ = (bitField0_ & ~0x00000008); + input_ = null; + if (inputBuilder_ != null) { + inputBuilder_.dispose(); + inputBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * The input value to be merged into the specified cell. This must be
    +       * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +       * allowed, but has no effect.
    +       * 
    + * + * .google.bigtable.v2.Value input = 4; + */ + public com.google.bigtable.v2.Value.Builder getInputBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getInputFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * The input value to be merged into the specified cell. This must be
    +       * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +       * allowed, but has no effect.
    +       * 
    + * + * .google.bigtable.v2.Value input = 4; + */ + public com.google.bigtable.v2.ValueOrBuilder getInputOrBuilder() { + if (inputBuilder_ != null) { + return inputBuilder_.getMessageOrBuilder(); + } else { + return input_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : input_; + } + } + + /** + * + * + *
    +       * The input value to be merged into the specified cell. This must be
    +       * compatible with the family's `value_type.state_type`. Merging `NULL` is
    +       * allowed, but has no effect.
    +       * 
    + * + * .google.bigtable.v2.Value input = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder> + getInputFieldBuilder() { + if (inputBuilder_ == null) { + inputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder>( + getInput(), getParentForChildren(), isClean()); + input_ = null; + } + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Mutation.MergeToCell) + private static final com.google.bigtable.v2.Mutation.MergeToCell DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Mutation.MergeToCell(); + } + + public static com.google.bigtable.v2.Mutation.MergeToCell getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MergeToCell 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.Mutation.MergeToCell getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeleteFromColumnOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Mutation.DeleteFromColumn) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The name of the family from which cells should be deleted.
    +     * Must match `[-_.a-zA-Z0-9]+`
    +     * 
    + * + * string family_name = 1; + * + * @return The familyName. + */ + java.lang.String getFamilyName(); + + /** + * + * + *
    +     * The name of the family from which cells should be deleted.
    +     * Must match `[-_.a-zA-Z0-9]+`
    +     * 
    + * + * string family_name = 1; + * + * @return The bytes for familyName. + */ + com.google.protobuf.ByteString getFamilyNameBytes(); + + /** + * + * + *
    +     * The qualifier of the column from which cells should be deleted.
    +     * Can be any byte string, including the empty string.
    +     * 
    + * + * bytes column_qualifier = 2; + * + * @return The columnQualifier. + */ + com.google.protobuf.ByteString getColumnQualifier(); + + /** + * + * + *
    +     * The range of timestamps within which cells should be deleted.
    +     * 
    + * + * .google.bigtable.v2.TimestampRange time_range = 3; + * + * @return Whether the timeRange field is set. + */ + boolean hasTimeRange(); + + /** + * + * + *
    +     * The range of timestamps within which cells should be deleted.
    +     * 
    + * + * .google.bigtable.v2.TimestampRange time_range = 3; + * + * @return The timeRange. + */ + com.google.bigtable.v2.TimestampRange getTimeRange(); + + /** + * + * + *
    +     * The range of timestamps within which cells should be deleted.
    +     * 
    + * + * .google.bigtable.v2.TimestampRange time_range = 3; + */ + com.google.bigtable.v2.TimestampRangeOrBuilder getTimeRangeOrBuilder(); + } + + /** + * + * + *
    +   * A Mutation which deletes cells from the specified column, optionally
    +   * restricting the deletions to a given timestamp range.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Mutation.DeleteFromColumn} + */ + public static final class DeleteFromColumn extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Mutation.DeleteFromColumn) + DeleteFromColumnOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteFromColumn.newBuilder() to construct. + private DeleteFromColumn(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteFromColumn() { + familyName_ = ""; + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_Mutation_DeleteFromColumn_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Mutation.DeleteFromColumn.class, + com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder.class); + } + + private int bitField0_; + public static final int FAMILY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object familyName_ = ""; + + /** + * + * + *
    +     * The name of the family from which cells should be deleted.
    +     * Must match `[-_.a-zA-Z0-9]+`
    +     * 
    + * + * string family_name = 1; + * + * @return The familyName. + */ + @java.lang.Override + public java.lang.String getFamilyName() { + java.lang.Object ref = familyName_; + 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(); + familyName_ = s; + return s; + } + } + + /** + * + * + *
    +     * The name of the family from which cells should be deleted.
    +     * Must match `[-_.a-zA-Z0-9]+`
    +     * 
    + * + * string family_name = 1; + * + * @return The bytes for familyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFamilyNameBytes() { + java.lang.Object ref = familyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + familyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLUMN_QUALIFIER_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString columnQualifier_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +     * The qualifier of the column from which cells should be deleted.
    +     * Can be any byte string, including the empty string.
    +     * 
    + * + * bytes column_qualifier = 2; + * + * @return The columnQualifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnQualifier() { + return columnQualifier_; + } + + public static final int TIME_RANGE_FIELD_NUMBER = 3; + private com.google.bigtable.v2.TimestampRange timeRange_; + + /** + * + * + *
    +     * The range of timestamps within which cells should be deleted.
    +     * 
    + * + * .google.bigtable.v2.TimestampRange time_range = 3; + * + * @return Whether the timeRange field is set. + */ + @java.lang.Override + public boolean hasTimeRange() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * The range of timestamps within which cells should be deleted.
    +     * 
    + * + * .google.bigtable.v2.TimestampRange time_range = 3; + * + * @return The timeRange. + */ + @java.lang.Override + public com.google.bigtable.v2.TimestampRange getTimeRange() { + return timeRange_ == null + ? com.google.bigtable.v2.TimestampRange.getDefaultInstance() + : timeRange_; } + /** * * @@ -3103,6 +4874,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -3333,6 +5105,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object familyName_ = ""; + /** * * @@ -3356,6 +5129,7 @@ public java.lang.String getFamilyName() { return (java.lang.String) ref; } } + /** * * @@ -3379,6 +5153,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3401,6 +5176,7 @@ public Builder setFamilyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3419,6 +5195,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -3445,6 +5222,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { private com.google.protobuf.ByteString columnQualifier_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -3461,6 +5239,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getColumnQualifier() { return columnQualifier_; } + /** * * @@ -3483,6 +5262,7 @@ public Builder setColumnQualifier(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -3508,6 +5288,7 @@ public Builder clearColumnQualifier() { com.google.bigtable.v2.TimestampRange.Builder, com.google.bigtable.v2.TimestampRangeOrBuilder> timeRangeBuilder_; + /** * * @@ -3522,6 +5303,7 @@ public Builder clearColumnQualifier() { public boolean hasTimeRange() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -3542,6 +5324,7 @@ public com.google.bigtable.v2.TimestampRange getTimeRange() { return timeRangeBuilder_.getMessage(); } } + /** * * @@ -3564,6 +5347,7 @@ public Builder setTimeRange(com.google.bigtable.v2.TimestampRange value) { onChanged(); return this; } + /** * * @@ -3583,6 +5367,7 @@ public Builder setTimeRange(com.google.bigtable.v2.TimestampRange.Builder builde onChanged(); return this; } + /** * * @@ -3610,6 +5395,7 @@ public Builder mergeTimeRange(com.google.bigtable.v2.TimestampRange value) { } return this; } + /** * * @@ -3629,6 +5415,7 @@ public Builder clearTimeRange() { onChanged(); return this; } + /** * * @@ -3643,6 +5430,7 @@ public com.google.bigtable.v2.TimestampRange.Builder getTimeRangeBuilder() { onChanged(); return getTimeRangeFieldBuilder().getBuilder(); } + /** * * @@ -3661,6 +5449,7 @@ public com.google.bigtable.v2.TimestampRangeOrBuilder getTimeRangeOrBuilder() { : timeRange_; } } + /** * * @@ -3769,6 +5558,7 @@ public interface DeleteFromFamilyOrBuilder * @return The familyName. */ java.lang.String getFamilyName(); + /** * * @@ -3783,6 +5573,7 @@ public interface DeleteFromFamilyOrBuilder */ com.google.protobuf.ByteString getFamilyNameBytes(); } + /** * * @@ -3797,6 +5588,7 @@ public static final class DeleteFromFamily extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.bigtable.v2.Mutation.DeleteFromFamily) DeleteFromFamilyOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteFromFamily.newBuilder() to construct. private DeleteFromFamily(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -3831,6 +5623,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object familyName_ = ""; + /** * * @@ -3855,6 +5648,7 @@ public java.lang.String getFamilyName() { return s; } } + /** * * @@ -4040,6 +5834,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -4227,6 +6022,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object familyName_ = ""; + /** * * @@ -4250,6 +6046,7 @@ public java.lang.String getFamilyName() { return (java.lang.String) ref; } } + /** * * @@ -4273,6 +6070,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4295,6 +6093,7 @@ public Builder setFamilyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4313,6 +6112,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -4405,6 +6205,7 @@ public interface DeleteFromRowOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Mutation.DeleteFromRow) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -4419,6 +6220,7 @@ public static final class DeleteFromRow extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.v2.Mutation.DeleteFromRow) DeleteFromRowOrBuilder { private static final long serialVersionUID = 0L; + // Use DeleteFromRow.newBuilder() to construct. private DeleteFromRow(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -4598,6 +6400,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -4834,6 +6637,7 @@ public enum MutationCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { SET_CELL(1), ADD_TO_CELL(5), + MERGE_TO_CELL(6), DELETE_FROM_COLUMN(2), DELETE_FROM_FAMILY(3), DELETE_FROM_ROW(4), @@ -4843,6 +6647,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. @@ -4859,6 +6664,8 @@ public static MutationCase forNumber(int value) { return SET_CELL; case 5: return ADD_TO_CELL; + case 6: + return MERGE_TO_CELL; case 2: return DELETE_FROM_COLUMN; case 3: @@ -4882,6 +6689,7 @@ public MutationCase getMutationCase() { } public static final int SET_CELL_FIELD_NUMBER = 1; + /** * * @@ -4897,6 +6705,7 @@ public MutationCase getMutationCase() { public boolean hasSetCell() { return mutationCase_ == 1; } + /** * * @@ -4915,6 +6724,7 @@ public com.google.bigtable.v2.Mutation.SetCell getSetCell() { } return com.google.bigtable.v2.Mutation.SetCell.getDefaultInstance(); } + /** * * @@ -4933,6 +6743,7 @@ public com.google.bigtable.v2.Mutation.SetCellOrBuilder getSetCellOrBuilder() { } public static final int ADD_TO_CELL_FIELD_NUMBER = 5; + /** * * @@ -4948,6 +6759,7 @@ public com.google.bigtable.v2.Mutation.SetCellOrBuilder getSetCellOrBuilder() { public boolean hasAddToCell() { return mutationCase_ == 5; } + /** * * @@ -4966,6 +6778,7 @@ public com.google.bigtable.v2.Mutation.AddToCell getAddToCell() { } return com.google.bigtable.v2.Mutation.AddToCell.getDefaultInstance(); } + /** * * @@ -4983,7 +6796,62 @@ public com.google.bigtable.v2.Mutation.AddToCellOrBuilder getAddToCellOrBuilder( return com.google.bigtable.v2.Mutation.AddToCell.getDefaultInstance(); } + public static final int MERGE_TO_CELL_FIELD_NUMBER = 6; + + /** + * + * + *
    +   * Merges accumulated state to an `Aggregate` cell.
    +   * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + * + * @return Whether the mergeToCell field is set. + */ + @java.lang.Override + public boolean hasMergeToCell() { + return mutationCase_ == 6; + } + + /** + * + * + *
    +   * Merges accumulated state to an `Aggregate` cell.
    +   * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + * + * @return The mergeToCell. + */ + @java.lang.Override + public com.google.bigtable.v2.Mutation.MergeToCell getMergeToCell() { + if (mutationCase_ == 6) { + return (com.google.bigtable.v2.Mutation.MergeToCell) mutation_; + } + return com.google.bigtable.v2.Mutation.MergeToCell.getDefaultInstance(); + } + + /** + * + * + *
    +   * Merges accumulated state to an `Aggregate` cell.
    +   * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + */ + @java.lang.Override + public com.google.bigtable.v2.Mutation.MergeToCellOrBuilder getMergeToCellOrBuilder() { + if (mutationCase_ == 6) { + return (com.google.bigtable.v2.Mutation.MergeToCell) mutation_; + } + return com.google.bigtable.v2.Mutation.MergeToCell.getDefaultInstance(); + } + public static final int DELETE_FROM_COLUMN_FIELD_NUMBER = 2; + /** * * @@ -4999,6 +6867,7 @@ public com.google.bigtable.v2.Mutation.AddToCellOrBuilder getAddToCellOrBuilder( public boolean hasDeleteFromColumn() { return mutationCase_ == 2; } + /** * * @@ -5017,6 +6886,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumn getDeleteFromColumn() { } return com.google.bigtable.v2.Mutation.DeleteFromColumn.getDefaultInstance(); } + /** * * @@ -5035,6 +6905,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumnOrBuilder getDeleteFromCo } public static final int DELETE_FROM_FAMILY_FIELD_NUMBER = 3; + /** * * @@ -5050,6 +6921,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumnOrBuilder getDeleteFromCo public boolean hasDeleteFromFamily() { return mutationCase_ == 3; } + /** * * @@ -5068,6 +6940,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamily getDeleteFromFamily() { } return com.google.bigtable.v2.Mutation.DeleteFromFamily.getDefaultInstance(); } + /** * * @@ -5086,6 +6959,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamilyOrBuilder getDeleteFromFa } public static final int DELETE_FROM_ROW_FIELD_NUMBER = 4; + /** * * @@ -5101,6 +6975,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamilyOrBuilder getDeleteFromFa public boolean hasDeleteFromRow() { return mutationCase_ == 4; } + /** * * @@ -5119,6 +6994,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromRow getDeleteFromRow() { } return com.google.bigtable.v2.Mutation.DeleteFromRow.getDefaultInstance(); } + /** * * @@ -5165,6 +7041,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (mutationCase_ == 5) { output.writeMessage(5, (com.google.bigtable.v2.Mutation.AddToCell) mutation_); } + if (mutationCase_ == 6) { + output.writeMessage(6, (com.google.bigtable.v2.Mutation.MergeToCell) mutation_); + } getUnknownFields().writeTo(output); } @@ -5199,6 +7078,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 5, (com.google.bigtable.v2.Mutation.AddToCell) mutation_); } + if (mutationCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.bigtable.v2.Mutation.MergeToCell) mutation_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -5222,6 +7106,9 @@ public boolean equals(final java.lang.Object obj) { case 5: if (!getAddToCell().equals(other.getAddToCell())) return false; break; + case 6: + if (!getMergeToCell().equals(other.getMergeToCell())) return false; + break; case 2: if (!getDeleteFromColumn().equals(other.getDeleteFromColumn())) return false; break; @@ -5254,6 +7141,10 @@ public int hashCode() { hash = (37 * hash) + ADD_TO_CELL_FIELD_NUMBER; hash = (53 * hash) + getAddToCell().hashCode(); break; + case 6: + hash = (37 * hash) + MERGE_TO_CELL_FIELD_NUMBER; + hash = (53 * hash) + getMergeToCell().hashCode(); + break; case 2: hash = (37 * hash) + DELETE_FROM_COLUMN_FIELD_NUMBER; hash = (53 * hash) + getDeleteFromColumn().hashCode(); @@ -5368,6 +7259,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -5412,6 +7304,9 @@ public Builder clear() { if (addToCellBuilder_ != null) { addToCellBuilder_.clear(); } + if (mergeToCellBuilder_ != null) { + mergeToCellBuilder_.clear(); + } if (deleteFromColumnBuilder_ != null) { deleteFromColumnBuilder_.clear(); } @@ -5470,6 +7365,9 @@ private void buildPartialOneofs(com.google.bigtable.v2.Mutation result) { if (mutationCase_ == 5 && addToCellBuilder_ != null) { result.mutation_ = addToCellBuilder_.build(); } + if (mutationCase_ == 6 && mergeToCellBuilder_ != null) { + result.mutation_ = mergeToCellBuilder_.build(); + } if (mutationCase_ == 2 && deleteFromColumnBuilder_ != null) { result.mutation_ = deleteFromColumnBuilder_.build(); } @@ -5537,6 +7435,11 @@ public Builder mergeFrom(com.google.bigtable.v2.Mutation other) { mergeAddToCell(other.getAddToCell()); break; } + case MERGE_TO_CELL: + { + mergeMergeToCell(other.getMergeToCell()); + break; + } case DELETE_FROM_COLUMN: { mergeDeleteFromColumn(other.getDeleteFromColumn()); @@ -5615,6 +7518,12 @@ public Builder mergeFrom( mutationCase_ = 5; break; } // case 42 + case 50: + { + input.readMessage(getMergeToCellFieldBuilder().getBuilder(), extensionRegistry); + mutationCase_ = 6; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5653,6 +7562,7 @@ public Builder clearMutation() { com.google.bigtable.v2.Mutation.SetCell.Builder, com.google.bigtable.v2.Mutation.SetCellOrBuilder> setCellBuilder_; + /** * * @@ -5668,6 +7578,7 @@ public Builder clearMutation() { public boolean hasSetCell() { return mutationCase_ == 1; } + /** * * @@ -5693,6 +7604,7 @@ public com.google.bigtable.v2.Mutation.SetCell getSetCell() { return com.google.bigtable.v2.Mutation.SetCell.getDefaultInstance(); } } + /** * * @@ -5715,6 +7627,7 @@ public Builder setSetCell(com.google.bigtable.v2.Mutation.SetCell value) { mutationCase_ = 1; return this; } + /** * * @@ -5734,6 +7647,7 @@ public Builder setSetCell(com.google.bigtable.v2.Mutation.SetCell.Builder builde mutationCase_ = 1; return this; } + /** * * @@ -5766,6 +7680,7 @@ public Builder mergeSetCell(com.google.bigtable.v2.Mutation.SetCell value) { mutationCase_ = 1; return this; } + /** * * @@ -5791,6 +7706,7 @@ public Builder clearSetCell() { } return this; } + /** * * @@ -5803,6 +7719,7 @@ public Builder clearSetCell() { public com.google.bigtable.v2.Mutation.SetCell.Builder getSetCellBuilder() { return getSetCellFieldBuilder().getBuilder(); } + /** * * @@ -5823,6 +7740,7 @@ public com.google.bigtable.v2.Mutation.SetCellOrBuilder getSetCellOrBuilder() { return com.google.bigtable.v2.Mutation.SetCell.getDefaultInstance(); } } + /** * * @@ -5861,6 +7779,7 @@ public com.google.bigtable.v2.Mutation.SetCellOrBuilder getSetCellOrBuilder() { com.google.bigtable.v2.Mutation.AddToCell.Builder, com.google.bigtable.v2.Mutation.AddToCellOrBuilder> addToCellBuilder_; + /** * * @@ -5876,6 +7795,7 @@ public com.google.bigtable.v2.Mutation.SetCellOrBuilder getSetCellOrBuilder() { public boolean hasAddToCell() { return mutationCase_ == 5; } + /** * * @@ -5901,6 +7821,7 @@ public com.google.bigtable.v2.Mutation.AddToCell getAddToCell() { return com.google.bigtable.v2.Mutation.AddToCell.getDefaultInstance(); } } + /** * * @@ -5923,6 +7844,7 @@ public Builder setAddToCell(com.google.bigtable.v2.Mutation.AddToCell value) { mutationCase_ = 5; return this; } + /** * * @@ -5942,6 +7864,7 @@ public Builder setAddToCell(com.google.bigtable.v2.Mutation.AddToCell.Builder bu mutationCase_ = 5; return this; } + /** * * @@ -5974,6 +7897,7 @@ public Builder mergeAddToCell(com.google.bigtable.v2.Mutation.AddToCell value) { mutationCase_ = 5; return this; } + /** * * @@ -5999,6 +7923,7 @@ public Builder clearAddToCell() { } return this; } + /** * * @@ -6011,6 +7936,7 @@ public Builder clearAddToCell() { public com.google.bigtable.v2.Mutation.AddToCell.Builder getAddToCellBuilder() { return getAddToCellFieldBuilder().getBuilder(); } + /** * * @@ -6031,6 +7957,7 @@ public com.google.bigtable.v2.Mutation.AddToCellOrBuilder getAddToCellOrBuilder( return com.google.bigtable.v2.Mutation.AddToCell.getDefaultInstance(); } } + /** * * @@ -6064,11 +7991,230 @@ public com.google.bigtable.v2.Mutation.AddToCellOrBuilder getAddToCellOrBuilder( return addToCellBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Mutation.MergeToCell, + com.google.bigtable.v2.Mutation.MergeToCell.Builder, + com.google.bigtable.v2.Mutation.MergeToCellOrBuilder> + mergeToCellBuilder_; + + /** + * + * + *
    +     * Merges accumulated state to an `Aggregate` cell.
    +     * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + * + * @return Whether the mergeToCell field is set. + */ + @java.lang.Override + public boolean hasMergeToCell() { + return mutationCase_ == 6; + } + + /** + * + * + *
    +     * Merges accumulated state to an `Aggregate` cell.
    +     * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + * + * @return The mergeToCell. + */ + @java.lang.Override + public com.google.bigtable.v2.Mutation.MergeToCell getMergeToCell() { + if (mergeToCellBuilder_ == null) { + if (mutationCase_ == 6) { + return (com.google.bigtable.v2.Mutation.MergeToCell) mutation_; + } + return com.google.bigtable.v2.Mutation.MergeToCell.getDefaultInstance(); + } else { + if (mutationCase_ == 6) { + return mergeToCellBuilder_.getMessage(); + } + return com.google.bigtable.v2.Mutation.MergeToCell.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Merges accumulated state to an `Aggregate` cell.
    +     * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + */ + public Builder setMergeToCell(com.google.bigtable.v2.Mutation.MergeToCell value) { + if (mergeToCellBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mutation_ = value; + onChanged(); + } else { + mergeToCellBuilder_.setMessage(value); + } + mutationCase_ = 6; + return this; + } + + /** + * + * + *
    +     * Merges accumulated state to an `Aggregate` cell.
    +     * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + */ + public Builder setMergeToCell( + com.google.bigtable.v2.Mutation.MergeToCell.Builder builderForValue) { + if (mergeToCellBuilder_ == null) { + mutation_ = builderForValue.build(); + onChanged(); + } else { + mergeToCellBuilder_.setMessage(builderForValue.build()); + } + mutationCase_ = 6; + return this; + } + + /** + * + * + *
    +     * Merges accumulated state to an `Aggregate` cell.
    +     * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + */ + public Builder mergeMergeToCell(com.google.bigtable.v2.Mutation.MergeToCell value) { + if (mergeToCellBuilder_ == null) { + if (mutationCase_ == 6 + && mutation_ != com.google.bigtable.v2.Mutation.MergeToCell.getDefaultInstance()) { + mutation_ = + com.google.bigtable.v2.Mutation.MergeToCell.newBuilder( + (com.google.bigtable.v2.Mutation.MergeToCell) mutation_) + .mergeFrom(value) + .buildPartial(); + } else { + mutation_ = value; + } + onChanged(); + } else { + if (mutationCase_ == 6) { + mergeToCellBuilder_.mergeFrom(value); + } else { + mergeToCellBuilder_.setMessage(value); + } + } + mutationCase_ = 6; + return this; + } + + /** + * + * + *
    +     * Merges accumulated state to an `Aggregate` cell.
    +     * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + */ + public Builder clearMergeToCell() { + if (mergeToCellBuilder_ == null) { + if (mutationCase_ == 6) { + mutationCase_ = 0; + mutation_ = null; + onChanged(); + } + } else { + if (mutationCase_ == 6) { + mutationCase_ = 0; + mutation_ = null; + } + mergeToCellBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Merges accumulated state to an `Aggregate` cell.
    +     * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + */ + public com.google.bigtable.v2.Mutation.MergeToCell.Builder getMergeToCellBuilder() { + return getMergeToCellFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Merges accumulated state to an `Aggregate` cell.
    +     * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + */ + @java.lang.Override + public com.google.bigtable.v2.Mutation.MergeToCellOrBuilder getMergeToCellOrBuilder() { + if ((mutationCase_ == 6) && (mergeToCellBuilder_ != null)) { + return mergeToCellBuilder_.getMessageOrBuilder(); + } else { + if (mutationCase_ == 6) { + return (com.google.bigtable.v2.Mutation.MergeToCell) mutation_; + } + return com.google.bigtable.v2.Mutation.MergeToCell.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Merges accumulated state to an `Aggregate` cell.
    +     * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Mutation.MergeToCell, + com.google.bigtable.v2.Mutation.MergeToCell.Builder, + com.google.bigtable.v2.Mutation.MergeToCellOrBuilder> + getMergeToCellFieldBuilder() { + if (mergeToCellBuilder_ == null) { + if (!(mutationCase_ == 6)) { + mutation_ = com.google.bigtable.v2.Mutation.MergeToCell.getDefaultInstance(); + } + mergeToCellBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Mutation.MergeToCell, + com.google.bigtable.v2.Mutation.MergeToCell.Builder, + com.google.bigtable.v2.Mutation.MergeToCellOrBuilder>( + (com.google.bigtable.v2.Mutation.MergeToCell) mutation_, + getParentForChildren(), + isClean()); + mutation_ = null; + } + mutationCase_ = 6; + onChanged(); + return mergeToCellBuilder_; + } + private com.google.protobuf.SingleFieldBuilderV3< com.google.bigtable.v2.Mutation.DeleteFromColumn, com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder, com.google.bigtable.v2.Mutation.DeleteFromColumnOrBuilder> deleteFromColumnBuilder_; + /** * * @@ -6084,6 +8230,7 @@ public com.google.bigtable.v2.Mutation.AddToCellOrBuilder getAddToCellOrBuilder( public boolean hasDeleteFromColumn() { return mutationCase_ == 2; } + /** * * @@ -6109,6 +8256,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumn getDeleteFromColumn() { return com.google.bigtable.v2.Mutation.DeleteFromColumn.getDefaultInstance(); } } + /** * * @@ -6131,6 +8279,7 @@ public Builder setDeleteFromColumn(com.google.bigtable.v2.Mutation.DeleteFromCol mutationCase_ = 2; return this; } + /** * * @@ -6151,6 +8300,7 @@ public Builder setDeleteFromColumn( mutationCase_ = 2; return this; } + /** * * @@ -6183,6 +8333,7 @@ public Builder mergeDeleteFromColumn(com.google.bigtable.v2.Mutation.DeleteFromC mutationCase_ = 2; return this; } + /** * * @@ -6208,6 +8359,7 @@ public Builder clearDeleteFromColumn() { } return this; } + /** * * @@ -6220,6 +8372,7 @@ public Builder clearDeleteFromColumn() { public com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder getDeleteFromColumnBuilder() { return getDeleteFromColumnFieldBuilder().getBuilder(); } + /** * * @@ -6241,6 +8394,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder getDeleteFromCol return com.google.bigtable.v2.Mutation.DeleteFromColumn.getDefaultInstance(); } } + /** * * @@ -6279,6 +8433,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder getDeleteFromCol com.google.bigtable.v2.Mutation.DeleteFromFamily.Builder, com.google.bigtable.v2.Mutation.DeleteFromFamilyOrBuilder> deleteFromFamilyBuilder_; + /** * * @@ -6294,6 +8449,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder getDeleteFromCol public boolean hasDeleteFromFamily() { return mutationCase_ == 3; } + /** * * @@ -6319,6 +8475,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamily getDeleteFromFamily() { return com.google.bigtable.v2.Mutation.DeleteFromFamily.getDefaultInstance(); } } + /** * * @@ -6341,6 +8498,7 @@ public Builder setDeleteFromFamily(com.google.bigtable.v2.Mutation.DeleteFromFam mutationCase_ = 3; return this; } + /** * * @@ -6361,6 +8519,7 @@ public Builder setDeleteFromFamily( mutationCase_ = 3; return this; } + /** * * @@ -6393,6 +8552,7 @@ public Builder mergeDeleteFromFamily(com.google.bigtable.v2.Mutation.DeleteFromF mutationCase_ = 3; return this; } + /** * * @@ -6418,6 +8578,7 @@ public Builder clearDeleteFromFamily() { } return this; } + /** * * @@ -6430,6 +8591,7 @@ public Builder clearDeleteFromFamily() { public com.google.bigtable.v2.Mutation.DeleteFromFamily.Builder getDeleteFromFamilyBuilder() { return getDeleteFromFamilyFieldBuilder().getBuilder(); } + /** * * @@ -6451,6 +8613,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamily.Builder getDeleteFromFam return com.google.bigtable.v2.Mutation.DeleteFromFamily.getDefaultInstance(); } } + /** * * @@ -6489,6 +8652,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamily.Builder getDeleteFromFam com.google.bigtable.v2.Mutation.DeleteFromRow.Builder, com.google.bigtable.v2.Mutation.DeleteFromRowOrBuilder> deleteFromRowBuilder_; + /** * * @@ -6504,6 +8668,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamily.Builder getDeleteFromFam public boolean hasDeleteFromRow() { return mutationCase_ == 4; } + /** * * @@ -6529,6 +8694,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromRow getDeleteFromRow() { return com.google.bigtable.v2.Mutation.DeleteFromRow.getDefaultInstance(); } } + /** * * @@ -6551,6 +8717,7 @@ public Builder setDeleteFromRow(com.google.bigtable.v2.Mutation.DeleteFromRow va mutationCase_ = 4; return this; } + /** * * @@ -6571,6 +8738,7 @@ public Builder setDeleteFromRow( mutationCase_ = 4; return this; } + /** * * @@ -6603,6 +8771,7 @@ public Builder mergeDeleteFromRow(com.google.bigtable.v2.Mutation.DeleteFromRow mutationCase_ = 4; return this; } + /** * * @@ -6628,6 +8797,7 @@ public Builder clearDeleteFromRow() { } return this; } + /** * * @@ -6640,6 +8810,7 @@ public Builder clearDeleteFromRow() { public com.google.bigtable.v2.Mutation.DeleteFromRow.Builder getDeleteFromRowBuilder() { return getDeleteFromRowFieldBuilder().getBuilder(); } + /** * * @@ -6660,6 +8831,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromRowOrBuilder getDeleteFromRowOr return com.google.bigtable.v2.Mutation.DeleteFromRow.getDefaultInstance(); } } + /** * * 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 d05288d9a2..06f5186575 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface MutationOrBuilder @@ -36,6 +36,7 @@ public interface MutationOrBuilder * @return Whether the setCell field is set. */ boolean hasSetCell(); + /** * * @@ -48,6 +49,7 @@ public interface MutationOrBuilder * @return The setCell. */ com.google.bigtable.v2.Mutation.SetCell getSetCell(); + /** * * @@ -71,6 +73,7 @@ public interface MutationOrBuilder * @return Whether the addToCell field is set. */ boolean hasAddToCell(); + /** * * @@ -83,6 +86,7 @@ public interface MutationOrBuilder * @return The addToCell. */ com.google.bigtable.v2.Mutation.AddToCell getAddToCell(); + /** * * @@ -94,6 +98,43 @@ public interface MutationOrBuilder */ com.google.bigtable.v2.Mutation.AddToCellOrBuilder getAddToCellOrBuilder(); + /** + * + * + *
    +   * Merges accumulated state to an `Aggregate` cell.
    +   * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + * + * @return Whether the mergeToCell field is set. + */ + boolean hasMergeToCell(); + + /** + * + * + *
    +   * Merges accumulated state to an `Aggregate` cell.
    +   * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + * + * @return The mergeToCell. + */ + com.google.bigtable.v2.Mutation.MergeToCell getMergeToCell(); + + /** + * + * + *
    +   * Merges accumulated state to an `Aggregate` cell.
    +   * 
    + * + * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; + */ + com.google.bigtable.v2.Mutation.MergeToCellOrBuilder getMergeToCellOrBuilder(); + /** * * @@ -106,6 +147,7 @@ public interface MutationOrBuilder * @return Whether the deleteFromColumn field is set. */ boolean hasDeleteFromColumn(); + /** * * @@ -118,6 +160,7 @@ public interface MutationOrBuilder * @return The deleteFromColumn. */ com.google.bigtable.v2.Mutation.DeleteFromColumn getDeleteFromColumn(); + /** * * @@ -141,6 +184,7 @@ public interface MutationOrBuilder * @return Whether the deleteFromFamily field is set. */ boolean hasDeleteFromFamily(); + /** * * @@ -153,6 +197,7 @@ public interface MutationOrBuilder * @return The deleteFromFamily. */ com.google.bigtable.v2.Mutation.DeleteFromFamily getDeleteFromFamily(); + /** * * @@ -176,6 +221,7 @@ public interface MutationOrBuilder * @return Whether the deleteFromRow field is set. */ boolean hasDeleteFromRow(); + /** * * @@ -188,6 +234,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/PartialResultSet.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PartialResultSet.java new file mode 100644 index 0000000000..011becfafb --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PartialResultSet.java @@ -0,0 +1,1537 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +/** + * + * + *
    + * A partial result set from the streaming query API.
    + * 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 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.PartialResultSet) + PartialResultSetOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PartialResultSet.newBuilder() to construct. + private PartialResultSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_PartialResultSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.PartialResultSet.class, + com.google.bigtable.v2.PartialResultSet.Builder.class); + } + + private int bitField0_; + private int partialRowsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object partialRows_; + + public enum PartialRowsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PROTO_ROWS_BATCH(3), + PARTIALROWS_NOT_SET(0); + private final int value; + + 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. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PartialRowsCase valueOf(int value) { + return forNumber(value); + } + + public static PartialRowsCase forNumber(int value) { + switch (value) { + case 3: + return PROTO_ROWS_BATCH; + case 0: + return PARTIALROWS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PartialRowsCase getPartialRowsCase() { + return PartialRowsCase.forNumber(partialRowsCase_); + } + + public static final int PROTO_ROWS_BATCH_FIELD_NUMBER = 3; + + /** + * + * + *
    +   * Partial rows in serialized ProtoRows format.
    +   * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + * + * @return Whether the protoRowsBatch field is set. + */ + @java.lang.Override + public boolean hasProtoRowsBatch() { + return partialRowsCase_ == 3; + } + + /** + * + * + *
    +   * Partial rows in serialized ProtoRows format.
    +   * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + * + * @return The protoRowsBatch. + */ + @java.lang.Override + public com.google.bigtable.v2.ProtoRowsBatch getProtoRowsBatch() { + if (partialRowsCase_ == 3) { + return (com.google.bigtable.v2.ProtoRowsBatch) partialRows_; + } + return com.google.bigtable.v2.ProtoRowsBatch.getDefaultInstance(); + } + + /** + * + * + *
    +   * Partial rows in serialized ProtoRows format.
    +   * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + */ + @java.lang.Override + public com.google.bigtable.v2.ProtoRowsBatchOrBuilder getProtoRowsBatchOrBuilder() { + if (partialRowsCase_ == 3) { + return (com.google.bigtable.v2.ProtoRowsBatch) partialRows_; + } + 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
    +   * 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.
    +   *
    +   * 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
    +   * data in `partial_rows`, then return OK.
    +   * 
    + * + * bytes resume_token = 5; + * + * @return The resumeToken. + */ + @java.lang.Override + 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 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; + * + * @return The estimatedBatchSize. + */ + @java.lang.Override + public int getEstimatedBatchSize() { + return estimatedBatchSize_; + } + + 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 (partialRowsCase_ == 3) { + output.writeMessage(3, (com.google.bigtable.v2.ProtoRowsBatch) partialRows_); + } + if (estimatedBatchSize_ != 0) { + output.writeInt32(4, estimatedBatchSize_); + } + 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); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (partialRowsCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.bigtable.v2.ProtoRowsBatch) partialRows_); + } + if (estimatedBatchSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, estimatedBatchSize_); + } + 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; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.v2.PartialResultSet)) { + return super.equals(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_) { + case 3: + if (!getProtoRowsBatch().equals(other.getProtoRowsBatch())) 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 (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_) { + case 3: + hash = (37 * hash) + PROTO_ROWS_BATCH_FIELD_NUMBER; + hash = (53 * hash) + getProtoRowsBatch().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.PartialResultSet parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.PartialResultSet 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.PartialResultSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.PartialResultSet 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.PartialResultSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.PartialResultSet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.PartialResultSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.PartialResultSet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * A partial result set from the streaming query API.
    +   * 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 + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.PartialResultSet) + com.google.bigtable.v2.PartialResultSetOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_PartialResultSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.PartialResultSet.class, + com.google.bigtable.v2.PartialResultSet.Builder.class); + } + + // Construct using com.google.bigtable.v2.PartialResultSet.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (protoRowsBatchBuilder_ != null) { + protoRowsBatchBuilder_.clear(); + } + batchChecksum_ = 0; + resumeToken_ = com.google.protobuf.ByteString.EMPTY; + reset_ = false; + estimatedBatchSize_ = 0; + partialRowsCase_ = 0; + partialRows_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_PartialResultSet_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.PartialResultSet getDefaultInstanceForType() { + return com.google.bigtable.v2.PartialResultSet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.PartialResultSet build() { + com.google.bigtable.v2.PartialResultSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.PartialResultSet buildPartial() { + com.google.bigtable.v2.PartialResultSet result = + new com.google.bigtable.v2.PartialResultSet(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.PartialResultSet result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + 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) { + result.partialRowsCase_ = partialRowsCase_; + result.partialRows_ = this.partialRows_; + if (partialRowsCase_ == 3 && protoRowsBatchBuilder_ != null) { + result.partialRows_ = protoRowsBatchBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.PartialResultSet) { + return mergeFrom((com.google.bigtable.v2.PartialResultSet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.PartialResultSet other) { + if (other == com.google.bigtable.v2.PartialResultSet.getDefaultInstance()) return this; + if (other.hasBatchChecksum()) { + setBatchChecksum(other.getBatchChecksum()); + } + if (other.getResumeToken() != com.google.protobuf.ByteString.EMPTY) { + setResumeToken(other.getResumeToken()); + } + if (other.getReset() != false) { + setReset(other.getReset()); + } + if (other.getEstimatedBatchSize() != 0) { + setEstimatedBatchSize(other.getEstimatedBatchSize()); + } + switch (other.getPartialRowsCase()) { + case PROTO_ROWS_BATCH: + { + mergeProtoRowsBatch(other.getProtoRowsBatch()); + break; + } + case PARTIALROWS_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 26: + { + input.readMessage(getProtoRowsBatchFieldBuilder().getBuilder(), extensionRegistry); + partialRowsCase_ = 3; + break; + } // case 26 + case 32: + { + estimatedBatchSize_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 32 + case 42: + { + resumeToken_ = input.readBytes(); + 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)) { + 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 partialRowsCase_ = 0; + private java.lang.Object partialRows_; + + public PartialRowsCase getPartialRowsCase() { + return PartialRowsCase.forNumber(partialRowsCase_); + } + + public Builder clearPartialRows() { + partialRowsCase_ = 0; + partialRows_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ProtoRowsBatch, + com.google.bigtable.v2.ProtoRowsBatch.Builder, + com.google.bigtable.v2.ProtoRowsBatchOrBuilder> + protoRowsBatchBuilder_; + + /** + * + * + *
    +     * Partial rows in serialized ProtoRows format.
    +     * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + * + * @return Whether the protoRowsBatch field is set. + */ + @java.lang.Override + public boolean hasProtoRowsBatch() { + return partialRowsCase_ == 3; + } + + /** + * + * + *
    +     * Partial rows in serialized ProtoRows format.
    +     * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + * + * @return The protoRowsBatch. + */ + @java.lang.Override + public com.google.bigtable.v2.ProtoRowsBatch getProtoRowsBatch() { + if (protoRowsBatchBuilder_ == null) { + if (partialRowsCase_ == 3) { + return (com.google.bigtable.v2.ProtoRowsBatch) partialRows_; + } + return com.google.bigtable.v2.ProtoRowsBatch.getDefaultInstance(); + } else { + if (partialRowsCase_ == 3) { + return protoRowsBatchBuilder_.getMessage(); + } + return com.google.bigtable.v2.ProtoRowsBatch.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Partial rows in serialized ProtoRows format.
    +     * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + */ + public Builder setProtoRowsBatch(com.google.bigtable.v2.ProtoRowsBatch value) { + if (protoRowsBatchBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partialRows_ = value; + onChanged(); + } else { + protoRowsBatchBuilder_.setMessage(value); + } + partialRowsCase_ = 3; + return this; + } + + /** + * + * + *
    +     * Partial rows in serialized ProtoRows format.
    +     * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + */ + public Builder setProtoRowsBatch( + com.google.bigtable.v2.ProtoRowsBatch.Builder builderForValue) { + if (protoRowsBatchBuilder_ == null) { + partialRows_ = builderForValue.build(); + onChanged(); + } else { + protoRowsBatchBuilder_.setMessage(builderForValue.build()); + } + partialRowsCase_ = 3; + return this; + } + + /** + * + * + *
    +     * Partial rows in serialized ProtoRows format.
    +     * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + */ + public Builder mergeProtoRowsBatch(com.google.bigtable.v2.ProtoRowsBatch value) { + if (protoRowsBatchBuilder_ == null) { + if (partialRowsCase_ == 3 + && partialRows_ != com.google.bigtable.v2.ProtoRowsBatch.getDefaultInstance()) { + partialRows_ = + com.google.bigtable.v2.ProtoRowsBatch.newBuilder( + (com.google.bigtable.v2.ProtoRowsBatch) partialRows_) + .mergeFrom(value) + .buildPartial(); + } else { + partialRows_ = value; + } + onChanged(); + } else { + if (partialRowsCase_ == 3) { + protoRowsBatchBuilder_.mergeFrom(value); + } else { + protoRowsBatchBuilder_.setMessage(value); + } + } + partialRowsCase_ = 3; + return this; + } + + /** + * + * + *
    +     * Partial rows in serialized ProtoRows format.
    +     * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + */ + public Builder clearProtoRowsBatch() { + if (protoRowsBatchBuilder_ == null) { + if (partialRowsCase_ == 3) { + partialRowsCase_ = 0; + partialRows_ = null; + onChanged(); + } + } else { + if (partialRowsCase_ == 3) { + partialRowsCase_ = 0; + partialRows_ = null; + } + protoRowsBatchBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Partial rows in serialized ProtoRows format.
    +     * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + */ + public com.google.bigtable.v2.ProtoRowsBatch.Builder getProtoRowsBatchBuilder() { + return getProtoRowsBatchFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Partial rows in serialized ProtoRows format.
    +     * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + */ + @java.lang.Override + public com.google.bigtable.v2.ProtoRowsBatchOrBuilder getProtoRowsBatchOrBuilder() { + if ((partialRowsCase_ == 3) && (protoRowsBatchBuilder_ != null)) { + return protoRowsBatchBuilder_.getMessageOrBuilder(); + } else { + if (partialRowsCase_ == 3) { + return (com.google.bigtable.v2.ProtoRowsBatch) partialRows_; + } + return com.google.bigtable.v2.ProtoRowsBatch.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Partial rows in serialized ProtoRows format.
    +     * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ProtoRowsBatch, + com.google.bigtable.v2.ProtoRowsBatch.Builder, + com.google.bigtable.v2.ProtoRowsBatchOrBuilder> + getProtoRowsBatchFieldBuilder() { + if (protoRowsBatchBuilder_ == null) { + if (!(partialRowsCase_ == 3)) { + partialRows_ = com.google.bigtable.v2.ProtoRowsBatch.getDefaultInstance(); + } + protoRowsBatchBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ProtoRowsBatch, + com.google.bigtable.v2.ProtoRowsBatch.Builder, + com.google.bigtable.v2.ProtoRowsBatchOrBuilder>( + (com.google.bigtable.v2.ProtoRowsBatch) partialRows_, + getParentForChildren(), + isClean()); + partialRows_ = null; + } + partialRowsCase_ = 3; + onChanged(); + 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
    +     * 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.
    +     *
    +     * 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
    +     * data in `partial_rows`, then return OK.
    +     * 
    + * + * bytes resume_token = 5; + * + * @return The resumeToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResumeToken() { + return resumeToken_; + } + + /** + * + * + *
    +     * An opaque token sent by the server to allow query resumption and signal
    +     * 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.
    +     *
    +     * 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
    +     * data in `partial_rows`, then return OK.
    +     * 
    + * + * bytes resume_token = 5; + * + * @param value The resumeToken to set. + * @return This builder for chaining. + */ + public Builder setResumeToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + resumeToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * An opaque token sent by the server to allow query resumption and signal
    +     * 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.
    +     *
    +     * 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
    +     * data in `partial_rows`, then return OK.
    +     * 
    + * + * bytes resume_token = 5; + * + * @return This builder for chaining. + */ + public Builder clearResumeToken() { + 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 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; + * + * @return The estimatedBatchSize. + */ + @java.lang.Override + public int getEstimatedBatchSize() { + return estimatedBatchSize_; + } + + /** + * + * + *
    +     * 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; + * + * @param value The estimatedBatchSize to set. + * @return This builder for chaining. + */ + public Builder setEstimatedBatchSize(int value) { + + estimatedBatchSize_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +     * 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; + * + * @return This builder for chaining. + */ + public Builder clearEstimatedBatchSize() { + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.PartialResultSet) + private static final com.google.bigtable.v2.PartialResultSet DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.PartialResultSet(); + } + + public static com.google.bigtable.v2.PartialResultSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartialResultSet 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.PartialResultSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} 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 new file mode 100644 index 0000000000..29c993b0d2 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PartialResultSetOrBuilder.java @@ -0,0 +1,190 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +public interface PartialResultSetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.PartialResultSet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Partial rows in serialized ProtoRows format.
    +   * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + * + * @return Whether the protoRowsBatch field is set. + */ + boolean hasProtoRowsBatch(); + + /** + * + * + *
    +   * Partial rows in serialized ProtoRows format.
    +   * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + * + * @return The protoRowsBatch. + */ + com.google.bigtable.v2.ProtoRowsBatch getProtoRowsBatch(); + + /** + * + * + *
    +   * Partial rows in serialized ProtoRows format.
    +   * 
    + * + * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; + */ + 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
    +   * 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.
    +   *
    +   * 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
    +   * data in `partial_rows`, then return OK.
    +   * 
    + * + * bytes resume_token = 5; + * + * @return The resumeToken. + */ + com.google.protobuf.ByteString getResumeToken(); + + /** + * + * + *
    +   * 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; + * + * @return The estimatedBatchSize. + */ + int getEstimatedBatchSize(); + + com.google.bigtable.v2.PartialResultSet.PartialRowsCase getPartialRowsCase(); +} 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..9742931479 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class PingAndWarmRequest extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.bigtable.v2.PingAndWarmRequest) PingAndWarmRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use PingAndWarmRequest.newBuilder() to construct. private PingAndWarmRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +97,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -127,6 +130,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -151,6 +155,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -344,6 +349,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -542,6 +548,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -568,6 +575,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -594,6 +602,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -619,6 +628,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -640,6 +650,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -668,6 +679,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object appProfileId_ = ""; + /** * * @@ -691,6 +703,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -714,6 +727,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -736,6 +750,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -754,6 +769,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * 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..3c66353bcb 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface PingAndWarmRequestOrBuilder @@ -40,6 +40,7 @@ public interface PingAndWarmRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -70,6 +71,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..3308300d0c 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class PingAndWarmResponse extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.bigtable.v2.PingAndWarmResponse) PingAndWarmResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use PingAndWarmResponse.newBuilder() to construct. private PingAndWarmResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -211,6 +212,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * 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..83166bec56 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface PingAndWarmResponseOrBuilder 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..e1ed604efd --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryRequest.java @@ -0,0 +1,2018 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +/** + * + * + *
    + * Request message for Bigtable.PrepareQuery
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.PrepareQueryRequest} + */ +public final class PrepareQueryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.PrepareQueryRequest) + PrepareQueryRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PrepareQueryRequest.newBuilder() to construct. + private PrepareQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PrepareQueryRequest() { + instanceName_ = ""; + appProfileId_ = ""; + query_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PrepareQueryRequest(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(instanceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appProfileId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, query_); + } + if (dataFormatCase_ == 4) { + output.writeMessage(4, (com.google.bigtable.v2.ProtoFormat) dataFormat_); + } + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(instanceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appProfileId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.bigtable.v2.PrepareQueryRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getProtoFormatFieldBuilder().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.SingleFieldBuilderV3< + 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 getProtoFormatFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.v2.ProtoFormat, + com.google.bigtable.v2.ProtoFormat.Builder, + com.google.bigtable.v2.ProtoFormatOrBuilder> + getProtoFormatFieldBuilder() { + if (protoFormatBuilder_ == null) { + if (!(dataFormatCase_ == 4)) { + dataFormat_ = com.google.bigtable.v2.ProtoFormat.getDefaultInstance(); + } + protoFormatBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..0046ebd014 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryRequestOrBuilder.java @@ -0,0 +1,280 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +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..dbf9048f97 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryResponse.java @@ -0,0 +1,1151 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +/** + * + * + *
    + * Response message for Bigtable.PrepareQueryResponse
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.PrepareQueryResponse} + */ +public final class PrepareQueryResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.PrepareQueryResponse) + PrepareQueryResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PrepareQueryResponse.newBuilder() to construct. + private PrepareQueryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PrepareQueryResponse() { + preparedQuery_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PrepareQueryResponse(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.bigtable.v2.PrepareQueryResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMetadataFieldBuilder(); + getValidUntilFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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() != com.google.protobuf.ByteString.EMPTY) { + 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(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + preparedQuery_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getValidUntilFieldBuilder().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.SingleFieldBuilderV3< + 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 getMetadataFieldBuilder().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.SingleFieldBuilderV3< + com.google.bigtable.v2.ResultSetMetadata, + com.google.bigtable.v2.ResultSetMetadata.Builder, + com.google.bigtable.v2.ResultSetMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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.SingleFieldBuilderV3< + 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 getValidUntilFieldBuilder().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.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getValidUntilFieldBuilder() { + if (validUntilBuilder_ == null) { + validUntilBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getValidUntil(), getParentForChildren(), isClean()); + validUntil_ = null; + } + return validUntilBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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..cb02e22e4d --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryResponseOrBuilder.java @@ -0,0 +1,123 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +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 new file mode 100644 index 0000000000..943866e3ec --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoFormat.java @@ -0,0 +1,432 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +/** + * + * + *
    + * Protocol buffers format descriptor, as described by Messages ProtoSchema and
    + * ProtoRows
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.ProtoFormat} + */ +public final class ProtoFormat extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ProtoFormat) + ProtoFormatOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ProtoFormat.newBuilder() to construct. + private ProtoFormat(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ProtoFormat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ProtoFormat.class, + com.google.bigtable.v2.ProtoFormat.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.ProtoFormat)) { + return super.equals(obj); + } + com.google.bigtable.v2.ProtoFormat other = (com.google.bigtable.v2.ProtoFormat) 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.ProtoFormat parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ProtoFormat 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.ProtoFormat parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ProtoFormat 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.ProtoFormat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ProtoFormat parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ProtoFormat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.ProtoFormat 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; + } + + /** + * + * + *
    +   * Protocol buffers format descriptor, as described by Messages ProtoSchema and
    +   * ProtoRows
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.ProtoFormat} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ProtoFormat) + com.google.bigtable.v2.ProtoFormatOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ProtoFormat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ProtoFormat.class, + com.google.bigtable.v2.ProtoFormat.Builder.class); + } + + // Construct using com.google.bigtable.v2.ProtoFormat.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.DataProto + .internal_static_google_bigtable_v2_ProtoFormat_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.ProtoFormat getDefaultInstanceForType() { + return com.google.bigtable.v2.ProtoFormat.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.ProtoFormat build() { + com.google.bigtable.v2.ProtoFormat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.ProtoFormat buildPartial() { + com.google.bigtable.v2.ProtoFormat result = new com.google.bigtable.v2.ProtoFormat(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.ProtoFormat) { + return mergeFrom((com.google.bigtable.v2.ProtoFormat) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.ProtoFormat other) { + if (other == com.google.bigtable.v2.ProtoFormat.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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ProtoFormat) + private static final com.google.bigtable.v2.ProtoFormat DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.ProtoFormat(); + } + + public static com.google.bigtable.v2.ProtoFormat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProtoFormat 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.ProtoFormat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} 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 new file mode 100644 index 0000000000..6d8229365f --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoFormatOrBuilder.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +public interface ProtoFormatOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ProtoFormat) + com.google.protobuf.MessageOrBuilder {} 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 new file mode 100644 index 0000000000..bdf6b47b4e --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRows.java @@ -0,0 +1,1000 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +/** + * + * + *
    + * Rows represented in proto format.
    + *
    + * This should be constructed by concatenating the `batch_data` from each
    + * of the relevant `ProtoRowsBatch` messages and parsing the result as a
    + * `ProtoRows` message.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.ProtoRows} + */ +public final class ProtoRows extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ProtoRows) + ProtoRowsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ProtoRows.newBuilder() to construct. + private ProtoRows(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ProtoRows_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ProtoRows.class, com.google.bigtable.v2.ProtoRows.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List values_; + + /** + * + * + *
    +   * A proto rows message consists of a list of values. Every N complete values
    +   * defines a row, where N is equal to the  number of entries in the
    +   * `metadata.proto_schema.columns` value received in the first response.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + + /** + * + * + *
    +   * A proto rows message consists of a list of values. Every N complete values
    +   * defines a row, where N is equal to the  number of entries in the
    +   * `metadata.proto_schema.columns` value received in the first response.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + @java.lang.Override + public java.util.List getValuesOrBuilderList() { + return values_; + } + + /** + * + * + *
    +   * A proto rows message consists of a list of values. Every N complete values
    +   * defines a row, where N is equal to the  number of entries in the
    +   * `metadata.proto_schema.columns` value received in the first response.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + @java.lang.Override + public int getValuesCount() { + return values_.size(); + } + + /** + * + * + *
    +   * A proto rows message consists of a list of values. Every N complete values
    +   * defines a row, where N is equal to the  number of entries in the
    +   * `metadata.proto_schema.columns` value received in the first response.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.Value getValues(int index) { + return values_.get(index); + } + + /** + * + * + *
    +   * A proto rows message consists of a list of values. Every N complete values
    +   * defines a row, where N is equal to the  number of entries in the
    +   * `metadata.proto_schema.columns` value received in the first response.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.ValueOrBuilder getValuesOrBuilder(int index) { + return values_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(2, values_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, values_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.v2.ProtoRows)) { + return super.equals(obj); + } + com.google.bigtable.v2.ProtoRows other = (com.google.bigtable.v2.ProtoRows) obj; + + if (!getValuesList().equals(other.getValuesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.ProtoRows parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ProtoRows 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.ProtoRows parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ProtoRows 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.ProtoRows parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ProtoRows parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ProtoRows parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.ProtoRows 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; + } + + /** + * + * + *
    +   * Rows represented in proto format.
    +   *
    +   * This should be constructed by concatenating the `batch_data` from each
    +   * of the relevant `ProtoRowsBatch` messages and parsing the result as a
    +   * `ProtoRows` message.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.ProtoRows} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ProtoRows) + com.google.bigtable.v2.ProtoRowsOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ProtoRows_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ProtoRows.class, + com.google.bigtable.v2.ProtoRows.Builder.class); + } + + // Construct using com.google.bigtable.v2.ProtoRows.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + } else { + values_ = null; + valuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ProtoRows_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.ProtoRows getDefaultInstanceForType() { + return com.google.bigtable.v2.ProtoRows.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.ProtoRows build() { + com.google.bigtable.v2.ProtoRows result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.ProtoRows buildPartial() { + com.google.bigtable.v2.ProtoRows result = new com.google.bigtable.v2.ProtoRows(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.bigtable.v2.ProtoRows result) { + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + } + + 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) { + return mergeFrom((com.google.bigtable.v2.ProtoRows) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.ProtoRows other) { + if (other == com.google.bigtable.v2.ProtoRows.getDefaultInstance()) return this; + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValuesFieldBuilder() + : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.bigtable.v2.Value m = + input.readMessage(com.google.bigtable.v2.Value.parser(), extensionRegistry); + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(m); + } else { + valuesBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List values_ = + java.util.Collections.emptyList(); + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder> + valuesBuilder_; + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public com.google.bigtable.v2.Value getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public Builder setValues(int index, com.google.bigtable.v2.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public Builder setValues(int index, com.google.bigtable.v2.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public Builder addValues(com.google.bigtable.v2.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public Builder addValues(int index, com.google.bigtable.v2.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public Builder addValues(com.google.bigtable.v2.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public Builder addValues(int index, com.google.bigtable.v2.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public Builder addAllValues(java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public com.google.bigtable.v2.Value.Builder getValuesBuilder(int index) { + return getValuesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public com.google.bigtable.v2.ValueOrBuilder getValuesOrBuilder(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public com.google.bigtable.v2.Value.Builder addValuesBuilder() { + return getValuesFieldBuilder().addBuilder(com.google.bigtable.v2.Value.getDefaultInstance()); + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public com.google.bigtable.v2.Value.Builder addValuesBuilder(int index) { + return getValuesFieldBuilder() + .addBuilder(index, com.google.bigtable.v2.Value.getDefaultInstance()); + } + + /** + * + * + *
    +     * A proto rows message consists of a list of values. Every N complete values
    +     * defines a row, where N is equal to the  number of entries in the
    +     * `metadata.proto_schema.columns` value received in the first response.
    +     * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + public java.util.List getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.bigtable.v2.Value, + com.google.bigtable.v2.Value.Builder, + com.google.bigtable.v2.ValueOrBuilder>( + values_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + values_ = null; + } + return valuesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ProtoRows) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ProtoRows) + private static final com.google.bigtable.v2.ProtoRows DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.ProtoRows(); + } + + public static com.google.bigtable.v2.ProtoRows getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProtoRows 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.ProtoRows getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} 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 new file mode 100644 index 0000000000..140a359e7f --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsBatch.java @@ -0,0 +1,558 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +/** + * + * + *
    + * A part of a serialized `ProtoRows` message.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.ProtoRowsBatch} + */ +public final class ProtoRowsBatch extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ProtoRowsBatch) + ProtoRowsBatchOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ProtoRowsBatch.newBuilder() to construct. + private ProtoRowsBatch(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ProtoRowsBatch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ProtoRowsBatch.class, + com.google.bigtable.v2.ProtoRowsBatch.Builder.class); + } + + public static final int BATCH_DATA_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString batchData_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +   * 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; + * + * @return The batchData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBatchData() { + return batchData_; + } + + 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 (!batchData_.isEmpty()) { + output.writeBytes(1, batchData_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!batchData_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, batchData_); + } + 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.ProtoRowsBatch)) { + return super.equals(obj); + } + com.google.bigtable.v2.ProtoRowsBatch other = (com.google.bigtable.v2.ProtoRowsBatch) obj; + + if (!getBatchData().equals(other.getBatchData())) 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) + BATCH_DATA_FIELD_NUMBER; + hash = (53 * hash) + getBatchData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.ProtoRowsBatch parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ProtoRowsBatch 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.ProtoRowsBatch parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ProtoRowsBatch 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.ProtoRowsBatch parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ProtoRowsBatch parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ProtoRowsBatch parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.ProtoRowsBatch prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * A part of a serialized `ProtoRows` message.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.ProtoRowsBatch} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ProtoRowsBatch) + com.google.bigtable.v2.ProtoRowsBatchOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ProtoRowsBatch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ProtoRowsBatch.class, + com.google.bigtable.v2.ProtoRowsBatch.Builder.class); + } + + // Construct using com.google.bigtable.v2.ProtoRowsBatch.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + batchData_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ProtoRowsBatch_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.ProtoRowsBatch getDefaultInstanceForType() { + return com.google.bigtable.v2.ProtoRowsBatch.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.ProtoRowsBatch build() { + com.google.bigtable.v2.ProtoRowsBatch result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.ProtoRowsBatch buildPartial() { + com.google.bigtable.v2.ProtoRowsBatch result = + new com.google.bigtable.v2.ProtoRowsBatch(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.ProtoRowsBatch result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.batchData_ = batchData_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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) { + return mergeFrom((com.google.bigtable.v2.ProtoRowsBatch) other); + } else { + super.mergeFrom(other); + return this; + } + } + + 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) { + setBatchData(other.getBatchData()); + } + 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: + { + batchData_ = 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 batchData_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +     * 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; + * + * @return The batchData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBatchData() { + return batchData_; + } + + /** + * + * + *
    +     * 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; + * + * @param value The batchData to set. + * @return This builder for chaining. + */ + public Builder setBatchData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + batchData_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * 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; + * + * @return This builder for chaining. + */ + public Builder clearBatchData() { + bitField0_ = (bitField0_ & ~0x00000001); + batchData_ = getDefaultInstance().getBatchData(); + 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.ProtoRowsBatch) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ProtoRowsBatch) + private static final com.google.bigtable.v2.ProtoRowsBatch DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.ProtoRowsBatch(); + } + + public static com.google.bigtable.v2.ProtoRowsBatch getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProtoRowsBatch 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.ProtoRowsBatch getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} 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 new file mode 100644 index 0000000000..e4c5a4e4c5 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsBatchOrBuilder.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +public interface ProtoRowsBatchOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ProtoRowsBatch) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * 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; + * + * @return The batchData. + */ + com.google.protobuf.ByteString getBatchData(); +} 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 new file mode 100644 index 0000000000..d1aa39421b --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsOrBuilder.java @@ -0,0 +1,91 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +public interface ProtoRowsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ProtoRows) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * A proto rows message consists of a list of values. Every N complete values
    +   * defines a row, where N is equal to the  number of entries in the
    +   * `metadata.proto_schema.columns` value received in the first response.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + java.util.List getValuesList(); + + /** + * + * + *
    +   * A proto rows message consists of a list of values. Every N complete values
    +   * defines a row, where N is equal to the  number of entries in the
    +   * `metadata.proto_schema.columns` value received in the first response.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + com.google.bigtable.v2.Value getValues(int index); + + /** + * + * + *
    +   * A proto rows message consists of a list of values. Every N complete values
    +   * defines a row, where N is equal to the  number of entries in the
    +   * `metadata.proto_schema.columns` value received in the first response.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + int getValuesCount(); + + /** + * + * + *
    +   * A proto rows message consists of a list of values. Every N complete values
    +   * defines a row, where N is equal to the  number of entries in the
    +   * `metadata.proto_schema.columns` value received in the first response.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + java.util.List getValuesOrBuilderList(); + + /** + * + * + *
    +   * A proto rows message consists of a list of values. Every N complete values
    +   * defines a row, where N is equal to the  number of entries in the
    +   * `metadata.proto_schema.columns` value received in the first response.
    +   * 
    + * + * repeated .google.bigtable.v2.Value values = 2; + */ + com.google.bigtable.v2.ValueOrBuilder getValuesOrBuilder(int index); +} 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 new file mode 100644 index 0000000000..6702dd7a8b --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoSchema.java @@ -0,0 +1,954 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +/** + * + * + *
    + * ResultSet schema in proto format
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.ProtoSchema} + */ +public final class ProtoSchema extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ProtoSchema) + ProtoSchemaOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ProtoSchema.newBuilder() to construct. + private ProtoSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ProtoSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ProtoSchema.class, + com.google.bigtable.v2.ProtoSchema.Builder.class); + } + + public static final int COLUMNS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List columns_; + + /** + * + * + *
    +   * The columns in the result set.
    +   * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + @java.lang.Override + public java.util.List getColumnsList() { + return columns_; + } + + /** + * + * + *
    +   * The columns in the result set.
    +   * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + @java.lang.Override + public java.util.List + getColumnsOrBuilderList() { + return columns_; + } + + /** + * + * + *
    +   * The columns in the result set.
    +   * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + @java.lang.Override + public int getColumnsCount() { + return columns_.size(); + } + + /** + * + * + *
    +   * The columns in the result set.
    +   * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.ColumnMetadata getColumns(int index) { + return columns_.get(index); + } + + /** + * + * + *
    +   * The columns in the result set.
    +   * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.ColumnMetadataOrBuilder getColumnsOrBuilder(int index) { + return columns_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < columns_.size(); i++) { + output.writeMessage(1, columns_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < columns_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, columns_.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.ProtoSchema)) { + return super.equals(obj); + } + com.google.bigtable.v2.ProtoSchema other = (com.google.bigtable.v2.ProtoSchema) obj; + + if (!getColumnsList().equals(other.getColumnsList())) 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 (getColumnsCount() > 0) { + hash = (37 * hash) + COLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getColumnsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.ProtoSchema parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.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.v2.ProtoSchema parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.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.v2.ProtoSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.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.v2.ProtoSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * ResultSet schema in proto format
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.ProtoSchema} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ProtoSchema) + com.google.bigtable.v2.ProtoSchemaOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ProtoSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ProtoSchema.class, + com.google.bigtable.v2.ProtoSchema.Builder.class); + } + + // Construct using com.google.bigtable.v2.ProtoSchema.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (columnsBuilder_ == null) { + columns_ = java.util.Collections.emptyList(); + } else { + columns_ = null; + columnsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ProtoSchema_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.ProtoSchema getDefaultInstanceForType() { + return com.google.bigtable.v2.ProtoSchema.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.ProtoSchema build() { + com.google.bigtable.v2.ProtoSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.ProtoSchema buildPartial() { + com.google.bigtable.v2.ProtoSchema result = new com.google.bigtable.v2.ProtoSchema(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.bigtable.v2.ProtoSchema result) { + if (columnsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + columns_ = java.util.Collections.unmodifiableList(columns_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.columns_ = columns_; + } else { + result.columns_ = columnsBuilder_.build(); + } + } + + 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) { + return mergeFrom((com.google.bigtable.v2.ProtoSchema) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.ProtoSchema other) { + if (other == com.google.bigtable.v2.ProtoSchema.getDefaultInstance()) return this; + if (columnsBuilder_ == null) { + if (!other.columns_.isEmpty()) { + if (columns_.isEmpty()) { + columns_ = other.columns_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureColumnsIsMutable(); + columns_.addAll(other.columns_); + } + onChanged(); + } + } else { + if (!other.columns_.isEmpty()) { + if (columnsBuilder_.isEmpty()) { + columnsBuilder_.dispose(); + columnsBuilder_ = null; + columns_ = other.columns_; + bitField0_ = (bitField0_ & ~0x00000001); + columnsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getColumnsFieldBuilder() + : null; + } else { + columnsBuilder_.addAllMessages(other.columns_); + } + } + } + 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.ColumnMetadata m = + input.readMessage( + com.google.bigtable.v2.ColumnMetadata.parser(), extensionRegistry); + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(m); + } else { + columnsBuilder_.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 columns_ = + java.util.Collections.emptyList(); + + private void ensureColumnsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + columns_ = new java.util.ArrayList(columns_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.bigtable.v2.ColumnMetadata, + com.google.bigtable.v2.ColumnMetadata.Builder, + com.google.bigtable.v2.ColumnMetadataOrBuilder> + columnsBuilder_; + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public java.util.List getColumnsList() { + if (columnsBuilder_ == null) { + return java.util.Collections.unmodifiableList(columns_); + } else { + return columnsBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public int getColumnsCount() { + if (columnsBuilder_ == null) { + return columns_.size(); + } else { + return columnsBuilder_.getCount(); + } + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public com.google.bigtable.v2.ColumnMetadata getColumns(int index) { + if (columnsBuilder_ == null) { + return columns_.get(index); + } else { + return columnsBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public Builder setColumns(int index, com.google.bigtable.v2.ColumnMetadata value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.set(index, value); + onChanged(); + } else { + columnsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public Builder setColumns( + int index, com.google.bigtable.v2.ColumnMetadata.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.set(index, builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public Builder addColumns(com.google.bigtable.v2.ColumnMetadata value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.add(value); + onChanged(); + } else { + columnsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public Builder addColumns(int index, com.google.bigtable.v2.ColumnMetadata value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.add(index, value); + onChanged(); + } else { + columnsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public Builder addColumns(com.google.bigtable.v2.ColumnMetadata.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public Builder addColumns( + int index, com.google.bigtable.v2.ColumnMetadata.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(index, builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public Builder addAllColumns( + java.lang.Iterable values) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, columns_); + onChanged(); + } else { + columnsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public Builder clearColumns() { + if (columnsBuilder_ == null) { + columns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + columnsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public Builder removeColumns(int index) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.remove(index); + onChanged(); + } else { + columnsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public com.google.bigtable.v2.ColumnMetadata.Builder getColumnsBuilder(int index) { + return getColumnsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public com.google.bigtable.v2.ColumnMetadataOrBuilder getColumnsOrBuilder(int index) { + if (columnsBuilder_ == null) { + return columns_.get(index); + } else { + return columnsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public java.util.List + getColumnsOrBuilderList() { + if (columnsBuilder_ != null) { + return columnsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(columns_); + } + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public com.google.bigtable.v2.ColumnMetadata.Builder addColumnsBuilder() { + return getColumnsFieldBuilder() + .addBuilder(com.google.bigtable.v2.ColumnMetadata.getDefaultInstance()); + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public com.google.bigtable.v2.ColumnMetadata.Builder addColumnsBuilder(int index) { + return getColumnsFieldBuilder() + .addBuilder(index, com.google.bigtable.v2.ColumnMetadata.getDefaultInstance()); + } + + /** + * + * + *
    +     * The columns in the result set.
    +     * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + public java.util.List getColumnsBuilderList() { + return getColumnsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.bigtable.v2.ColumnMetadata, + com.google.bigtable.v2.ColumnMetadata.Builder, + com.google.bigtable.v2.ColumnMetadataOrBuilder> + getColumnsFieldBuilder() { + if (columnsBuilder_ == null) { + columnsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.bigtable.v2.ColumnMetadata, + com.google.bigtable.v2.ColumnMetadata.Builder, + com.google.bigtable.v2.ColumnMetadataOrBuilder>( + columns_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + columns_ = null; + } + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ProtoSchema) + private static final com.google.bigtable.v2.ProtoSchema DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.ProtoSchema(); + } + + public static com.google.bigtable.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.v2.ProtoSchema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} 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 new file mode 100644 index 0000000000..8dbf5c7cbd --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoSchemaOrBuilder.java @@ -0,0 +1,82 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +public interface ProtoSchemaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ProtoSchema) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The columns in the result set.
    +   * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + java.util.List getColumnsList(); + + /** + * + * + *
    +   * The columns in the result set.
    +   * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + com.google.bigtable.v2.ColumnMetadata getColumns(int index); + + /** + * + * + *
    +   * The columns in the result set.
    +   * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + int getColumnsCount(); + + /** + * + * + *
    +   * The columns in the result set.
    +   * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + java.util.List + getColumnsOrBuilderList(); + + /** + * + * + *
    +   * The columns in the result set.
    +   * 
    + * + * repeated .google.bigtable.v2.ColumnMetadata columns = 1; + */ + com.google.bigtable.v2.ColumnMetadataOrBuilder getColumnsOrBuilder(int index); +} 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..b5a85f378b 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class RateLimitInfo extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.RateLimitInfo) RateLimitInfoOrBuilder { private static final long serialVersionUID = 0L; + // Use RateLimitInfo.newBuilder() to construct. private RateLimitInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,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 +86,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasPeriod() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -104,6 +107,7 @@ public boolean hasPeriod() { public com.google.protobuf.Duration getPeriod() { return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_; } + /** * * @@ -125,6 +129,7 @@ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() { public static final int FACTOR_FIELD_NUMBER = 2; private double factor_ = 0D; + /** * * @@ -135,7 +140,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. * @@ -323,6 +328,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -537,6 +543,7 @@ public Builder mergeFrom( com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> periodBuilder_; + /** * * @@ -556,6 +563,7 @@ public Builder mergeFrom( public boolean hasPeriod() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -579,6 +587,7 @@ public com.google.protobuf.Duration getPeriod() { return periodBuilder_.getMessage(); } } + /** * * @@ -606,6 +615,7 @@ public Builder setPeriod(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -630,6 +640,7 @@ public Builder setPeriod(com.google.protobuf.Duration.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -662,6 +673,7 @@ public Builder mergePeriod(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -686,6 +698,7 @@ public Builder clearPeriod() { onChanged(); return this; } + /** * * @@ -705,6 +718,7 @@ public com.google.protobuf.Duration.Builder getPeriodBuilder() { onChanged(); return getPeriodFieldBuilder().getBuilder(); } + /** * * @@ -726,6 +740,7 @@ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() { return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_; } } + /** * * @@ -758,6 +773,7 @@ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() { } private double factor_; + /** * * @@ -768,7 +784,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 +797,7 @@ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() { public double getFactor() { return factor_; } + /** * * @@ -791,7 +808,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 +825,7 @@ public Builder setFactor(double value) { onChanged(); return this; } + /** * * @@ -818,7 +836,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. * 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..643a28339f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface RateLimitInfoOrBuilder @@ -41,6 +41,7 @@ public interface RateLimitInfoOrBuilder * @return Whether the period field is set. */ boolean hasPeriod(); + /** * * @@ -58,6 +59,7 @@ public interface RateLimitInfoOrBuilder * @return The period. */ com.google.protobuf.Duration getPeriod(); + /** * * @@ -84,7 +86,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..0ef80fe5ed 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -34,6 +34,7 @@ public final class ReadChangeStreamRequest extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamRequest) ReadChangeStreamRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ReadChangeStreamRequest.newBuilder() to construct. private ReadChangeStreamRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -83,6 +84,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 +121,7 @@ public StartFromCase getStartFromCase() { @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -147,6 +150,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -180,6 +184,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -205,6 +210,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -233,6 +239,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public static final int PARTITION_FIELD_NUMBER = 3; private com.google.bigtable.v2.StreamPartition partition_; + /** * * @@ -248,6 +255,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public boolean hasPartition() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -265,6 +273,7 @@ public com.google.bigtable.v2.StreamPartition getPartition() { ? com.google.bigtable.v2.StreamPartition.getDefaultInstance() : partition_; } + /** * * @@ -282,6 +291,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { } public static final int START_TIME_FIELD_NUMBER = 4; + /** * * @@ -300,6 +310,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { public boolean hasStartTime() { return startFromCase_ == 4; } + /** * * @@ -321,6 +332,7 @@ public com.google.protobuf.Timestamp getStartTime() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -342,6 +354,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { } public static final int CONTINUATION_TOKENS_FIELD_NUMBER = 6; + /** * * @@ -351,10 +364,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 +379,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasContinuationTokens() { return startFromCase_ == 6; } + /** * * @@ -375,10 +389,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 +407,7 @@ public com.google.bigtable.v2.StreamContinuationTokens getContinuationTokens() { } return com.google.bigtable.v2.StreamContinuationTokens.getDefaultInstance(); } + /** * * @@ -402,10 +417,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 +436,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 +454,7 @@ public com.google.bigtable.v2.StreamContinuationTokensOrBuilder getContinuationT public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -455,6 +472,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -473,6 +491,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public static final int HEARTBEAT_DURATION_FIELD_NUMBER = 7; private com.google.protobuf.Duration heartbeatDuration_; + /** * * @@ -489,6 +508,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public boolean hasHeartbeatDuration() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -507,6 +527,7 @@ public com.google.protobuf.Duration getHeartbeatDuration() { ? com.google.protobuf.Duration.getDefaultInstance() : heartbeatDuration_; } + /** * * @@ -773,6 +794,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -1106,6 +1128,7 @@ public Builder clearStartFrom() { private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -1133,6 +1156,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -1160,6 +1184,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1186,6 +1211,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1208,6 +1234,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -1237,6 +1264,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object appProfileId_ = ""; + /** * * @@ -1261,6 +1289,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -1285,6 +1314,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1308,6 +1338,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1327,6 +1358,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -1358,6 +1390,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder> partitionBuilder_; + /** * * @@ -1372,6 +1405,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { public boolean hasPartition() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1392,6 +1426,7 @@ public com.google.bigtable.v2.StreamPartition getPartition() { return partitionBuilder_.getMessage(); } } + /** * * @@ -1414,6 +1449,7 @@ public Builder setPartition(com.google.bigtable.v2.StreamPartition value) { onChanged(); return this; } + /** * * @@ -1433,6 +1469,7 @@ public Builder setPartition(com.google.bigtable.v2.StreamPartition.Builder build onChanged(); return this; } + /** * * @@ -1460,6 +1497,7 @@ public Builder mergePartition(com.google.bigtable.v2.StreamPartition value) { } return this; } + /** * * @@ -1479,6 +1517,7 @@ public Builder clearPartition() { onChanged(); return this; } + /** * * @@ -1493,6 +1532,7 @@ public com.google.bigtable.v2.StreamPartition.Builder getPartitionBuilder() { onChanged(); return getPartitionFieldBuilder().getBuilder(); } + /** * * @@ -1511,6 +1551,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { : partition_; } } + /** * * @@ -1542,6 +1583,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -1560,6 +1602,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { public boolean hasStartTime() { return startFromCase_ == 4; } + /** * * @@ -1588,6 +1631,7 @@ public com.google.protobuf.Timestamp getStartTime() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1613,6 +1657,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { startFromCase_ = 4; return this; } + /** * * @@ -1635,6 +1680,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu startFromCase_ = 4; return this; } + /** * * @@ -1669,6 +1715,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { startFromCase_ = 4; return this; } + /** * * @@ -1697,6 +1744,7 @@ public Builder clearStartTime() { } return this; } + /** * * @@ -1712,6 +1760,7 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { return getStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1735,6 +1784,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1774,6 +1824,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { com.google.bigtable.v2.StreamContinuationTokens.Builder, com.google.bigtable.v2.StreamContinuationTokensOrBuilder> continuationTokensBuilder_; + /** * * @@ -1783,10 +1834,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 +1849,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasContinuationTokens() { return startFromCase_ == 6; } + /** * * @@ -1807,10 +1859,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 +1884,7 @@ public com.google.bigtable.v2.StreamContinuationTokens getContinuationTokens() { return com.google.bigtable.v2.StreamContinuationTokens.getDefaultInstance(); } } + /** * * @@ -1841,10 +1894,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 +1916,7 @@ public Builder setContinuationTokens(com.google.bigtable.v2.StreamContinuationTo startFromCase_ = 6; return this; } + /** * * @@ -1872,10 +1926,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 +1946,7 @@ public Builder setContinuationTokens( startFromCase_ = 6; return this; } + /** * * @@ -1901,10 +1956,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 +1988,7 @@ public Builder mergeContinuationTokens(com.google.bigtable.v2.StreamContinuation startFromCase_ = 6; return this; } + /** * * @@ -1942,10 +1998,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 +2023,7 @@ public Builder clearContinuationTokens() { } return this; } + /** * * @@ -1976,10 +2033,10 @@ 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. * * @@ -1988,6 +2045,7 @@ public Builder clearContinuationTokens() { public com.google.bigtable.v2.StreamContinuationTokens.Builder getContinuationTokensBuilder() { return getContinuationTokensFieldBuilder().getBuilder(); } + /** * * @@ -1997,10 +2055,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 +2076,7 @@ public com.google.bigtable.v2.StreamContinuationTokens.Builder getContinuationTo return com.google.bigtable.v2.StreamContinuationTokens.getDefaultInstance(); } } + /** * * @@ -2027,10 +2086,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. * * @@ -2066,6 +2125,7 @@ public com.google.bigtable.v2.StreamContinuationTokens.Builder getContinuationTo com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** * * @@ -2082,6 +2142,7 @@ public com.google.bigtable.v2.StreamContinuationTokens.Builder getContinuationTo public boolean hasEndTime() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -2102,6 +2163,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -2126,6 +2188,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -2147,6 +2210,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -2176,6 +2240,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2197,6 +2262,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -2213,6 +2279,7 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -2231,6 +2298,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -2265,6 +2333,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> heartbeatDurationBuilder_; + /** * * @@ -2280,6 +2349,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public boolean hasHeartbeatDuration() { return ((bitField0_ & 0x00000040) != 0); } + /** * * @@ -2301,6 +2371,7 @@ public com.google.protobuf.Duration getHeartbeatDuration() { return heartbeatDurationBuilder_.getMessage(); } } + /** * * @@ -2324,6 +2395,7 @@ public Builder setHeartbeatDuration(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -2344,6 +2416,7 @@ public Builder setHeartbeatDuration(com.google.protobuf.Duration.Builder builder onChanged(); return this; } + /** * * @@ -2372,6 +2445,7 @@ public Builder mergeHeartbeatDuration(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -2392,6 +2466,7 @@ public Builder clearHeartbeatDuration() { onChanged(); return this; } + /** * * @@ -2407,6 +2482,7 @@ public com.google.protobuf.Duration.Builder getHeartbeatDurationBuilder() { onChanged(); return getHeartbeatDurationFieldBuilder().getBuilder(); } + /** * * @@ -2426,6 +2502,7 @@ public com.google.protobuf.DurationOrBuilder getHeartbeatDurationOrBuilder() { : heartbeatDuration_; } } + /** * * 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..9fbaf8ddae 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface ReadChangeStreamRequestOrBuilder @@ -41,6 +41,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -73,6 +74,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -100,6 +102,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return Whether the partition field is set. */ boolean hasPartition(); + /** * * @@ -112,6 +115,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return The partition. */ com.google.bigtable.v2.StreamPartition getPartition(); + /** * * @@ -138,6 +142,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -153,6 +158,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -176,10 +182,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 +194,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return Whether the continuationTokens field is set. */ boolean hasContinuationTokens(); + /** * * @@ -197,10 +204,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 +216,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return The continuationTokens. */ com.google.bigtable.v2.StreamContinuationTokens getContinuationTokens(); + /** * * @@ -218,10 +226,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 +251,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -257,6 +266,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -283,6 +293,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return Whether the heartbeatDuration field is set. */ boolean hasHeartbeatDuration(); + /** * * @@ -296,6 +307,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..35ec8d2724 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -34,6 +34,7 @@ public final class ReadChangeStreamResponse extends com.google.protobuf.Generate // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse) ReadChangeStreamResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ReadChangeStreamResponse.newBuilder() to construct. private ReadChangeStreamResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -81,6 +82,7 @@ public interface MutationChunkOrBuilder * @return Whether the chunkInfo field is set. */ boolean hasChunkInfo(); + /** * * @@ -95,6 +97,7 @@ public interface MutationChunkOrBuilder * @return The chunkInfo. */ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo getChunkInfo(); + /** * * @@ -123,6 +126,7 @@ public interface MutationChunkOrBuilder * @return Whether the mutation field is set. */ boolean hasMutation(); + /** * * @@ -137,6 +141,7 @@ public interface MutationChunkOrBuilder * @return The mutation. */ com.google.bigtable.v2.Mutation getMutation(); + /** * * @@ -150,6 +155,7 @@ public interface MutationChunkOrBuilder */ com.google.bigtable.v2.MutationOrBuilder getMutationOrBuilder(); } + /** * * @@ -164,6 +170,7 @@ public static final class MutationChunk extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) MutationChunkOrBuilder { private static final long serialVersionUID = 0L; + // Use MutationChunk.newBuilder() to construct. private MutationChunk(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -237,6 +244,7 @@ public interface ChunkInfoOrBuilder */ boolean getLastChunk(); } + /** * * @@ -253,6 +261,7 @@ public static final class ChunkInfo extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) ChunkInfoOrBuilder { private static final long serialVersionUID = 0L; + // Use ChunkInfo.newBuilder() to construct. private ChunkInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -284,6 +293,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 +312,7 @@ public int getChunkedValueSize() { public static final int CHUNKED_VALUE_OFFSET_FIELD_NUMBER = 2; private int chunkedValueOffset_ = 0; + /** * * @@ -321,6 +332,7 @@ public int getChunkedValueOffset() { public static final int LAST_CHUNK_FIELD_NUMBER = 3; private boolean lastChunk_ = false; + /** * * @@ -525,6 +537,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -749,6 +762,7 @@ public Builder mergeFrom( private int bitField0_; private int chunkedValueSize_; + /** * * @@ -764,6 +778,7 @@ public Builder mergeFrom( public int getChunkedValueSize() { return chunkedValueSize_; } + /** * * @@ -783,6 +798,7 @@ public Builder setChunkedValueSize(int value) { onChanged(); return this; } + /** * * @@ -802,6 +818,7 @@ public Builder clearChunkedValueSize() { } private int chunkedValueOffset_; + /** * * @@ -818,6 +835,7 @@ public Builder clearChunkedValueSize() { public int getChunkedValueOffset() { return chunkedValueOffset_; } + /** * * @@ -838,6 +856,7 @@ public Builder setChunkedValueOffset(int value) { onChanged(); return this; } + /** * * @@ -858,6 +877,7 @@ public Builder clearChunkedValueOffset() { } private boolean lastChunk_; + /** * * @@ -873,6 +893,7 @@ public Builder clearChunkedValueOffset() { public boolean getLastChunk() { return lastChunk_; } + /** * * @@ -892,6 +913,7 @@ public Builder setLastChunk(boolean value) { onChanged(); return this; } + /** * * @@ -981,6 +1003,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 +1021,7 @@ public com.google.protobuf.Parser getParserForType() { public boolean hasChunkInfo() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1018,6 +1042,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo g .getDefaultInstance() : chunkInfo_; } + /** * * @@ -1040,6 +1065,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 +1083,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo g public boolean hasMutation() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1074,6 +1101,7 @@ public boolean hasMutation() { public com.google.bigtable.v2.Mutation getMutation() { return mutation_ == null ? com.google.bigtable.v2.Mutation.getDefaultInstance() : mutation_; } + /** * * @@ -1270,6 +1298,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1499,6 +1528,7 @@ public Builder mergeFrom( com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfoOrBuilder> chunkInfoBuilder_; + /** * * @@ -1515,6 +1545,7 @@ public Builder mergeFrom( public boolean hasChunkInfo() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1539,6 +1570,7 @@ public boolean hasChunkInfo() { return chunkInfoBuilder_.getMessage(); } } + /** * * @@ -1564,6 +1596,7 @@ public Builder setChunkInfo( onChanged(); return this; } + /** * * @@ -1587,6 +1620,7 @@ public Builder setChunkInfo( onChanged(); return this; } + /** * * @@ -1619,6 +1653,7 @@ public Builder mergeChunkInfo( } return this; } + /** * * @@ -1640,6 +1675,7 @@ public Builder clearChunkInfo() { onChanged(); return this; } + /** * * @@ -1657,6 +1693,7 @@ public Builder clearChunkInfo() { onChanged(); return getChunkInfoFieldBuilder().getBuilder(); } + /** * * @@ -1679,6 +1716,7 @@ public Builder clearChunkInfo() { : chunkInfo_; } } + /** * * @@ -1713,6 +1751,7 @@ public Builder clearChunkInfo() { com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder> mutationBuilder_; + /** * * @@ -1729,6 +1768,7 @@ public Builder clearChunkInfo() { public boolean hasMutation() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1751,6 +1791,7 @@ public com.google.bigtable.v2.Mutation getMutation() { return mutationBuilder_.getMessage(); } } + /** * * @@ -1775,6 +1816,7 @@ public Builder setMutation(com.google.bigtable.v2.Mutation value) { onChanged(); return this; } + /** * * @@ -1796,6 +1838,7 @@ public Builder setMutation(com.google.bigtable.v2.Mutation.Builder builderForVal onChanged(); return this; } + /** * * @@ -1825,6 +1868,7 @@ public Builder mergeMutation(com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -1846,6 +1890,7 @@ public Builder clearMutation() { onChanged(); return this; } + /** * * @@ -1862,6 +1907,7 @@ public com.google.bigtable.v2.Mutation.Builder getMutationBuilder() { onChanged(); return getMutationFieldBuilder().getBuilder(); } + /** * * @@ -1882,6 +1928,7 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationOrBuilder() { : mutation_; } } + /** * * @@ -1994,6 +2041,7 @@ public interface DataChangeOrBuilder * @return The enum numeric value on the wire for type. */ int getTypeValue(); + /** * * @@ -2020,6 +2068,7 @@ public interface DataChangeOrBuilder * @return The sourceClusterId. */ java.lang.String getSourceClusterId(); + /** * * @@ -2061,6 +2110,7 @@ public interface DataChangeOrBuilder * @return Whether the commitTimestamp field is set. */ boolean hasCommitTimestamp(); + /** * * @@ -2073,6 +2123,7 @@ public interface DataChangeOrBuilder * @return The commitTimestamp. */ com.google.protobuf.Timestamp getCommitTimestamp(); + /** * * @@ -2115,6 +2166,7 @@ public interface DataChangeOrBuilder * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ java.util.List getChunksList(); + /** * * @@ -2127,6 +2179,7 @@ public interface DataChangeOrBuilder * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk getChunks(int index); + /** * * @@ -2139,6 +2192,7 @@ public interface DataChangeOrBuilder * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ int getChunksCount(); + /** * * @@ -2152,6 +2206,7 @@ public interface DataChangeOrBuilder */ java.util.List getChunksOrBuilderList(); + /** * * @@ -2193,6 +2248,7 @@ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder getChunks * @return The token. */ java.lang.String getToken(); + /** * * @@ -2214,8 +2270,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 +2280,7 @@ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder getChunks * @return Whether the estimatedLowWatermark field is set. */ boolean hasEstimatedLowWatermark(); + /** * * @@ -2231,8 +2288,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 +2298,7 @@ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder getChunks * @return The estimatedLowWatermark. */ com.google.protobuf.Timestamp getEstimatedLowWatermark(); + /** * * @@ -2248,8 +2306,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 +2315,7 @@ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder getChunks */ com.google.protobuf.TimestampOrBuilder getEstimatedLowWatermarkOrBuilder(); } + /** * * @@ -2276,6 +2335,7 @@ public static final class DataChange extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.DataChange) DataChangeOrBuilder { private static final long serialVersionUID = 0L; + // Use DataChange.newBuilder() to construct. private DataChange(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -2374,6 +2434,7 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * TYPE_UNSPECIFIED = 0; */ public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** * * @@ -2384,6 +2445,7 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * USER = 1; */ public static final int USER_VALUE = 1; + /** * * @@ -2395,6 +2457,7 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * GARBAGE_COLLECTION = 2; */ public static final int GARBAGE_COLLECTION_VALUE = 2; + /** * * @@ -2496,6 +2559,7 @@ private Type(int value) { private int bitField0_; public static final int TYPE_FIELD_NUMBER = 1; private int type_ = 0; + /** * * @@ -2511,6 +2575,7 @@ private Type(int value) { public int getTypeValue() { return type_; } + /** * * @@ -2535,6 +2600,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type getType() @SuppressWarnings("serial") private volatile java.lang.Object sourceClusterId_ = ""; + /** * * @@ -2559,6 +2625,7 @@ public java.lang.String getSourceClusterId() { return s; } } + /** * * @@ -2586,6 +2653,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 +2674,7 @@ public com.google.protobuf.ByteString getRowKey() { public static final int COMMIT_TIMESTAMP_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp commitTimestamp_; + /** * * @@ -2621,6 +2690,7 @@ public com.google.protobuf.ByteString getRowKey() { public boolean hasCommitTimestamp() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2638,6 +2708,7 @@ public com.google.protobuf.Timestamp getCommitTimestamp() { ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTimestamp_; } + /** * * @@ -2656,6 +2727,7 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { public static final int TIEBREAKER_FIELD_NUMBER = 5; private int tiebreaker_ = 0; + /** * * @@ -2682,6 +2754,7 @@ public int getTiebreaker() { @SuppressWarnings("serial") private java.util.List chunks_; + /** * * @@ -2698,6 +2771,7 @@ public int getTiebreaker() { getChunksList() { return chunks_; } + /** * * @@ -2715,6 +2789,7 @@ public int getTiebreaker() { getChunksOrBuilderList() { return chunks_; } + /** * * @@ -2730,6 +2805,7 @@ public int getTiebreaker() { public int getChunksCount() { return chunks_.size(); } + /** * * @@ -2745,6 +2821,7 @@ public int getChunksCount() { public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk getChunks(int index) { return chunks_.get(index); } + /** * * @@ -2764,6 +2841,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk getChunks(i public static final int DONE_FIELD_NUMBER = 8; private boolean done_ = false; + /** * * @@ -2785,6 +2863,7 @@ public boolean getDone() { @SuppressWarnings("serial") private volatile java.lang.Object token_ = ""; + /** * * @@ -2809,6 +2888,7 @@ public java.lang.String getToken() { return s; } } + /** * * @@ -2836,6 +2916,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 +2924,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 +2937,7 @@ public com.google.protobuf.ByteString getTokenBytes() { public boolean hasEstimatedLowWatermark() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -2863,8 +2945,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 +2960,7 @@ public com.google.protobuf.Timestamp getEstimatedLowWatermark() { ? com.google.protobuf.Timestamp.getDefaultInstance() : estimatedLowWatermark_; } + /** * * @@ -2885,8 +2968,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 * * @@ -3150,6 +3233,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -3529,6 +3613,7 @@ public Builder mergeFrom( private int bitField0_; private int type_ = 0; + /** * * @@ -3544,6 +3629,7 @@ public Builder mergeFrom( public int getTypeValue() { return type_; } + /** * * @@ -3562,6 +3648,7 @@ public Builder setTypeValue(int value) { onChanged(); return this; } + /** * * @@ -3581,6 +3668,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type getType() ? com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type.UNRECOGNIZED : result; } + /** * * @@ -3603,6 +3691,7 @@ public Builder setType( onChanged(); return this; } + /** * * @@ -3622,6 +3711,7 @@ public Builder clearType() { } private java.lang.Object sourceClusterId_ = ""; + /** * * @@ -3645,6 +3735,7 @@ public java.lang.String getSourceClusterId() { return (java.lang.String) ref; } } + /** * * @@ -3668,6 +3759,7 @@ public com.google.protobuf.ByteString getSourceClusterIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3690,6 +3782,7 @@ public Builder setSourceClusterId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3708,6 +3801,7 @@ public Builder clearSourceClusterId() { onChanged(); return this; } + /** * * @@ -3733,6 +3827,7 @@ public Builder setSourceClusterIdBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -3750,6 +3845,7 @@ public Builder setSourceClusterIdBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getRowKey() { return rowKey_; } + /** * * @@ -3773,6 +3869,7 @@ public Builder setRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -3799,6 +3896,7 @@ public Builder clearRowKey() { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> commitTimestampBuilder_; + /** * * @@ -3813,6 +3911,7 @@ public Builder clearRowKey() { public boolean hasCommitTimestamp() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -3833,6 +3932,7 @@ public com.google.protobuf.Timestamp getCommitTimestamp() { return commitTimestampBuilder_.getMessage(); } } + /** * * @@ -3855,6 +3955,7 @@ public Builder setCommitTimestamp(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -3874,6 +3975,7 @@ public Builder setCommitTimestamp(com.google.protobuf.Timestamp.Builder builderF onChanged(); return this; } + /** * * @@ -3901,6 +4003,7 @@ public Builder mergeCommitTimestamp(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -3920,6 +4023,7 @@ public Builder clearCommitTimestamp() { onChanged(); return this; } + /** * * @@ -3934,6 +4038,7 @@ public com.google.protobuf.Timestamp.Builder getCommitTimestampBuilder() { onChanged(); return getCommitTimestampFieldBuilder().getBuilder(); } + /** * * @@ -3952,6 +4057,7 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { : commitTimestamp_; } } + /** * * @@ -3979,6 +4085,7 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { } private int tiebreaker_; + /** * * @@ -4000,6 +4107,7 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { public int getTiebreaker() { return tiebreaker_; } + /** * * @@ -4025,6 +4133,7 @@ public Builder setTiebreaker(int value) { onChanged(); return this; } + /** * * @@ -4087,6 +4196,7 @@ private void ensureChunksIsMutable() { return chunksBuilder_.getMessageList(); } } + /** * * @@ -4106,6 +4216,7 @@ public int getChunksCount() { return chunksBuilder_.getCount(); } } + /** * * @@ -4125,6 +4236,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk getChunks(i return chunksBuilder_.getMessage(index); } } + /** * * @@ -4151,6 +4263,7 @@ public Builder setChunks( } return this; } + /** * * @@ -4175,6 +4288,7 @@ public Builder setChunks( } return this; } + /** * * @@ -4201,6 +4315,7 @@ public Builder addChunks( } return this; } + /** * * @@ -4227,6 +4342,7 @@ public Builder addChunks( } return this; } + /** * * @@ -4250,6 +4366,7 @@ public Builder addChunks( } return this; } + /** * * @@ -4274,6 +4391,7 @@ public Builder addChunks( } return this; } + /** * * @@ -4299,6 +4417,7 @@ public Builder addAllChunks( } return this; } + /** * * @@ -4321,6 +4440,7 @@ public Builder clearChunks() { } return this; } + /** * * @@ -4343,6 +4463,7 @@ public Builder removeChunks(int index) { } return this; } + /** * * @@ -4359,6 +4480,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder get int index) { return getChunksFieldBuilder().getBuilder(index); } + /** * * @@ -4379,6 +4501,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder get return chunksBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -4400,6 +4523,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder get return java.util.Collections.unmodifiableList(chunks_); } } + /** * * @@ -4418,6 +4542,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder get .addBuilder( com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.getDefaultInstance()); } + /** * * @@ -4437,6 +4562,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder add index, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.getDefaultInstance()); } + /** * * @@ -4472,6 +4598,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder add } private boolean done_; + /** * * @@ -4488,6 +4615,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder add public boolean getDone() { return done_; } + /** * * @@ -4508,6 +4636,7 @@ public Builder setDone(boolean value) { onChanged(); return this; } + /** * * @@ -4528,6 +4657,7 @@ public Builder clearDone() { } private java.lang.Object token_ = ""; + /** * * @@ -4551,6 +4681,7 @@ public java.lang.String getToken() { return (java.lang.String) ref; } } + /** * * @@ -4574,6 +4705,7 @@ public com.google.protobuf.ByteString getTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4596,6 +4728,7 @@ public Builder setToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4614,6 +4747,7 @@ public Builder clearToken() { onChanged(); return this; } + /** * * @@ -4644,6 +4778,7 @@ public Builder setTokenBytes(com.google.protobuf.ByteString value) { com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> estimatedLowWatermarkBuilder_; + /** * * @@ -4651,8 +4786,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 +4798,7 @@ public Builder setTokenBytes(com.google.protobuf.ByteString value) { public boolean hasEstimatedLowWatermark() { return ((bitField0_ & 0x00000100) != 0); } + /** * * @@ -4670,8 +4806,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 +4824,7 @@ public com.google.protobuf.Timestamp getEstimatedLowWatermark() { return estimatedLowWatermarkBuilder_.getMessage(); } } + /** * * @@ -4695,8 +4832,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 +4852,7 @@ public Builder setEstimatedLowWatermark(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -4722,8 +4860,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 +4878,7 @@ public Builder setEstimatedLowWatermark( onChanged(); return this; } + /** * * @@ -4747,8 +4886,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 +4911,7 @@ public Builder mergeEstimatedLowWatermark(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -4779,8 +4919,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 +4936,7 @@ public Builder clearEstimatedLowWatermark() { onChanged(); return this; } + /** * * @@ -4803,8 +4944,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 * * @@ -4815,6 +4956,7 @@ public com.google.protobuf.Timestamp.Builder getEstimatedLowWatermarkBuilder() { onChanged(); return getEstimatedLowWatermarkFieldBuilder().getBuilder(); } + /** * * @@ -4822,8 +4964,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 +4980,7 @@ public com.google.protobuf.TimestampOrBuilder getEstimatedLowWatermarkOrBuilder( : estimatedLowWatermark_; } } + /** * * @@ -4845,8 +4988,8 @@ 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 * * @@ -4952,6 +5095,7 @@ public interface HeartbeatOrBuilder * @return Whether the continuationToken field is set. */ boolean hasContinuationToken(); + /** * * @@ -4965,6 +5109,7 @@ public interface HeartbeatOrBuilder * @return The continuationToken. */ com.google.bigtable.v2.StreamContinuationToken getContinuationToken(); + /** * * @@ -4984,8 +5129,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 +5139,7 @@ public interface HeartbeatOrBuilder * @return Whether the estimatedLowWatermark field is set. */ boolean hasEstimatedLowWatermark(); + /** * * @@ -5001,8 +5147,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 +5157,7 @@ public interface HeartbeatOrBuilder * @return The estimatedLowWatermark. */ com.google.protobuf.Timestamp getEstimatedLowWatermark(); + /** * * @@ -5018,8 +5165,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 +5174,7 @@ public interface HeartbeatOrBuilder */ com.google.protobuf.TimestampOrBuilder getEstimatedLowWatermarkOrBuilder(); } + /** * * @@ -5042,6 +5190,7 @@ public static final class Heartbeat extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) HeartbeatOrBuilder { private static final long serialVersionUID = 0L; + // Use Heartbeat.newBuilder() to construct. private Heartbeat(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -5073,6 +5222,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 +5239,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasContinuationToken() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -5107,6 +5258,7 @@ public com.google.bigtable.v2.StreamContinuationToken getContinuationToken() { ? com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance() : continuationToken_; } + /** * * @@ -5126,6 +5278,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 +5286,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 +5299,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTo public boolean hasEstimatedLowWatermark() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -5153,8 +5307,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 +5322,7 @@ public com.google.protobuf.Timestamp getEstimatedLowWatermark() { ? com.google.protobuf.Timestamp.getDefaultInstance() : estimatedLowWatermark_; } + /** * * @@ -5175,8 +5330,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 * * @@ -5370,6 +5525,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -5604,6 +5760,7 @@ public Builder mergeFrom( com.google.bigtable.v2.StreamContinuationToken.Builder, com.google.bigtable.v2.StreamContinuationTokenOrBuilder> continuationTokenBuilder_; + /** * * @@ -5619,6 +5776,7 @@ public Builder mergeFrom( public boolean hasContinuationToken() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -5640,6 +5798,7 @@ public com.google.bigtable.v2.StreamContinuationToken getContinuationToken() { return continuationTokenBuilder_.getMessage(); } } + /** * * @@ -5663,6 +5822,7 @@ public Builder setContinuationToken(com.google.bigtable.v2.StreamContinuationTok onChanged(); return this; } + /** * * @@ -5684,6 +5844,7 @@ public Builder setContinuationToken( onChanged(); return this; } + /** * * @@ -5713,6 +5874,7 @@ public Builder mergeContinuationToken(com.google.bigtable.v2.StreamContinuationT } return this; } + /** * * @@ -5733,6 +5895,7 @@ public Builder clearContinuationToken() { onChanged(); return this; } + /** * * @@ -5748,6 +5911,7 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder getContinuationTok onChanged(); return getContinuationTokenFieldBuilder().getBuilder(); } + /** * * @@ -5768,6 +5932,7 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder getContinuationTok : continuationToken_; } } + /** * * @@ -5801,6 +5966,7 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder getContinuationTok com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> estimatedLowWatermarkBuilder_; + /** * * @@ -5808,8 +5974,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 +5986,7 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder getContinuationTok public boolean hasEstimatedLowWatermark() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -5827,8 +5994,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 +6012,7 @@ public com.google.protobuf.Timestamp getEstimatedLowWatermark() { return estimatedLowWatermarkBuilder_.getMessage(); } } + /** * * @@ -5852,8 +6020,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 +6040,7 @@ public Builder setEstimatedLowWatermark(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -5879,8 +6048,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 +6066,7 @@ public Builder setEstimatedLowWatermark( onChanged(); return this; } + /** * * @@ -5904,8 +6074,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 +6099,7 @@ public Builder mergeEstimatedLowWatermark(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -5936,8 +6107,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 +6124,7 @@ public Builder clearEstimatedLowWatermark() { onChanged(); return this; } + /** * * @@ -5960,8 +6132,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 * * @@ -5972,6 +6144,7 @@ public com.google.protobuf.Timestamp.Builder getEstimatedLowWatermarkBuilder() { onChanged(); return getEstimatedLowWatermarkFieldBuilder().getBuilder(); } + /** * * @@ -5979,8 +6152,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 +6168,7 @@ public com.google.protobuf.TimestampOrBuilder getEstimatedLowWatermarkOrBuilder( : estimatedLowWatermark_; } } + /** * * @@ -6002,8 +6176,8 @@ 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 * * @@ -6107,6 +6281,7 @@ public interface CloseStreamOrBuilder * @return Whether the status field is set. */ boolean hasStatus(); + /** * * @@ -6119,6 +6294,7 @@ public interface CloseStreamOrBuilder * @return The status. */ com.google.rpc.Status getStatus(); + /** * * @@ -6141,6 +6317,7 @@ public interface CloseStreamOrBuilder * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ java.util.List getContinuationTokensList(); + /** * * @@ -6152,6 +6329,7 @@ public interface CloseStreamOrBuilder * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ com.google.bigtable.v2.StreamContinuationToken getContinuationTokens(int index); + /** * * @@ -6163,6 +6341,7 @@ public interface CloseStreamOrBuilder * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ int getContinuationTokensCount(); + /** * * @@ -6175,6 +6354,7 @@ public interface CloseStreamOrBuilder */ java.util.List getContinuationTokensOrBuilderList(); + /** * * @@ -6200,6 +6380,7 @@ com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokensOrB * repeated .google.bigtable.v2.StreamPartition new_partitions = 3; */ java.util.List getNewPartitionsList(); + /** * * @@ -6212,6 +6393,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 +6406,7 @@ com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokensOrB * repeated .google.bigtable.v2.StreamPartition new_partitions = 3; */ int getNewPartitionsCount(); + /** * * @@ -6237,6 +6420,7 @@ com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokensOrB */ java.util.List getNewPartitionsOrBuilderList(); + /** * * @@ -6250,6 +6434,7 @@ com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokensOrB */ com.google.bigtable.v2.StreamPartitionOrBuilder getNewPartitionsOrBuilder(int index); } + /** * * @@ -6260,17 +6445,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) - * 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). @@ -6283,6 +6470,7 @@ public static final class CloseStream extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.CloseStream) CloseStreamOrBuilder { private static final long serialVersionUID = 0L; + // Use CloseStream.newBuilder() to construct. private CloseStream(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -6317,6 +6505,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 +6521,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasStatus() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -6347,6 +6537,7 @@ public boolean hasStatus() { public com.google.rpc.Status getStatus() { return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; } + /** * * @@ -6365,6 +6556,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { @SuppressWarnings("serial") private java.util.List continuationTokens_; + /** * * @@ -6380,6 +6572,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { getContinuationTokensList() { return continuationTokens_; } + /** * * @@ -6395,6 +6588,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { getContinuationTokensOrBuilderList() { return continuationTokens_; } + /** * * @@ -6409,6 +6603,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { public int getContinuationTokensCount() { return continuationTokens_.size(); } + /** * * @@ -6423,6 +6618,7 @@ public int getContinuationTokensCount() { public com.google.bigtable.v2.StreamContinuationToken getContinuationTokens(int index) { return continuationTokens_.get(index); } + /** * * @@ -6443,6 +6639,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTo @SuppressWarnings("serial") private java.util.List newPartitions_; + /** * * @@ -6458,6 +6655,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTo public java.util.List getNewPartitionsList() { return newPartitions_; } + /** * * @@ -6474,6 +6672,7 @@ public java.util.List getNewPartitionsLi getNewPartitionsOrBuilderList() { return newPartitions_; } + /** * * @@ -6489,6 +6688,7 @@ public java.util.List getNewPartitionsLi public int getNewPartitionsCount() { return newPartitions_.size(); } + /** * * @@ -6504,6 +6704,7 @@ public int getNewPartitionsCount() { public com.google.bigtable.v2.StreamPartition getNewPartitions(int index) { return newPartitions_.get(index); } + /** * * @@ -6709,6 +6910,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -6719,17 +6921,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) - * 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). @@ -7055,6 +7259,7 @@ public Builder mergeFrom( private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusBuilder_; + /** * * @@ -7069,6 +7274,7 @@ public Builder mergeFrom( public boolean hasStatus() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -7087,6 +7293,7 @@ public com.google.rpc.Status getStatus() { return statusBuilder_.getMessage(); } } + /** * * @@ -7109,6 +7316,7 @@ public Builder setStatus(com.google.rpc.Status value) { onChanged(); return this; } + /** * * @@ -7128,6 +7336,7 @@ public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -7155,6 +7364,7 @@ public Builder mergeStatus(com.google.rpc.Status value) { } return this; } + /** * * @@ -7174,6 +7384,7 @@ public Builder clearStatus() { onChanged(); return this; } + /** * * @@ -7188,6 +7399,7 @@ public com.google.rpc.Status.Builder getStatusBuilder() { onChanged(); return getStatusFieldBuilder().getBuilder(); } + /** * * @@ -7204,6 +7416,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; } } + /** * * @@ -7263,6 +7476,7 @@ private void ensureContinuationTokensIsMutable() { return continuationTokensBuilder_.getMessageList(); } } + /** * * @@ -7280,6 +7494,7 @@ public int getContinuationTokensCount() { return continuationTokensBuilder_.getCount(); } } + /** * * @@ -7297,6 +7512,7 @@ public com.google.bigtable.v2.StreamContinuationToken getContinuationTokens(int return continuationTokensBuilder_.getMessage(index); } } + /** * * @@ -7321,6 +7537,7 @@ public Builder setContinuationTokens( } return this; } + /** * * @@ -7342,6 +7559,7 @@ public Builder setContinuationTokens( } return this; } + /** * * @@ -7365,6 +7583,7 @@ public Builder addContinuationTokens(com.google.bigtable.v2.StreamContinuationTo } return this; } + /** * * @@ -7389,6 +7608,7 @@ public Builder addContinuationTokens( } return this; } + /** * * @@ -7410,6 +7630,7 @@ public Builder addContinuationTokens( } return this; } + /** * * @@ -7431,6 +7652,7 @@ public Builder addContinuationTokens( } return this; } + /** * * @@ -7452,6 +7674,7 @@ public Builder addAllContinuationTokens( } return this; } + /** * * @@ -7472,6 +7695,7 @@ public Builder clearContinuationTokens() { } return this; } + /** * * @@ -7492,6 +7716,7 @@ public Builder removeContinuationTokens(int index) { } return this; } + /** * * @@ -7506,6 +7731,7 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder getContinuationTok int index) { return getContinuationTokensFieldBuilder().getBuilder(index); } + /** * * @@ -7524,6 +7750,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTo return continuationTokensBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -7542,6 +7769,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTo return java.util.Collections.unmodifiableList(continuationTokens_); } } + /** * * @@ -7556,6 +7784,7 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder addContinuationTok return getContinuationTokensFieldBuilder() .addBuilder(com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance()); } + /** * * @@ -7571,6 +7800,7 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder addContinuationTok return getContinuationTokensFieldBuilder() .addBuilder(index, com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance()); } + /** * * @@ -7641,6 +7871,7 @@ public java.util.List getNewPartitionsLi return newPartitionsBuilder_.getMessageList(); } } + /** * * @@ -7659,6 +7890,7 @@ public int getNewPartitionsCount() { return newPartitionsBuilder_.getCount(); } } + /** * * @@ -7677,6 +7909,7 @@ public com.google.bigtable.v2.StreamPartition getNewPartitions(int index) { return newPartitionsBuilder_.getMessage(index); } } + /** * * @@ -7701,6 +7934,7 @@ public Builder setNewPartitions(int index, com.google.bigtable.v2.StreamPartitio } return this; } + /** * * @@ -7723,6 +7957,7 @@ public Builder setNewPartitions( } return this; } + /** * * @@ -7747,6 +7982,7 @@ public Builder addNewPartitions(com.google.bigtable.v2.StreamPartition value) { } return this; } + /** * * @@ -7771,6 +8007,7 @@ public Builder addNewPartitions(int index, com.google.bigtable.v2.StreamPartitio } return this; } + /** * * @@ -7793,6 +8030,7 @@ public Builder addNewPartitions( } return this; } + /** * * @@ -7815,6 +8053,7 @@ public Builder addNewPartitions( } return this; } + /** * * @@ -7837,6 +8076,7 @@ public Builder addAllNewPartitions( } return this; } + /** * * @@ -7858,6 +8098,7 @@ public Builder clearNewPartitions() { } return this; } + /** * * @@ -7879,6 +8120,7 @@ public Builder removeNewPartitions(int index) { } return this; } + /** * * @@ -7893,6 +8135,7 @@ public Builder removeNewPartitions(int index) { public com.google.bigtable.v2.StreamPartition.Builder getNewPartitionsBuilder(int index) { return getNewPartitionsFieldBuilder().getBuilder(index); } + /** * * @@ -7911,6 +8154,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getNewPartitionsOrBuilder return newPartitionsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -7930,6 +8174,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getNewPartitionsOrBuilder return java.util.Collections.unmodifiableList(newPartitions_); } } + /** * * @@ -7945,6 +8190,7 @@ public com.google.bigtable.v2.StreamPartition.Builder addNewPartitionsBuilder() return getNewPartitionsFieldBuilder() .addBuilder(com.google.bigtable.v2.StreamPartition.getDefaultInstance()); } + /** * * @@ -7960,6 +8206,7 @@ public com.google.bigtable.v2.StreamPartition.Builder addNewPartitionsBuilder(in return getNewPartitionsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.StreamPartition.getDefaultInstance()); } + /** * * @@ -8079,6 +8326,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 +8362,7 @@ public StreamRecordCase getStreamRecordCase() { } public static final int DATA_CHANGE_FIELD_NUMBER = 1; + /** * * @@ -8129,6 +8378,7 @@ public StreamRecordCase getStreamRecordCase() { public boolean hasDataChange() { return streamRecordCase_ == 1; } + /** * * @@ -8147,6 +8397,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDataChange( } return com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance(); } + /** * * @@ -8166,6 +8417,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDataChange( } public static final int HEARTBEAT_FIELD_NUMBER = 2; + /** * * @@ -8181,6 +8433,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDataChange( public boolean hasHeartbeat() { return streamRecordCase_ == 2; } + /** * * @@ -8199,6 +8452,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getHeartbeat() } return com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); } + /** * * @@ -8218,6 +8472,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getHeartbeat() } public static final int CLOSE_STREAM_FIELD_NUMBER = 3; + /** * * @@ -8233,6 +8488,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getHeartbeat() public boolean hasCloseStream() { return streamRecordCase_ == 3; } + /** * * @@ -8251,6 +8507,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream getCloseStrea } return com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance(); } + /** * * @@ -8476,6 +8733,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -8729,6 +8987,7 @@ public Builder clearStreamRecord() { com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.DataChangeOrBuilder> dataChangeBuilder_; + /** * * @@ -8744,6 +9003,7 @@ public Builder clearStreamRecord() { public boolean hasDataChange() { return streamRecordCase_ == 1; } + /** * * @@ -8769,6 +9029,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDataChange( return com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance(); } } + /** * * @@ -8791,6 +9052,7 @@ public Builder setDataChange(com.google.bigtable.v2.ReadChangeStreamResponse.Dat streamRecordCase_ = 1; return this; } + /** * * @@ -8811,6 +9073,7 @@ public Builder setDataChange( streamRecordCase_ = 1; return this; } + /** * * @@ -8846,6 +9109,7 @@ public Builder mergeDataChange( streamRecordCase_ = 1; return this; } + /** * * @@ -8871,6 +9135,7 @@ public Builder clearDataChange() { } return this; } + /** * * @@ -8884,6 +9149,7 @@ public Builder clearDataChange() { getDataChangeBuilder() { return getDataChangeFieldBuilder().getBuilder(); } + /** * * @@ -8905,6 +9171,7 @@ public Builder clearDataChange() { return com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance(); } } + /** * * @@ -8944,6 +9211,7 @@ public Builder clearDataChange() { com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatOrBuilder> heartbeatBuilder_; + /** * * @@ -8959,6 +9227,7 @@ public Builder clearDataChange() { public boolean hasHeartbeat() { return streamRecordCase_ == 2; } + /** * * @@ -8984,6 +9253,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getHeartbeat() return com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); } } + /** * * @@ -9006,6 +9276,7 @@ public Builder setHeartbeat(com.google.bigtable.v2.ReadChangeStreamResponse.Hear streamRecordCase_ = 2; return this; } + /** * * @@ -9026,6 +9297,7 @@ public Builder setHeartbeat( streamRecordCase_ = 2; return this; } + /** * * @@ -9059,6 +9331,7 @@ public Builder mergeHeartbeat(com.google.bigtable.v2.ReadChangeStreamResponse.He streamRecordCase_ = 2; return this; } + /** * * @@ -9084,6 +9357,7 @@ public Builder clearHeartbeat() { } return this; } + /** * * @@ -9096,6 +9370,7 @@ public Builder clearHeartbeat() { public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder getHeartbeatBuilder() { return getHeartbeatFieldBuilder().getBuilder(); } + /** * * @@ -9117,6 +9392,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder getHear return com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); } } + /** * * @@ -9156,6 +9432,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder getHear com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamOrBuilder> closeStreamBuilder_; + /** * * @@ -9171,6 +9448,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder getHear public boolean hasCloseStream() { return streamRecordCase_ == 3; } + /** * * @@ -9196,6 +9474,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream getCloseStrea return com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance(); } } + /** * * @@ -9219,6 +9498,7 @@ public Builder setCloseStream( streamRecordCase_ = 3; return this; } + /** * * @@ -9239,6 +9519,7 @@ public Builder setCloseStream( streamRecordCase_ = 3; return this; } + /** * * @@ -9274,6 +9555,7 @@ public Builder mergeCloseStream( streamRecordCase_ = 3; return this; } + /** * * @@ -9299,6 +9581,7 @@ public Builder clearCloseStream() { } return this; } + /** * * @@ -9312,6 +9595,7 @@ public Builder clearCloseStream() { getCloseStreamBuilder() { return getCloseStreamFieldBuilder().getBuilder(); } + /** * * @@ -9333,6 +9617,7 @@ public Builder clearCloseStream() { return com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance(); } } + /** * * 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..990317be07 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface ReadChangeStreamResponseOrBuilder @@ -36,6 +36,7 @@ public interface ReadChangeStreamResponseOrBuilder * @return Whether the dataChange field is set. */ boolean hasDataChange(); + /** * * @@ -48,6 +49,7 @@ public interface ReadChangeStreamResponseOrBuilder * @return The dataChange. */ com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDataChange(); + /** * * @@ -71,6 +73,7 @@ public interface ReadChangeStreamResponseOrBuilder * @return Whether the heartbeat field is set. */ boolean hasHeartbeat(); + /** * * @@ -83,6 +86,7 @@ public interface ReadChangeStreamResponseOrBuilder * @return The heartbeat. */ com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getHeartbeat(); + /** * * @@ -106,6 +110,7 @@ public interface ReadChangeStreamResponseOrBuilder * @return Whether the closeStream field is set. */ boolean hasCloseStream(); + /** * * @@ -118,6 +123,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..1fbbb5fe03 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/request_stats.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -35,6 +35,7 @@ public final class ReadIterationStats extends com.google.protobuf.GeneratedMessa // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadIterationStats) ReadIterationStatsOrBuilder { private static final long serialVersionUID = 0L; + // Use ReadIterationStats.newBuilder() to construct. private ReadIterationStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,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 +86,7 @@ public long getRowsSeenCount() { public static final int ROWS_RETURNED_COUNT_FIELD_NUMBER = 2; private long rowsReturnedCount_ = 0L; + /** * * @@ -102,6 +105,7 @@ public long getRowsReturnedCount() { public static final int CELLS_SEEN_COUNT_FIELD_NUMBER = 3; private long cellsSeenCount_ = 0L; + /** * * @@ -121,6 +125,7 @@ public long getCellsSeenCount() { public static final int CELLS_RETURNED_COUNT_FIELD_NUMBER = 4; private long cellsReturnedCount_ = 0L; + /** * * @@ -323,6 +328,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -545,6 +551,7 @@ public Builder mergeFrom( private int bitField0_; private long rowsSeenCount_; + /** * * @@ -561,6 +568,7 @@ public Builder mergeFrom( public long getRowsSeenCount() { return rowsSeenCount_; } + /** * * @@ -581,6 +589,7 @@ public Builder setRowsSeenCount(long value) { onChanged(); return this; } + /** * * @@ -601,6 +610,7 @@ public Builder clearRowsSeenCount() { } private long rowsReturnedCount_; + /** * * @@ -616,6 +626,7 @@ public Builder clearRowsSeenCount() { public long getRowsReturnedCount() { return rowsReturnedCount_; } + /** * * @@ -635,6 +646,7 @@ public Builder setRowsReturnedCount(long value) { onChanged(); return this; } + /** * * @@ -654,6 +666,7 @@ public Builder clearRowsReturnedCount() { } private long cellsSeenCount_; + /** * * @@ -670,6 +683,7 @@ public Builder clearRowsReturnedCount() { public long getCellsSeenCount() { return cellsSeenCount_; } + /** * * @@ -690,6 +704,7 @@ public Builder setCellsSeenCount(long value) { onChanged(); return this; } + /** * * @@ -710,6 +725,7 @@ public Builder clearCellsSeenCount() { } private long cellsReturnedCount_; + /** * * @@ -725,6 +741,7 @@ public Builder clearCellsSeenCount() { public long getCellsReturnedCount() { return cellsReturnedCount_; } + /** * * @@ -744,6 +761,7 @@ public Builder setCellsReturnedCount(long value) { onChanged(); return this; } + /** * * 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..5a449a9a9f 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/request_stats.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface ReadIterationStatsOrBuilder 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..d7ea906f38 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class ReadModifyWriteRowRequest extends com.google.protobuf.Generat // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadModifyWriteRowRequest) ReadModifyWriteRowRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ReadModifyWriteRowRequest.newBuilder() to construct. private ReadModifyWriteRowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -71,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -100,6 +102,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -134,6 +137,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object authorizedViewName_ = ""; + /** * * @@ -163,6 +167,7 @@ public java.lang.String getAuthorizedViewName() { return s; } } + /** * * @@ -197,6 +202,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -221,6 +227,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -248,6 +255,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 +277,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 +296,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 +316,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 +335,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 +354,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.
        * 
    * * @@ -553,6 +571,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -841,6 +860,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -869,6 +889,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -897,6 +918,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -924,6 +946,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -947,6 +970,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -977,6 +1001,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object authorizedViewName_ = ""; + /** * * @@ -1005,6 +1030,7 @@ public java.lang.String getAuthorizedViewName() { return (java.lang.String) ref; } } + /** * * @@ -1033,6 +1059,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1060,6 +1087,7 @@ public Builder setAuthorizedViewName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1083,6 +1111,7 @@ public Builder clearAuthorizedViewName() { onChanged(); return this; } + /** * * @@ -1113,6 +1142,7 @@ public Builder setAuthorizedViewNameBytes(com.google.protobuf.ByteString value) } private java.lang.Object appProfileId_ = ""; + /** * * @@ -1136,6 +1166,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -1159,6 +1190,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1181,6 +1213,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1199,6 +1232,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -1224,6 +1258,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -1240,6 +1275,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getRowKey() { return rowKey_; } + /** * * @@ -1262,6 +1298,7 @@ public Builder setRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1303,7 +1340,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 +1355,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 +1377,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 +1399,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 +1427,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 +1453,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 +1481,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 +1509,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 +1534,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 +1560,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 +1586,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 +1611,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 +1636,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.
          * 
    * * @@ -1592,13 +1654,15 @@ public Builder removeRules(int index) { public com.google.bigtable.v2.ReadModifyWriteRule.Builder getRulesBuilder(int index) { return getRulesFieldBuilder().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 +1676,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 +1699,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.
          * 
    * * @@ -1650,13 +1718,15 @@ public com.google.bigtable.v2.ReadModifyWriteRule.Builder addRulesBuilder() { return getRulesFieldBuilder() .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.
          * 
    * * @@ -1667,13 +1737,15 @@ public com.google.bigtable.v2.ReadModifyWriteRule.Builder addRulesBuilder(int in return getRulesFieldBuilder() .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.
          * 
    * * 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..07f822e273 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface ReadModifyWriteRowRequestOrBuilder @@ -42,6 +42,7 @@ public interface ReadModifyWriteRowRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -79,6 +80,7 @@ public interface ReadModifyWriteRowRequestOrBuilder * @return The authorizedViewName. */ java.lang.String getAuthorizedViewName(); + /** * * @@ -111,6 +113,7 @@ public interface ReadModifyWriteRowRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -145,7 +148,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 +157,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 +173,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 +189,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 +206,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..c980391be1 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class ReadModifyWriteRowResponse extends com.google.protobuf.Genera // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadModifyWriteRowResponse) ReadModifyWriteRowResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ReadModifyWriteRowResponse.newBuilder() to construct. private ReadModifyWriteRowResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -64,6 +65,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 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasRow() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -94,6 +97,7 @@ public boolean hasRow() { public com.google.bigtable.v2.Row getRow() { return row_ == null ? com.google.bigtable.v2.Row.getDefaultInstance() : row_; } + /** * * @@ -272,6 +276,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -475,6 +480,7 @@ public Builder mergeFrom( com.google.bigtable.v2.Row.Builder, com.google.bigtable.v2.RowOrBuilder> rowBuilder_; + /** * * @@ -489,6 +495,7 @@ public Builder mergeFrom( public boolean hasRow() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -507,6 +514,7 @@ public com.google.bigtable.v2.Row getRow() { return rowBuilder_.getMessage(); } } + /** * * @@ -529,6 +537,7 @@ public Builder setRow(com.google.bigtable.v2.Row value) { onChanged(); return this; } + /** * * @@ -548,6 +557,7 @@ public Builder setRow(com.google.bigtable.v2.Row.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -575,6 +585,7 @@ public Builder mergeRow(com.google.bigtable.v2.Row value) { } return this; } + /** * * @@ -594,6 +605,7 @@ public Builder clearRow() { onChanged(); return this; } + /** * * @@ -608,6 +620,7 @@ public com.google.bigtable.v2.Row.Builder getRowBuilder() { onChanged(); return getRowFieldBuilder().getBuilder(); } + /** * * @@ -624,6 +637,7 @@ public com.google.bigtable.v2.RowOrBuilder getRowOrBuilder() { return row_ == null ? com.google.bigtable.v2.Row.getDefaultInstance() : row_; } } + /** * * 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..dabb6d0ddd 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface ReadModifyWriteRowResponseOrBuilder @@ -36,6 +36,7 @@ public interface ReadModifyWriteRowResponseOrBuilder * @return Whether the row field is set. */ boolean hasRow(); + /** * * @@ -48,6 +49,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..c977bcc050 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -34,6 +34,7 @@ public final class ReadModifyWriteRule extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadModifyWriteRule) ReadModifyWriteRuleOrBuilder { private static final long serialVersionUID = 0L; + // Use ReadModifyWriteRule.newBuilder() to construct. private ReadModifyWriteRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -82,6 +83,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 +120,7 @@ public RuleCase getRuleCase() { @SuppressWarnings("serial") private volatile java.lang.Object familyName_ = ""; + /** * * @@ -142,6 +145,7 @@ public java.lang.String getFamilyName() { return s; } } + /** * * @@ -169,6 +173,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 +193,7 @@ public com.google.protobuf.ByteString getColumnQualifier() { } public static final int APPEND_VALUE_FIELD_NUMBER = 3; + /** * * @@ -205,6 +211,7 @@ public com.google.protobuf.ByteString getColumnQualifier() { public boolean hasAppendValue() { return ruleCase_ == 3; } + /** * * @@ -227,6 +234,7 @@ public com.google.protobuf.ByteString getAppendValue() { } public static final int INCREMENT_AMOUNT_FIELD_NUMBER = 4; + /** * * @@ -245,6 +253,7 @@ public com.google.protobuf.ByteString getAppendValue() { public boolean hasIncrementAmount() { return ruleCase_ == 4; } + /** * * @@ -474,6 +483,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -721,6 +731,7 @@ public Builder clearRule() { private int bitField0_; private java.lang.Object familyName_ = ""; + /** * * @@ -744,6 +755,7 @@ public java.lang.String getFamilyName() { return (java.lang.String) ref; } } + /** * * @@ -767,6 +779,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -789,6 +802,7 @@ public Builder setFamilyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -807,6 +821,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -832,6 +847,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString columnQualifier_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -849,6 +865,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getColumnQualifier() { return columnQualifier_; } + /** * * @@ -872,6 +889,7 @@ public Builder setColumnQualifier(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -908,6 +926,7 @@ public Builder clearColumnQualifier() { public boolean hasAppendValue() { return ruleCase_ == 3; } + /** * * @@ -927,6 +946,7 @@ public com.google.protobuf.ByteString getAppendValue() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -950,6 +970,7 @@ public Builder setAppendValue(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -989,6 +1010,7 @@ public Builder clearAppendValue() { public boolean hasIncrementAmount() { return ruleCase_ == 4; } + /** * * @@ -1009,6 +1031,7 @@ public long getIncrementAmount() { } return 0L; } + /** * * @@ -1031,6 +1054,7 @@ public Builder setIncrementAmount(long value) { onChanged(); return this; } + /** * * 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..6bd01a485d 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface ReadModifyWriteRuleOrBuilder @@ -37,6 +37,7 @@ public interface ReadModifyWriteRuleOrBuilder * @return The familyName. */ java.lang.String getFamilyName(); + /** * * @@ -80,6 +81,7 @@ public interface ReadModifyWriteRuleOrBuilder * @return Whether the appendValue field is set. */ boolean hasAppendValue(); + /** * * @@ -110,6 +112,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..fe00b5709e 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class ReadRowsRequest extends com.google.protobuf.GeneratedMessageV // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadRowsRequest) ReadRowsRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use ReadRowsRequest.newBuilder() to construct. private ReadRowsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -41,6 +42,7 @@ private ReadRowsRequest(com.google.protobuf.GeneratedMessageV3.Builder builde private ReadRowsRequest() { tableName_ = ""; authorizedViewName_ = ""; + materializedViewName_ = ""; appProfileId_ = ""; requestStatsView_ = 0; } @@ -123,6 +125,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 +137,7 @@ public enum RequestStatsView implements com.google.protobuf.ProtocolMessageEnum * REQUEST_STATS_NONE = 1; */ public static final int REQUEST_STATS_NONE_VALUE = 1; + /** * * @@ -236,6 +240,7 @@ private RequestStatsView(int value) { @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -264,6 +269,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -297,6 +303,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object authorizedViewName_ = ""; + /** * * @@ -325,6 +332,7 @@ public java.lang.String getAuthorizedViewName() { return s; } } + /** * * @@ -354,10 +362,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 +454,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -409,6 +482,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public static final int ROWS_FIELD_NUMBER = 2; private com.google.bigtable.v2.RowSet rows_; + /** * * @@ -425,6 +499,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public boolean hasRows() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -441,6 +516,7 @@ public boolean hasRows() { public com.google.bigtable.v2.RowSet getRows() { return rows_ == null ? com.google.bigtable.v2.RowSet.getDefaultInstance() : rows_; } + /** * * @@ -458,6 +534,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 +551,7 @@ public com.google.bigtable.v2.RowSetOrBuilder getRowsOrBuilder() { public boolean hasFilter() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -490,6 +568,7 @@ public boolean hasFilter() { public com.google.bigtable.v2.RowFilter getFilter() { return filter_ == null ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : filter_; } + /** * * @@ -507,6 +586,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { public static final int ROWS_LIMIT_FIELD_NUMBER = 4; private long rowsLimit_ = 0L; + /** * * @@ -526,6 +606,7 @@ public long getRowsLimit() { public static final int REQUEST_STATS_VIEW_FIELD_NUMBER = 6; private int requestStatsView_ = 0; + /** * * @@ -541,6 +622,7 @@ public long getRowsLimit() { public int getRequestStatsViewValue() { return requestStatsView_; } + /** * * @@ -563,6 +645,7 @@ public com.google.bigtable.v2.ReadRowsRequest.RequestStatsView getRequestStatsVi public static final int REVERSED_FIELD_NUMBER = 7; private boolean reversed_ = false; + /** * * @@ -630,6 +713,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, authorizedViewName_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(materializedViewName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, materializedViewName_); + } getUnknownFields().writeTo(output); } @@ -665,6 +751,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, authorizedViewName_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(materializedViewName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, materializedViewName_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -682,6 +771,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 +799,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()) { @@ -825,6 +917,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -876,6 +969,7 @@ public Builder clear() { bitField0_ = 0; tableName_ = ""; authorizedViewName_ = ""; + materializedViewName_ = ""; appProfileId_ = ""; rows_ = null; if (rowsBuilder_ != null) { @@ -933,24 +1027,27 @@ 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_; @@ -1011,9 +1108,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()) { @@ -1066,37 +1168,37 @@ public Builder mergeFrom( case 18: { input.readMessage(getRowsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 18 case 26: { input.readMessage(getFilterFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + 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 +1207,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 +1233,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -1152,6 +1261,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -1179,6 +1289,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1205,6 +1316,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1227,6 +1339,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -1256,6 +1369,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object authorizedViewName_ = ""; + /** * * @@ -1283,6 +1397,7 @@ public java.lang.String getAuthorizedViewName() { return (java.lang.String) ref; } } + /** * * @@ -1310,6 +1425,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1336,6 +1452,7 @@ public Builder setAuthorizedViewName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1358,6 +1475,7 @@ public Builder clearAuthorizedViewName() { onChanged(); return this; } + /** * * @@ -1386,7 +1504,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 +1665,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -1433,6 +1689,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1451,10 +1708,11 @@ public Builder setAppProfileId(java.lang.String value) { throw new NullPointerException(); } appProfileId_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } + /** * * @@ -1469,10 +1727,11 @@ public Builder setAppProfileId(java.lang.String value) { */ public Builder clearAppProfileId() { appProfileId_ = getDefaultInstance().getAppProfileId(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } + /** * * @@ -1492,7 +1751,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); appProfileId_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1503,6 +1762,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { com.google.bigtable.v2.RowSet.Builder, com.google.bigtable.v2.RowSetOrBuilder> rowsBuilder_; + /** * * @@ -1516,8 +1776,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 +1798,7 @@ public com.google.bigtable.v2.RowSet getRows() { return rowsBuilder_.getMessage(); } } + /** * * @@ -1556,10 +1818,11 @@ public Builder setRows(com.google.bigtable.v2.RowSet value) { } else { rowsBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } + /** * * @@ -1576,10 +1839,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 +1856,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 +1867,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 +1884,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 +1893,7 @@ public Builder clearRows() { onChanged(); return this; } + /** * * @@ -1639,10 +1905,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(); } + /** * * @@ -1660,6 +1927,7 @@ public com.google.bigtable.v2.RowSetOrBuilder getRowsOrBuilder() { return rows_ == null ? com.google.bigtable.v2.RowSet.getDefaultInstance() : rows_; } } + /** * * @@ -1693,6 +1961,7 @@ public com.google.bigtable.v2.RowSetOrBuilder getRowsOrBuilder() { com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> filterBuilder_; + /** * * @@ -1706,8 +1975,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 +1997,7 @@ public com.google.bigtable.v2.RowFilter getFilter() { return filterBuilder_.getMessage(); } } + /** * * @@ -1746,10 +2017,11 @@ public Builder setFilter(com.google.bigtable.v2.RowFilter value) { } else { filterBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } + /** * * @@ -1766,10 +2038,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 +2055,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 +2066,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 +2083,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 +2092,7 @@ public Builder clearFilter() { onChanged(); return this; } + /** * * @@ -1829,10 +2104,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(); } + /** * * @@ -1850,6 +2126,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { return filter_ == null ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : filter_; } } + /** * * @@ -1878,6 +2155,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { } private long rowsLimit_; + /** * * @@ -1894,6 +2172,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { public long getRowsLimit() { return rowsLimit_; } + /** * * @@ -1910,10 +2189,11 @@ public long getRowsLimit() { public Builder setRowsLimit(long value) { rowsLimit_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } + /** * * @@ -1927,13 +2207,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 +2230,7 @@ public Builder clearRowsLimit() { public int getRequestStatsViewValue() { return requestStatsView_; } + /** * * @@ -1963,10 +2245,11 @@ public int getRequestStatsViewValue() { */ public Builder setRequestStatsViewValue(int value) { requestStatsView_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } + /** * * @@ -1986,6 +2269,7 @@ public com.google.bigtable.v2.ReadRowsRequest.RequestStatsView getRequestStatsVi ? com.google.bigtable.v2.ReadRowsRequest.RequestStatsView.UNRECOGNIZED : result; } + /** * * @@ -2003,11 +2287,12 @@ public Builder setRequestStatsView( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; requestStatsView_ = value.getNumber(); onChanged(); return this; } + /** * * @@ -2020,13 +2305,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_; + /** * * @@ -2053,6 +2339,7 @@ public Builder clearRequestStatsView() { public boolean getReversed() { return reversed_; } + /** * * @@ -2079,10 +2366,11 @@ public boolean getReversed() { public Builder setReversed(boolean value) { reversed_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } + /** * * @@ -2106,7 +2394,7 @@ public Builder setReversed(boolean value) { * @return This builder for chaining. */ public Builder clearReversed() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); reversed_ = false; onChanged(); return this; 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..f7d99d0c7a 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface ReadRowsRequestOrBuilder @@ -41,6 +41,7 @@ public interface ReadRowsRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -76,6 +77,7 @@ public interface ReadRowsRequestOrBuilder * @return The authorizedViewName. */ java.lang.String getAuthorizedViewName(); + /** * * @@ -94,6 +96,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 +145,7 @@ public interface ReadRowsRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -134,6 +173,7 @@ public interface ReadRowsRequestOrBuilder * @return Whether the rows field is set. */ boolean hasRows(); + /** * * @@ -147,6 +187,7 @@ public interface ReadRowsRequestOrBuilder * @return The rows. */ com.google.bigtable.v2.RowSet getRows(); + /** * * @@ -172,6 +213,7 @@ public interface ReadRowsRequestOrBuilder * @return Whether the filter field is set. */ boolean hasFilter(); + /** * * @@ -185,6 +227,7 @@ public interface ReadRowsRequestOrBuilder * @return The filter. */ com.google.bigtable.v2.RowFilter getFilter(); + /** * * @@ -223,6 +266,7 @@ public interface ReadRowsRequestOrBuilder * @return The enum numeric value on the wire for requestStatsView. */ int getRequestStatsViewValue(); + /** * * 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..3b42ca1042 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class ReadRowsResponse extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadRowsResponse) ReadRowsResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use ReadRowsResponse.newBuilder() to construct. private ReadRowsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -102,6 +103,7 @@ public interface CellChunkOrBuilder * @return Whether the familyName field is set. */ boolean hasFamilyName(); + /** * * @@ -119,6 +121,7 @@ public interface CellChunkOrBuilder * @return The familyName. */ com.google.protobuf.StringValue getFamilyName(); + /** * * @@ -151,6 +154,7 @@ public interface CellChunkOrBuilder * @return Whether the qualifier field is set. */ boolean hasQualifier(); + /** * * @@ -167,6 +171,7 @@ public interface CellChunkOrBuilder * @return The qualifier. */ com.google.protobuf.BytesValue getQualifier(); + /** * * @@ -216,6 +221,7 @@ public interface CellChunkOrBuilder * @return A list containing the labels. */ java.util.List getLabelsList(); + /** * * @@ -230,6 +236,7 @@ public interface CellChunkOrBuilder * @return The count of labels. */ int getLabelsCount(); + /** * * @@ -245,6 +252,7 @@ public interface CellChunkOrBuilder * @return The labels at the given index. */ java.lang.String getLabels(int index); + /** * * @@ -307,6 +315,7 @@ public interface CellChunkOrBuilder * @return Whether the resetRow field is set. */ boolean hasResetRow(); + /** * * @@ -334,6 +343,7 @@ public interface CellChunkOrBuilder * @return Whether the commitRow field is set. */ boolean hasCommitRow(); + /** * * @@ -350,6 +360,7 @@ public interface CellChunkOrBuilder com.google.bigtable.v2.ReadRowsResponse.CellChunk.RowStatusCase getRowStatusCase(); } + /** * * @@ -365,6 +376,7 @@ public static final class CellChunk extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadRowsResponse.CellChunk) CellChunkOrBuilder { private static final long serialVersionUID = 0L; + // Use CellChunk.newBuilder() to construct. private CellChunk(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -415,6 +427,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 +462,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 +484,7 @@ public com.google.protobuf.ByteString getRowKey() { public static final int FAMILY_NAME_FIELD_NUMBER = 2; private com.google.protobuf.StringValue familyName_; + /** * * @@ -490,6 +505,7 @@ public com.google.protobuf.ByteString getRowKey() { public boolean hasFamilyName() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -512,6 +528,7 @@ public com.google.protobuf.StringValue getFamilyName() { ? com.google.protobuf.StringValue.getDefaultInstance() : familyName_; } + /** * * @@ -535,6 +552,7 @@ public com.google.protobuf.StringValueOrBuilder getFamilyNameOrBuilder() { public static final int QUALIFIER_FIELD_NUMBER = 3; private com.google.protobuf.BytesValue qualifier_; + /** * * @@ -554,6 +572,7 @@ public com.google.protobuf.StringValueOrBuilder getFamilyNameOrBuilder() { public boolean hasQualifier() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -573,6 +592,7 @@ public boolean hasQualifier() { public com.google.protobuf.BytesValue getQualifier() { return qualifier_ == null ? com.google.protobuf.BytesValue.getDefaultInstance() : qualifier_; } + /** * * @@ -593,6 +613,7 @@ public com.google.protobuf.BytesValueOrBuilder getQualifierOrBuilder() { public static final int TIMESTAMP_MICROS_FIELD_NUMBER = 4; private long timestampMicros_ = 0L; + /** * * @@ -621,6 +642,7 @@ public long getTimestampMicros() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList labels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -637,6 +659,7 @@ public long getTimestampMicros() { public com.google.protobuf.ProtocolStringList getLabelsList() { return labels_; } + /** * * @@ -653,6 +676,7 @@ public com.google.protobuf.ProtocolStringList getLabelsList() { public int getLabelsCount() { return labels_.size(); } + /** * * @@ -670,6 +694,7 @@ public int getLabelsCount() { public java.lang.String getLabels(int index) { return labels_.get(index); } + /** * * @@ -690,6 +715,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 +738,7 @@ public com.google.protobuf.ByteString getValue() { public static final int VALUE_SIZE_FIELD_NUMBER = 7; private int valueSize_ = 0; + /** * * @@ -732,6 +759,7 @@ public int getValueSize() { } public static final int RESET_ROW_FIELD_NUMBER = 8; + /** * * @@ -748,6 +776,7 @@ public int getValueSize() { public boolean hasResetRow() { return rowStatusCase_ == 8; } + /** * * @@ -769,6 +798,7 @@ public boolean getResetRow() { } public static final int COMMIT_ROW_FIELD_NUMBER = 9; + /** * * @@ -785,6 +815,7 @@ public boolean getResetRow() { public boolean hasCommitRow() { return rowStatusCase_ == 9; } + /** * * @@ -1075,6 +1106,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1421,6 +1453,7 @@ public Builder clearRowStatus() { private int bitField0_; private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -1439,6 +1472,7 @@ public Builder clearRowStatus() { public com.google.protobuf.ByteString getRowKey() { return rowKey_; } + /** * * @@ -1463,6 +1497,7 @@ public Builder setRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1490,6 +1525,7 @@ public Builder clearRowKey() { com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> familyNameBuilder_; + /** * * @@ -1509,6 +1545,7 @@ public Builder clearRowKey() { public boolean hasFamilyName() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1534,6 +1571,7 @@ public com.google.protobuf.StringValue getFamilyName() { return familyNameBuilder_.getMessage(); } } + /** * * @@ -1561,6 +1599,7 @@ public Builder setFamilyName(com.google.protobuf.StringValue value) { onChanged(); return this; } + /** * * @@ -1585,6 +1624,7 @@ public Builder setFamilyName(com.google.protobuf.StringValue.Builder builderForV onChanged(); return this; } + /** * * @@ -1617,6 +1657,7 @@ public Builder mergeFamilyName(com.google.protobuf.StringValue value) { } return this; } + /** * * @@ -1641,6 +1682,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -1660,6 +1702,7 @@ public com.google.protobuf.StringValue.Builder getFamilyNameBuilder() { onChanged(); return getFamilyNameFieldBuilder().getBuilder(); } + /** * * @@ -1683,6 +1726,7 @@ public com.google.protobuf.StringValueOrBuilder getFamilyNameOrBuilder() { : familyName_; } } + /** * * @@ -1720,6 +1764,7 @@ public com.google.protobuf.StringValueOrBuilder getFamilyNameOrBuilder() { com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> qualifierBuilder_; + /** * * @@ -1738,6 +1783,7 @@ public com.google.protobuf.StringValueOrBuilder getFamilyNameOrBuilder() { public boolean hasQualifier() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1762,6 +1808,7 @@ public com.google.protobuf.BytesValue getQualifier() { return qualifierBuilder_.getMessage(); } } + /** * * @@ -1788,6 +1835,7 @@ public Builder setQualifier(com.google.protobuf.BytesValue value) { onChanged(); return this; } + /** * * @@ -1811,6 +1859,7 @@ public Builder setQualifier(com.google.protobuf.BytesValue.Builder builderForVal onChanged(); return this; } + /** * * @@ -1842,6 +1891,7 @@ public Builder mergeQualifier(com.google.protobuf.BytesValue value) { } return this; } + /** * * @@ -1865,6 +1915,7 @@ public Builder clearQualifier() { onChanged(); return this; } + /** * * @@ -1883,6 +1934,7 @@ public com.google.protobuf.BytesValue.Builder getQualifierBuilder() { onChanged(); return getQualifierFieldBuilder().getBuilder(); } + /** * * @@ -1905,6 +1957,7 @@ public com.google.protobuf.BytesValueOrBuilder getQualifierOrBuilder() { : qualifier_; } } + /** * * @@ -1936,6 +1989,7 @@ public com.google.protobuf.BytesValueOrBuilder getQualifierOrBuilder() { } private long timestampMicros_; + /** * * @@ -1958,6 +2012,7 @@ public com.google.protobuf.BytesValueOrBuilder getQualifierOrBuilder() { public long getTimestampMicros() { return timestampMicros_; } + /** * * @@ -1984,6 +2039,7 @@ public Builder setTimestampMicros(long value) { onChanged(); return this; } + /** * * @@ -2018,6 +2074,7 @@ private void ensureLabelsIsMutable() { } bitField0_ |= 0x00000010; } + /** * * @@ -2035,6 +2092,7 @@ public com.google.protobuf.ProtocolStringList getLabelsList() { labels_.makeImmutable(); return labels_; } + /** * * @@ -2051,6 +2109,7 @@ public com.google.protobuf.ProtocolStringList getLabelsList() { public int getLabelsCount() { return labels_.size(); } + /** * * @@ -2068,6 +2127,7 @@ public int getLabelsCount() { public java.lang.String getLabels(int index) { return labels_.get(index); } + /** * * @@ -2085,6 +2145,7 @@ public java.lang.String getLabels(int index) { public com.google.protobuf.ByteString getLabelsBytes(int index) { return labels_.getByteString(index); } + /** * * @@ -2110,6 +2171,7 @@ public Builder setLabels(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -2134,6 +2196,7 @@ public Builder addLabels(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2155,6 +2218,7 @@ public Builder addAllLabels(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -2175,6 +2239,7 @@ public Builder clearLabels() { onChanged(); return this; } + /** * * @@ -2202,6 +2267,7 @@ public Builder addLabelsBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -2221,6 +2287,7 @@ public Builder addLabelsBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getValue() { return value_; } + /** * * @@ -2246,6 +2313,7 @@ public Builder setValue(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -2269,6 +2337,7 @@ public Builder clearValue() { } private int valueSize_; + /** * * @@ -2287,6 +2356,7 @@ public Builder clearValue() { public int getValueSize() { return valueSize_; } + /** * * @@ -2309,6 +2379,7 @@ public Builder setValueSize(int value) { onChanged(); return this; } + /** * * @@ -2345,6 +2416,7 @@ public Builder clearValueSize() { public boolean hasResetRow() { return rowStatusCase_ == 8; } + /** * * @@ -2363,6 +2435,7 @@ public boolean getResetRow() { } return false; } + /** * * @@ -2383,6 +2456,7 @@ public Builder setResetRow(boolean value) { onChanged(); return this; } + /** * * @@ -2419,6 +2493,7 @@ public Builder clearResetRow() { public boolean hasCommitRow() { return rowStatusCase_ == 9; } + /** * * @@ -2437,6 +2512,7 @@ public boolean getCommitRow() { } return false; } + /** * * @@ -2457,6 +2533,7 @@ public Builder setCommitRow(boolean value) { onChanged(); return this; } + /** * * @@ -2547,6 +2624,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunk getDefaultInstanceForTy @SuppressWarnings("serial") private java.util.List chunks_; + /** * * @@ -2560,6 +2638,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunk getDefaultInstanceForTy public java.util.List getChunksList() { return chunks_; } + /** * * @@ -2574,6 +2653,7 @@ public java.util.List getChun getChunksOrBuilderList() { return chunks_; } + /** * * @@ -2587,6 +2667,7 @@ public java.util.List getChun public int getChunksCount() { return chunks_.size(); } + /** * * @@ -2600,6 +2681,7 @@ public int getChunksCount() { public com.google.bigtable.v2.ReadRowsResponse.CellChunk getChunks(int index) { return chunks_.get(index); } + /** * * @@ -2616,6 +2698,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 +2723,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 +2743,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 +2765,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; @@ -2928,6 +2969,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -3233,6 +3275,7 @@ public java.util.List getChun return chunksBuilder_.getMessageList(); } } + /** * * @@ -3249,6 +3292,7 @@ public int getChunksCount() { return chunksBuilder_.getCount(); } } + /** * * @@ -3265,6 +3309,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunk getChunks(int index) { return chunksBuilder_.getMessage(index); } } + /** * * @@ -3287,6 +3332,7 @@ public Builder setChunks(int index, com.google.bigtable.v2.ReadRowsResponse.Cell } return this; } + /** * * @@ -3307,6 +3353,7 @@ public Builder setChunks( } return this; } + /** * * @@ -3329,6 +3376,7 @@ public Builder addChunks(com.google.bigtable.v2.ReadRowsResponse.CellChunk value } return this; } + /** * * @@ -3351,6 +3399,7 @@ public Builder addChunks(int index, com.google.bigtable.v2.ReadRowsResponse.Cell } return this; } + /** * * @@ -3371,6 +3420,7 @@ public Builder addChunks( } return this; } + /** * * @@ -3391,6 +3441,7 @@ public Builder addChunks( } return this; } + /** * * @@ -3411,6 +3462,7 @@ public Builder addAllChunks( } return this; } + /** * * @@ -3430,6 +3482,7 @@ public Builder clearChunks() { } return this; } + /** * * @@ -3449,6 +3502,7 @@ public Builder removeChunks(int index) { } return this; } + /** * * @@ -3461,6 +3515,7 @@ public Builder removeChunks(int index) { public com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder getChunksBuilder(int index) { return getChunksFieldBuilder().getBuilder(index); } + /** * * @@ -3478,6 +3533,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunkOrBuilder getChunksOrBui return chunksBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -3495,6 +3551,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunkOrBuilder getChunksOrBui return java.util.Collections.unmodifiableList(chunks_); } } + /** * * @@ -3508,6 +3565,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder addChunksBuilde return getChunksFieldBuilder() .addBuilder(com.google.bigtable.v2.ReadRowsResponse.CellChunk.getDefaultInstance()); } + /** * * @@ -3522,6 +3580,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder addChunksBuilde .addBuilder( index, com.google.bigtable.v2.ReadRowsResponse.CellChunk.getDefaultInstance()); } + /** * * @@ -3555,6 +3614,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder addChunksBuilde private com.google.protobuf.ByteString lastScannedRowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -3576,6 +3636,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder addChunksBuilde public com.google.protobuf.ByteString getLastScannedRowKey() { return lastScannedRowKey_; } + /** * * @@ -3603,6 +3664,7 @@ public Builder setLastScannedRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -3633,30 +3695,16 @@ public Builder clearLastScannedRowKey() { 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 +3714,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 +3739,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 +3766,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 +3790,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 +3822,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 +3846,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; @@ -3901,30 +3865,16 @@ public com.google.bigtable.v2.RequestStats.Builder getRequestStatsBuilder() { onChanged(); return getRequestStatsFieldBuilder().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,30 +3888,16 @@ 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; 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..022d26c8a9 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface ReadRowsResponseOrBuilder @@ -34,6 +34,7 @@ public interface ReadRowsResponseOrBuilder * repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; */ java.util.List getChunksList(); + /** * * @@ -44,6 +45,7 @@ public interface ReadRowsResponseOrBuilder * repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; */ com.google.bigtable.v2.ReadRowsResponse.CellChunk getChunks(int index); + /** * * @@ -54,6 +56,7 @@ public interface ReadRowsResponseOrBuilder * repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; */ int getChunksCount(); + /** * * @@ -65,6 +68,7 @@ public interface ReadRowsResponseOrBuilder */ java.util.List getChunksOrBuilderList(); + /** * * @@ -99,26 +103,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 +115,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 +132,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..771dba1a33 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/request_stats.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -35,6 +35,7 @@ public final class RequestLatencyStats extends com.google.protobuf.GeneratedMess // @@protoc_insertion_point(message_implements:google.bigtable.v2.RequestLatencyStats) RequestLatencyStatsOrBuilder { private static final long serialVersionUID = 0L; + // Use RequestLatencyStats.newBuilder() to construct. private RequestLatencyStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -66,6 +67,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 +99,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasFrontendServerLatency() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -130,6 +133,7 @@ public com.google.protobuf.Duration getFrontendServerLatency() { ? com.google.protobuf.Duration.getDefaultInstance() : frontendServerLatency_; } + /** * * @@ -327,6 +331,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -535,6 +540,7 @@ public Builder mergeFrom( com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> frontendServerLatencyBuilder_; + /** * * @@ -565,6 +571,7 @@ public Builder mergeFrom( public boolean hasFrontendServerLatency() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -601,6 +608,7 @@ public com.google.protobuf.Duration getFrontendServerLatency() { return frontendServerLatencyBuilder_.getMessage(); } } + /** * * @@ -639,6 +647,7 @@ public Builder setFrontendServerLatency(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -674,6 +683,7 @@ public Builder setFrontendServerLatency(com.google.protobuf.Duration.Builder bui onChanged(); return this; } + /** * * @@ -717,6 +727,7 @@ public Builder mergeFrontendServerLatency(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -752,6 +763,7 @@ public Builder clearFrontendServerLatency() { onChanged(); return this; } + /** * * @@ -782,6 +794,7 @@ public com.google.protobuf.Duration.Builder getFrontendServerLatencyBuilder() { onChanged(); return getFrontendServerLatencyFieldBuilder().getBuilder(); } + /** * * @@ -816,6 +829,7 @@ public com.google.protobuf.DurationOrBuilder getFrontendServerLatencyOrBuilder() : frontendServerLatency_; } } + /** * * 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..3020dc3860 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/request_stats.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface RequestLatencyStatsOrBuilder @@ -52,6 +52,7 @@ public interface RequestLatencyStatsOrBuilder * @return Whether the frontendServerLatency field is set. */ boolean hasFrontendServerLatency(); + /** * * @@ -80,6 +81,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..0048add5c0 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/request_stats.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -25,8 +25,7 @@ *
      * 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} @@ -36,6 +35,7 @@ public final class RequestStats extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.RequestStats) RequestStatsOrBuilder { private static final long serialVersionUID = 0L; + // Use RequestStats.newBuilder() to construct. private RequestStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -80,6 +80,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 +112,7 @@ public StatsViewCase getStatsViewCase() { } public static final int FULL_READ_STATS_VIEW_FIELD_NUMBER = 1; + /** * * @@ -127,6 +129,7 @@ public StatsViewCase getStatsViewCase() { public boolean hasFullReadStatsView() { return statsViewCase_ == 1; } + /** * * @@ -146,6 +149,7 @@ public com.google.bigtable.v2.FullReadStatsView getFullReadStatsView() { } return com.google.bigtable.v2.FullReadStatsView.getDefaultInstance(); } + /** * * @@ -336,14 +340,14 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build 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} @@ -556,6 +560,7 @@ public Builder clearStatsView() { com.google.bigtable.v2.FullReadStatsView.Builder, com.google.bigtable.v2.FullReadStatsViewOrBuilder> fullReadStatsViewBuilder_; + /** * * @@ -572,6 +577,7 @@ public Builder clearStatsView() { public boolean hasFullReadStatsView() { return statsViewCase_ == 1; } + /** * * @@ -598,6 +604,7 @@ public com.google.bigtable.v2.FullReadStatsView getFullReadStatsView() { return com.google.bigtable.v2.FullReadStatsView.getDefaultInstance(); } } + /** * * @@ -621,6 +628,7 @@ public Builder setFullReadStatsView(com.google.bigtable.v2.FullReadStatsView val statsViewCase_ = 1; return this; } + /** * * @@ -642,6 +650,7 @@ public Builder setFullReadStatsView( statsViewCase_ = 1; return this; } + /** * * @@ -675,6 +684,7 @@ public Builder mergeFullReadStatsView(com.google.bigtable.v2.FullReadStatsView v statsViewCase_ = 1; return this; } + /** * * @@ -701,6 +711,7 @@ public Builder clearFullReadStatsView() { } return this; } + /** * * @@ -714,6 +725,7 @@ public Builder clearFullReadStatsView() { public com.google.bigtable.v2.FullReadStatsView.Builder getFullReadStatsViewBuilder() { return getFullReadStatsViewFieldBuilder().getBuilder(); } + /** * * @@ -735,6 +747,7 @@ public com.google.bigtable.v2.FullReadStatsViewOrBuilder getFullReadStatsViewOrB return com.google.bigtable.v2.FullReadStatsView.getDefaultInstance(); } } + /** * * 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..a56efb88e5 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/request_stats.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface RequestStatsOrBuilder @@ -37,6 +37,7 @@ public interface RequestStatsOrBuilder * @return Whether the fullReadStatsView field is set. */ boolean hasFullReadStatsView(); + /** * * @@ -50,6 +51,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 8187370177..0109e7c9c0 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/request_stats.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public final class RequestStatsProto { @@ -67,12 +67,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".bigtable.v2.RequestLatencyStats\"c\n\014Requ" + "estStats\022E\n\024full_read_stats_view\030\001 \001(\0132%" + ".google.bigtable.v2.FullReadStatsViewH\000B" - + "\014\n\nstats_viewB\275\001\n\026com.google.bigtable.v2" - + "B\021RequestStatsProtoP\001Z:google.golang.org" - + "/genproto/googleapis/bigtable/v2;bigtabl" - + "e\252\002\030Google.Cloud.Bigtable.V2\312\002\030Google\\Cl" - + "oud\\Bigtable\\V2\352\002\033Google::Cloud::Bigtabl" - + "e::V2b\006proto3" + + "\014\n\nstats_viewB\273\001\n\026com.google.bigtable.v2" + + "B\021RequestStatsProtoP\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( 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..6be8cc99ae 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/response_params.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -24,9 +24,6 @@ * *
      * 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} @@ -36,6 +33,7 @@ public final class ResponseParams extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.ResponseParams) ResponseParamsOrBuilder { private static final long serialVersionUID = 0L; + // Use ResponseParams.newBuilder() to construct. private ResponseParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -72,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object zoneId_ = ""; + /** * * @@ -87,6 +86,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasZoneId() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -110,6 +110,7 @@ public java.lang.String getZoneId() { return s; } } + /** * * @@ -138,6 +139,7 @@ public com.google.protobuf.ByteString getZoneIdBytes() { @SuppressWarnings("serial") private volatile java.lang.Object clusterId_ = ""; + /** * * @@ -154,6 +156,7 @@ public com.google.protobuf.ByteString getZoneIdBytes() { public boolean hasClusterId() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -178,6 +181,7 @@ public java.lang.String getClusterId() { return s; } } + /** * * @@ -379,14 +383,12 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build 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} @@ -584,6 +586,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object zoneId_ = ""; + /** * * @@ -598,6 +601,7 @@ public Builder mergeFrom( public boolean hasZoneId() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -620,6 +624,7 @@ public java.lang.String getZoneId() { return (java.lang.String) ref; } } + /** * * @@ -642,6 +647,7 @@ public com.google.protobuf.ByteString getZoneIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -663,6 +669,7 @@ public Builder setZoneId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -680,6 +687,7 @@ public Builder clearZoneId() { onChanged(); return this; } + /** * * @@ -704,6 +712,7 @@ public Builder setZoneIdBytes(com.google.protobuf.ByteString value) { } private java.lang.Object clusterId_ = ""; + /** * * @@ -719,6 +728,7 @@ public Builder setZoneIdBytes(com.google.protobuf.ByteString value) { public boolean hasClusterId() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -742,6 +752,7 @@ public java.lang.String getClusterId() { return (java.lang.String) ref; } } + /** * * @@ -765,6 +776,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -787,6 +799,7 @@ public Builder setClusterId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -805,6 +818,7 @@ public Builder clearClusterId() { onChanged(); return this; } + /** * * 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..c2d417434b 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/response_params.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface ResponseParamsOrBuilder @@ -36,6 +36,7 @@ public interface ResponseParamsOrBuilder * @return Whether the zoneId field is set. */ boolean hasZoneId(); + /** * * @@ -48,6 +49,7 @@ public interface ResponseParamsOrBuilder * @return The zoneId. */ java.lang.String getZoneId(); + /** * * @@ -74,6 +76,7 @@ public interface ResponseParamsOrBuilder * @return Whether the clusterId field is set. */ boolean hasClusterId(); + /** * * @@ -87,6 +90,7 @@ public interface ResponseParamsOrBuilder * @return The clusterId. */ java.lang.String getClusterId(); + /** * * 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 9c27d28aaa..bd29d773f8 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/response_params.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public final class ResponseParamsProto { @@ -41,15 +41,18 @@ 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\277\001\n\026c" - + "om.google.bigtable.v2B\023ResponseParamsPro" - + "toP\001Z:google.golang.org/genproto/googlea" - + "pis/bigtable/v2;bigtable\252\002\030Google.Cloud." - + "Bigtable.V2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002" - + "\033Google::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\001B\n\n" + + "\010_zone_idB\r\n" + + "\013_cluster_idB\275\001\n" + + "\026com.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" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( 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 new file mode 100644 index 0000000000..dc52605eb1 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResultSetMetadata.java @@ -0,0 +1,827 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +/** + * + * + *
    + * Describes the structure of a Bigtable result set.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.ResultSetMetadata} + */ +public final class ResultSetMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ResultSetMetadata) + ResultSetMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ResultSetMetadata.newBuilder() to construct. + private ResultSetMetadata(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ResultSetMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ResultSetMetadata.class, + com.google.bigtable.v2.ResultSetMetadata.Builder.class); + } + + private int schemaCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object schema_; + + public enum SchemaCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PROTO_SCHEMA(1), + SCHEMA_NOT_SET(0); + private final int value; + + 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. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SchemaCase valueOf(int value) { + return forNumber(value); + } + + public static SchemaCase forNumber(int value) { + switch (value) { + case 1: + return PROTO_SCHEMA; + case 0: + return SCHEMA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SchemaCase getSchemaCase() { + return SchemaCase.forNumber(schemaCase_); + } + + public static final int PROTO_SCHEMA_FIELD_NUMBER = 1; + + /** + * + * + *
    +   * Schema in proto format
    +   * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + * + * @return Whether the protoSchema field is set. + */ + @java.lang.Override + public boolean hasProtoSchema() { + return schemaCase_ == 1; + } + + /** + * + * + *
    +   * Schema in proto format
    +   * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + * + * @return The protoSchema. + */ + @java.lang.Override + public com.google.bigtable.v2.ProtoSchema getProtoSchema() { + if (schemaCase_ == 1) { + return (com.google.bigtable.v2.ProtoSchema) schema_; + } + return com.google.bigtable.v2.ProtoSchema.getDefaultInstance(); + } + + /** + * + * + *
    +   * Schema in proto format
    +   * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.ProtoSchemaOrBuilder getProtoSchemaOrBuilder() { + if (schemaCase_ == 1) { + return (com.google.bigtable.v2.ProtoSchema) schema_; + } + return com.google.bigtable.v2.ProtoSchema.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 (schemaCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.v2.ProtoSchema) schema_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (schemaCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.ProtoSchema) schema_); + } + 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.ResultSetMetadata)) { + return super.equals(obj); + } + com.google.bigtable.v2.ResultSetMetadata other = (com.google.bigtable.v2.ResultSetMetadata) obj; + + if (!getSchemaCase().equals(other.getSchemaCase())) return false; + switch (schemaCase_) { + case 1: + 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(); + switch (schemaCase_) { + case 1: + 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.v2.ResultSetMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ResultSetMetadata 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.ResultSetMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ResultSetMetadata 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.ResultSetMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ResultSetMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ResultSetMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.ResultSetMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * Describes the structure of a Bigtable result set.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.ResultSetMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ResultSetMetadata) + com.google.bigtable.v2.ResultSetMetadataOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ResultSetMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ResultSetMetadata.class, + com.google.bigtable.v2.ResultSetMetadata.Builder.class); + } + + // Construct using com.google.bigtable.v2.ResultSetMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (protoSchemaBuilder_ != null) { + protoSchemaBuilder_.clear(); + } + schemaCase_ = 0; + schema_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_ResultSetMetadata_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.ResultSetMetadata getDefaultInstanceForType() { + return com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.ResultSetMetadata build() { + com.google.bigtable.v2.ResultSetMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.ResultSetMetadata buildPartial() { + com.google.bigtable.v2.ResultSetMetadata result = + new com.google.bigtable.v2.ResultSetMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.ResultSetMetadata result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.ResultSetMetadata result) { + result.schemaCase_ = schemaCase_; + result.schema_ = this.schema_; + if (schemaCase_ == 1 && protoSchemaBuilder_ != null) { + result.schema_ = protoSchemaBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.ResultSetMetadata) { + return mergeFrom((com.google.bigtable.v2.ResultSetMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.ResultSetMetadata other) { + if (other == com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance()) return this; + switch (other.getSchemaCase()) { + case PROTO_SCHEMA: + { + mergeProtoSchema(other.getProtoSchema()); + break; + } + case SCHEMA_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(getProtoSchemaFieldBuilder().getBuilder(), extensionRegistry); + schemaCase_ = 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 schemaCase_ = 0; + private java.lang.Object schema_; + + public SchemaCase getSchemaCase() { + return SchemaCase.forNumber(schemaCase_); + } + + public Builder clearSchema() { + schemaCase_ = 0; + schema_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ProtoSchema, + com.google.bigtable.v2.ProtoSchema.Builder, + com.google.bigtable.v2.ProtoSchemaOrBuilder> + protoSchemaBuilder_; + + /** + * + * + *
    +     * Schema in proto format
    +     * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + * + * @return Whether the protoSchema field is set. + */ + @java.lang.Override + public boolean hasProtoSchema() { + return schemaCase_ == 1; + } + + /** + * + * + *
    +     * Schema in proto format
    +     * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + * + * @return The protoSchema. + */ + @java.lang.Override + public com.google.bigtable.v2.ProtoSchema getProtoSchema() { + if (protoSchemaBuilder_ == null) { + if (schemaCase_ == 1) { + return (com.google.bigtable.v2.ProtoSchema) schema_; + } + return com.google.bigtable.v2.ProtoSchema.getDefaultInstance(); + } else { + if (schemaCase_ == 1) { + return protoSchemaBuilder_.getMessage(); + } + return com.google.bigtable.v2.ProtoSchema.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Schema in proto format
    +     * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + */ + public Builder setProtoSchema(com.google.bigtable.v2.ProtoSchema value) { + if (protoSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + onChanged(); + } else { + protoSchemaBuilder_.setMessage(value); + } + schemaCase_ = 1; + return this; + } + + /** + * + * + *
    +     * Schema in proto format
    +     * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + */ + public Builder setProtoSchema(com.google.bigtable.v2.ProtoSchema.Builder builderForValue) { + if (protoSchemaBuilder_ == null) { + schema_ = builderForValue.build(); + onChanged(); + } else { + protoSchemaBuilder_.setMessage(builderForValue.build()); + } + schemaCase_ = 1; + return this; + } + + /** + * + * + *
    +     * Schema in proto format
    +     * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + */ + public Builder mergeProtoSchema(com.google.bigtable.v2.ProtoSchema value) { + if (protoSchemaBuilder_ == null) { + if (schemaCase_ == 1 + && schema_ != com.google.bigtable.v2.ProtoSchema.getDefaultInstance()) { + schema_ = + com.google.bigtable.v2.ProtoSchema.newBuilder( + (com.google.bigtable.v2.ProtoSchema) schema_) + .mergeFrom(value) + .buildPartial(); + } else { + schema_ = value; + } + onChanged(); + } else { + if (schemaCase_ == 1) { + protoSchemaBuilder_.mergeFrom(value); + } else { + protoSchemaBuilder_.setMessage(value); + } + } + schemaCase_ = 1; + return this; + } + + /** + * + * + *
    +     * Schema in proto format
    +     * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + */ + public Builder clearProtoSchema() { + if (protoSchemaBuilder_ == null) { + if (schemaCase_ == 1) { + schemaCase_ = 0; + schema_ = null; + onChanged(); + } + } else { + if (schemaCase_ == 1) { + schemaCase_ = 0; + schema_ = null; + } + protoSchemaBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Schema in proto format
    +     * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + */ + public com.google.bigtable.v2.ProtoSchema.Builder getProtoSchemaBuilder() { + return getProtoSchemaFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Schema in proto format
    +     * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.ProtoSchemaOrBuilder getProtoSchemaOrBuilder() { + if ((schemaCase_ == 1) && (protoSchemaBuilder_ != null)) { + return protoSchemaBuilder_.getMessageOrBuilder(); + } else { + if (schemaCase_ == 1) { + return (com.google.bigtable.v2.ProtoSchema) schema_; + } + return com.google.bigtable.v2.ProtoSchema.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Schema in proto format
    +     * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ProtoSchema, + com.google.bigtable.v2.ProtoSchema.Builder, + com.google.bigtable.v2.ProtoSchemaOrBuilder> + getProtoSchemaFieldBuilder() { + if (protoSchemaBuilder_ == null) { + if (!(schemaCase_ == 1)) { + schema_ = com.google.bigtable.v2.ProtoSchema.getDefaultInstance(); + } + protoSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ProtoSchema, + com.google.bigtable.v2.ProtoSchema.Builder, + com.google.bigtable.v2.ProtoSchemaOrBuilder>( + (com.google.bigtable.v2.ProtoSchema) schema_, getParentForChildren(), isClean()); + schema_ = null; + } + schemaCase_ = 1; + onChanged(); + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ResultSetMetadata) + private static final com.google.bigtable.v2.ResultSetMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.ResultSetMetadata(); + } + + public static com.google.bigtable.v2.ResultSetMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResultSetMetadata 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.ResultSetMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} 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 new file mode 100644 index 0000000000..e241120763 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResultSetMetadataOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +public interface ResultSetMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ResultSetMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Schema in proto format
    +   * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + * + * @return Whether the protoSchema field is set. + */ + boolean hasProtoSchema(); + + /** + * + * + *
    +   * Schema in proto format
    +   * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + * + * @return The protoSchema. + */ + com.google.bigtable.v2.ProtoSchema getProtoSchema(); + + /** + * + * + *
    +   * Schema in proto format
    +   * 
    + * + * .google.bigtable.v2.ProtoSchema proto_schema = 1; + */ + com.google.bigtable.v2.ProtoSchemaOrBuilder getProtoSchemaOrBuilder(); + + com.google.bigtable.v2.ResultSetMetadata.SchemaCase getSchemaCase(); +} 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..e49a67a8ef 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -34,6 +34,7 @@ public final class Row extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.Row) RowOrBuilder { private static final long serialVersionUID = 0L; + // Use Row.newBuilder() to construct. private Row(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,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 +89,7 @@ public com.google.protobuf.ByteString getKey() { @SuppressWarnings("serial") private java.util.List families_; + /** * * @@ -101,6 +104,7 @@ public com.google.protobuf.ByteString getKey() { public java.util.List getFamiliesList() { return families_; } + /** * * @@ -116,6 +120,7 @@ public java.util.List getFamiliesList() { getFamiliesOrBuilderList() { return families_; } + /** * * @@ -130,6 +135,7 @@ public java.util.List getFamiliesList() { public int getFamiliesCount() { return families_.size(); } + /** * * @@ -144,6 +150,7 @@ public int getFamiliesCount() { public com.google.bigtable.v2.Family getFamilies(int index) { return families_.get(index); } + /** * * @@ -327,6 +334,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -564,6 +572,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -581,6 +590,7 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getKey() { return key_; } + /** * * @@ -604,6 +614,7 @@ public Builder setKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -657,6 +668,7 @@ public java.util.List getFamiliesList() { return familiesBuilder_.getMessageList(); } } + /** * * @@ -674,6 +686,7 @@ public int getFamiliesCount() { return familiesBuilder_.getCount(); } } + /** * * @@ -691,6 +704,7 @@ public com.google.bigtable.v2.Family getFamilies(int index) { return familiesBuilder_.getMessage(index); } } + /** * * @@ -714,6 +728,7 @@ public Builder setFamilies(int index, com.google.bigtable.v2.Family value) { } return this; } + /** * * @@ -734,6 +749,7 @@ public Builder setFamilies(int index, com.google.bigtable.v2.Family.Builder buil } return this; } + /** * * @@ -757,6 +773,7 @@ public Builder addFamilies(com.google.bigtable.v2.Family value) { } return this; } + /** * * @@ -780,6 +797,7 @@ public Builder addFamilies(int index, com.google.bigtable.v2.Family value) { } return this; } + /** * * @@ -800,6 +818,7 @@ public Builder addFamilies(com.google.bigtable.v2.Family.Builder builderForValue } return this; } + /** * * @@ -820,6 +839,7 @@ public Builder addFamilies(int index, com.google.bigtable.v2.Family.Builder buil } return this; } + /** * * @@ -841,6 +861,7 @@ public Builder addAllFamilies( } return this; } + /** * * @@ -861,6 +882,7 @@ public Builder clearFamilies() { } return this; } + /** * * @@ -881,6 +903,7 @@ public Builder removeFamilies(int index) { } return this; } + /** * * @@ -894,6 +917,7 @@ public Builder removeFamilies(int index) { public com.google.bigtable.v2.Family.Builder getFamiliesBuilder(int index) { return getFamiliesFieldBuilder().getBuilder(index); } + /** * * @@ -911,6 +935,7 @@ public com.google.bigtable.v2.FamilyOrBuilder getFamiliesOrBuilder(int index) { return familiesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -929,6 +954,7 @@ public com.google.bigtable.v2.FamilyOrBuilder getFamiliesOrBuilder(int index) { return java.util.Collections.unmodifiableList(families_); } } + /** * * @@ -943,6 +969,7 @@ public com.google.bigtable.v2.Family.Builder addFamiliesBuilder() { return getFamiliesFieldBuilder() .addBuilder(com.google.bigtable.v2.Family.getDefaultInstance()); } + /** * * @@ -957,6 +984,7 @@ public com.google.bigtable.v2.Family.Builder addFamiliesBuilder(int index) { return getFamiliesFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Family.getDefaultInstance()); } + /** * * 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..d7b526b06d 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -65,6 +65,7 @@ public final class RowFilter extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.RowFilter) RowFilterOrBuilder { private static final long serialVersionUID = 0L; + // Use RowFilter.newBuilder() to construct. private RowFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -108,6 +109,7 @@ public interface ChainOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ java.util.List getFiltersList(); + /** * * @@ -120,6 +122,7 @@ public interface ChainOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ com.google.bigtable.v2.RowFilter getFilters(int index); + /** * * @@ -132,6 +135,7 @@ public interface ChainOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ int getFiltersCount(); + /** * * @@ -144,6 +148,7 @@ public interface ChainOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ java.util.List getFiltersOrBuilderList(); + /** * * @@ -157,6 +162,7 @@ public interface ChainOrBuilder */ com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index); } + /** * * @@ -171,6 +177,7 @@ public static final class Chain extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.RowFilter.Chain) ChainOrBuilder { private static final long serialVersionUID = 0L; + // Use Chain.newBuilder() to construct. private Chain(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -205,6 +212,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List filters_; + /** * * @@ -220,6 +228,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getFiltersList() { return filters_; } + /** * * @@ -236,6 +245,7 @@ public java.util.List getFiltersList() { getFiltersOrBuilderList() { return filters_; } + /** * * @@ -251,6 +261,7 @@ public java.util.List getFiltersList() { public int getFiltersCount() { return filters_.size(); } + /** * * @@ -266,6 +277,7 @@ public int getFiltersCount() { public com.google.bigtable.v2.RowFilter getFilters(int index) { return filters_.get(index); } + /** * * @@ -443,6 +455,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -707,6 +720,7 @@ public java.util.List getFiltersList() { return filtersBuilder_.getMessageList(); } } + /** * * @@ -725,6 +739,7 @@ public int getFiltersCount() { return filtersBuilder_.getCount(); } } + /** * * @@ -743,6 +758,7 @@ public com.google.bigtable.v2.RowFilter getFilters(int index) { return filtersBuilder_.getMessage(index); } } + /** * * @@ -767,6 +783,7 @@ public Builder setFilters(int index, com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -789,6 +806,7 @@ public Builder setFilters( } return this; } + /** * * @@ -813,6 +831,7 @@ public Builder addFilters(com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -837,6 +856,7 @@ public Builder addFilters(int index, com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -858,6 +878,7 @@ public Builder addFilters(com.google.bigtable.v2.RowFilter.Builder builderForVal } return this; } + /** * * @@ -880,6 +901,7 @@ public Builder addFilters( } return this; } + /** * * @@ -902,6 +924,7 @@ public Builder addAllFilters( } return this; } + /** * * @@ -923,6 +946,7 @@ public Builder clearFilters() { } return this; } + /** * * @@ -944,6 +968,7 @@ public Builder removeFilters(int index) { } return this; } + /** * * @@ -958,6 +983,7 @@ public Builder removeFilters(int index) { public com.google.bigtable.v2.RowFilter.Builder getFiltersBuilder(int index) { return getFiltersFieldBuilder().getBuilder(index); } + /** * * @@ -976,6 +1002,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index) return filtersBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -995,6 +1022,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index) return java.util.Collections.unmodifiableList(filters_); } } + /** * * @@ -1010,6 +1038,7 @@ public com.google.bigtable.v2.RowFilter.Builder addFiltersBuilder() { return getFiltersFieldBuilder() .addBuilder(com.google.bigtable.v2.RowFilter.getDefaultInstance()); } + /** * * @@ -1025,6 +1054,7 @@ public com.google.bigtable.v2.RowFilter.Builder addFiltersBuilder(int index) { return getFiltersFieldBuilder() .addBuilder(index, com.google.bigtable.v2.RowFilter.getDefaultInstance()); } + /** * * @@ -1160,6 +1190,7 @@ public interface InterleaveOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ java.util.List getFiltersList(); + /** * * @@ -1194,6 +1225,7 @@ public interface InterleaveOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ com.google.bigtable.v2.RowFilter getFilters(int index); + /** * * @@ -1228,6 +1260,7 @@ public interface InterleaveOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ int getFiltersCount(); + /** * * @@ -1262,6 +1295,7 @@ public interface InterleaveOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ java.util.List getFiltersOrBuilderList(); + /** * * @@ -1297,6 +1331,7 @@ public interface InterleaveOrBuilder */ com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index); } + /** * * @@ -1312,6 +1347,7 @@ public static final class Interleave extends com.google.protobuf.GeneratedMessag // @@protoc_insertion_point(message_implements:google.bigtable.v2.RowFilter.Interleave) InterleaveOrBuilder { private static final long serialVersionUID = 0L; + // Use Interleave.newBuilder() to construct. private Interleave(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -1346,6 +1382,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List filters_; + /** * * @@ -1383,6 +1420,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getFiltersList() { return filters_; } + /** * * @@ -1421,6 +1459,7 @@ public java.util.List getFiltersList() { getFiltersOrBuilderList() { return filters_; } + /** * * @@ -1458,6 +1497,7 @@ public java.util.List getFiltersList() { public int getFiltersCount() { return filters_.size(); } + /** * * @@ -1495,6 +1535,7 @@ public int getFiltersCount() { public com.google.bigtable.v2.RowFilter getFilters(int index) { return filters_.get(index); } + /** * * @@ -1695,6 +1736,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -1982,6 +2024,7 @@ public java.util.List getFiltersList() { return filtersBuilder_.getMessageList(); } } + /** * * @@ -2022,6 +2065,7 @@ public int getFiltersCount() { return filtersBuilder_.getCount(); } } + /** * * @@ -2062,6 +2106,7 @@ public com.google.bigtable.v2.RowFilter getFilters(int index) { return filtersBuilder_.getMessage(index); } } + /** * * @@ -2108,6 +2153,7 @@ public Builder setFilters(int index, com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -2152,6 +2198,7 @@ public Builder setFilters( } return this; } + /** * * @@ -2198,6 +2245,7 @@ public Builder addFilters(com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -2244,6 +2292,7 @@ public Builder addFilters(int index, com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -2287,6 +2336,7 @@ public Builder addFilters(com.google.bigtable.v2.RowFilter.Builder builderForVal } return this; } + /** * * @@ -2331,6 +2381,7 @@ public Builder addFilters( } return this; } + /** * * @@ -2375,6 +2426,7 @@ public Builder addAllFilters( } return this; } + /** * * @@ -2418,6 +2470,7 @@ public Builder clearFilters() { } return this; } + /** * * @@ -2461,6 +2514,7 @@ public Builder removeFilters(int index) { } return this; } + /** * * @@ -2497,6 +2551,7 @@ public Builder removeFilters(int index) { public com.google.bigtable.v2.RowFilter.Builder getFiltersBuilder(int index) { return getFiltersFieldBuilder().getBuilder(index); } + /** * * @@ -2537,6 +2592,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index) return filtersBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -2578,6 +2634,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index) return java.util.Collections.unmodifiableList(filters_); } } + /** * * @@ -2615,6 +2672,7 @@ public com.google.bigtable.v2.RowFilter.Builder addFiltersBuilder() { return getFiltersFieldBuilder() .addBuilder(com.google.bigtable.v2.RowFilter.getDefaultInstance()); } + /** * * @@ -2652,6 +2710,7 @@ public com.google.bigtable.v2.RowFilter.Builder addFiltersBuilder(int index) { return getFiltersFieldBuilder() .addBuilder(index, com.google.bigtable.v2.RowFilter.getDefaultInstance()); } + /** * * @@ -2788,6 +2847,7 @@ public interface ConditionOrBuilder * @return Whether the predicateFilter field is set. */ boolean hasPredicateFilter(); + /** * * @@ -2801,6 +2861,7 @@ public interface ConditionOrBuilder * @return The predicateFilter. */ com.google.bigtable.v2.RowFilter getPredicateFilter(); + /** * * @@ -2826,6 +2887,7 @@ public interface ConditionOrBuilder * @return Whether the trueFilter field is set. */ boolean hasTrueFilter(); + /** * * @@ -2839,6 +2901,7 @@ public interface ConditionOrBuilder * @return The trueFilter. */ com.google.bigtable.v2.RowFilter getTrueFilter(); + /** * * @@ -2865,6 +2928,7 @@ public interface ConditionOrBuilder * @return Whether the falseFilter field is set. */ boolean hasFalseFilter(); + /** * * @@ -2879,6 +2943,7 @@ public interface ConditionOrBuilder * @return The falseFilter. */ com.google.bigtable.v2.RowFilter getFalseFilter(); + /** * * @@ -2892,6 +2957,7 @@ public interface ConditionOrBuilder */ com.google.bigtable.v2.RowFilterOrBuilder getFalseFilterOrBuilder(); } + /** * * @@ -2912,6 +2978,7 @@ public static final class Condition extends com.google.protobuf.GeneratedMessage // @@protoc_insertion_point(message_implements:google.bigtable.v2.RowFilter.Condition) ConditionOrBuilder { private static final long serialVersionUID = 0L; + // Use Condition.newBuilder() to construct. private Condition(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -2943,6 +3010,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 +3027,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasPredicateFilter() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2977,6 +3046,7 @@ public com.google.bigtable.v2.RowFilter getPredicateFilter() { ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : predicateFilter_; } + /** * * @@ -2996,6 +3066,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 +3083,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { public boolean hasTrueFilter() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -3030,6 +3102,7 @@ public com.google.bigtable.v2.RowFilter getTrueFilter() { ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : trueFilter_; } + /** * * @@ -3049,6 +3122,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 +3140,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getTrueFilterOrBuilder() { public boolean hasFalseFilter() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -3085,6 +3160,7 @@ public com.google.bigtable.v2.RowFilter getFalseFilter() { ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : falseFilter_; } + /** * * @@ -3296,6 +3372,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** * * @@ -3549,6 +3626,7 @@ public Builder mergeFrom( com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> predicateFilterBuilder_; + /** * * @@ -3564,6 +3642,7 @@ public Builder mergeFrom( public boolean hasPredicateFilter() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -3585,6 +3664,7 @@ public com.google.bigtable.v2.RowFilter getPredicateFilter() { return predicateFilterBuilder_.getMessage(); } } + /** * * @@ -3608,6 +3688,7 @@ public Builder setPredicateFilter(com.google.bigtable.v2.RowFilter value) { onChanged(); return this; } + /** * * @@ -3628,6 +3709,7 @@ public Builder setPredicateFilter(com.google.bigtable.v2.RowFilter.Builder build onChanged(); return this; } + /** * * @@ -3656,6 +3738,7 @@ public Builder mergePredicateFilter(com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -3676,6 +3759,7 @@ public Builder clearPredicateFilter() { onChanged(); return this; } + /** * * @@ -3691,6 +3775,7 @@ public com.google.bigtable.v2.RowFilter.Builder getPredicateFilterBuilder() { onChanged(); return getPredicateFilterFieldBuilder().getBuilder(); } + /** * * @@ -3710,6 +3795,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { : predicateFilter_; } } + /** * * @@ -3743,6 +3829,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> trueFilterBuilder_; + /** * * @@ -3758,6 +3845,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { public boolean hasTrueFilter() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -3779,6 +3867,7 @@ public com.google.bigtable.v2.RowFilter getTrueFilter() { return trueFilterBuilder_.getMessage(); } } + /** * * @@ -3802,6 +3891,7 @@ public Builder setTrueFilter(com.google.bigtable.v2.RowFilter value) { onChanged(); return this; } + /** * * @@ -3822,6 +3912,7 @@ public Builder setTrueFilter(com.google.bigtable.v2.RowFilter.Builder builderFor onChanged(); return this; } + /** * * @@ -3850,6 +3941,7 @@ public Builder mergeTrueFilter(com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -3870,6 +3962,7 @@ public Builder clearTrueFilter() { onChanged(); return this; } + /** * * @@ -3885,6 +3978,7 @@ public com.google.bigtable.v2.RowFilter.Builder getTrueFilterBuilder() { onChanged(); return getTrueFilterFieldBuilder().getBuilder(); } + /** * * @@ -3904,6 +3998,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getTrueFilterOrBuilder() { : trueFilter_; } } + /** * * @@ -3937,6 +4032,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getTrueFilterOrBuilder() { com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> falseFilterBuilder_; + /** * * @@ -3953,6 +4049,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getTrueFilterOrBuilder() { public boolean hasFalseFilter() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -3975,6 +4072,7 @@ public com.google.bigtable.v2.RowFilter getFalseFilter() { return falseFilterBuilder_.getMessage(); } } + /** * * @@ -3999,6 +4097,7 @@ public Builder setFalseFilter(com.google.bigtable.v2.RowFilter value) { onChanged(); return this; } + /** * * @@ -4020,6 +4119,7 @@ public Builder setFalseFilter(com.google.bigtable.v2.RowFilter.Builder builderFo onChanged(); return this; } + /** * * @@ -4049,6 +4149,7 @@ public Builder mergeFalseFilter(com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -4070,6 +4171,7 @@ public Builder clearFalseFilter() { onChanged(); return this; } + /** * * @@ -4086,6 +4188,7 @@ public com.google.bigtable.v2.RowFilter.Builder getFalseFilterBuilder() { onChanged(); return getFalseFilterFieldBuilder().getBuilder(); } + /** * * @@ -4106,6 +4209,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFalseFilterOrBuilder() { : falseFilter_; } } + /** * * @@ -4232,6 +4336,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 +4404,7 @@ public FilterCase getFilterCase() { } public static final int CHAIN_FIELD_NUMBER = 1; + /** * * @@ -4315,6 +4421,7 @@ public FilterCase getFilterCase() { public boolean hasChain() { return filterCase_ == 1; } + /** * * @@ -4334,6 +4441,7 @@ public com.google.bigtable.v2.RowFilter.Chain getChain() { } return com.google.bigtable.v2.RowFilter.Chain.getDefaultInstance(); } + /** * * @@ -4353,6 +4461,7 @@ public com.google.bigtable.v2.RowFilter.ChainOrBuilder getChainOrBuilder() { } public static final int INTERLEAVE_FIELD_NUMBER = 2; + /** * * @@ -4369,6 +4478,7 @@ public com.google.bigtable.v2.RowFilter.ChainOrBuilder getChainOrBuilder() { public boolean hasInterleave() { return filterCase_ == 2; } + /** * * @@ -4388,6 +4498,7 @@ public com.google.bigtable.v2.RowFilter.Interleave getInterleave() { } return com.google.bigtable.v2.RowFilter.Interleave.getDefaultInstance(); } + /** * * @@ -4407,6 +4518,7 @@ public com.google.bigtable.v2.RowFilter.InterleaveOrBuilder getInterleaveOrBuild } public static final int CONDITION_FIELD_NUMBER = 3; + /** * * @@ -4423,6 +4535,7 @@ public com.google.bigtable.v2.RowFilter.InterleaveOrBuilder getInterleaveOrBuild public boolean hasCondition() { return filterCase_ == 3; } + /** * * @@ -4442,6 +4555,7 @@ public com.google.bigtable.v2.RowFilter.Condition getCondition() { } return com.google.bigtable.v2.RowFilter.Condition.getDefaultInstance(); } + /** * * @@ -4461,6 +4575,7 @@ public com.google.bigtable.v2.RowFilter.ConditionOrBuilder getConditionOrBuilder } public static final int SINK_FIELD_NUMBER = 16; + /** * * @@ -4534,6 +4649,7 @@ public com.google.bigtable.v2.RowFilter.ConditionOrBuilder getConditionOrBuilder public boolean hasSink() { return filterCase_ == 16; } + /** * * @@ -4612,6 +4728,7 @@ public boolean getSink() { } public static final int PASS_ALL_FILTER_FIELD_NUMBER = 17; + /** * * @@ -4628,6 +4745,7 @@ public boolean getSink() { public boolean hasPassAllFilter() { return filterCase_ == 17; } + /** * * @@ -4649,6 +4767,7 @@ public boolean getPassAllFilter() { } public static final int BLOCK_ALL_FILTER_FIELD_NUMBER = 18; + /** * * @@ -4665,6 +4784,7 @@ public boolean getPassAllFilter() { public boolean hasBlockAllFilter() { return filterCase_ == 18; } + /** * * @@ -4686,6 +4806,7 @@ public boolean getBlockAllFilter() { } public static final int ROW_KEY_REGEX_FILTER_FIELD_NUMBER = 4; + /** * * @@ -4707,6 +4828,7 @@ public boolean getBlockAllFilter() { public boolean hasRowKeyRegexFilter() { return filterCase_ == 4; } + /** * * @@ -4733,6 +4855,7 @@ public com.google.protobuf.ByteString getRowKeyRegexFilter() { } public static final int ROW_SAMPLE_FILTER_FIELD_NUMBER = 14; + /** * * @@ -4749,6 +4872,7 @@ public com.google.protobuf.ByteString getRowKeyRegexFilter() { public boolean hasRowSampleFilter() { return filterCase_ == 14; } + /** * * @@ -4770,6 +4894,7 @@ public double getRowSampleFilter() { } public static final int FAMILY_NAME_REGEX_FILTER_FIELD_NUMBER = 5; + /** * * @@ -4789,6 +4914,7 @@ public double getRowSampleFilter() { public boolean hasFamilyNameRegexFilter() { return filterCase_ == 5; } + /** * * @@ -4821,6 +4947,7 @@ public java.lang.String getFamilyNameRegexFilter() { return s; } } + /** * * @@ -4855,6 +4982,7 @@ public com.google.protobuf.ByteString getFamilyNameRegexFilterBytes() { } public static final int COLUMN_QUALIFIER_REGEX_FILTER_FIELD_NUMBER = 6; + /** * * @@ -4875,6 +5003,7 @@ public com.google.protobuf.ByteString getFamilyNameRegexFilterBytes() { public boolean hasColumnQualifierRegexFilter() { return filterCase_ == 6; } + /** * * @@ -4900,6 +5029,7 @@ public com.google.protobuf.ByteString getColumnQualifierRegexFilter() { } public static final int COLUMN_RANGE_FILTER_FIELD_NUMBER = 7; + /** * * @@ -4915,6 +5045,7 @@ public com.google.protobuf.ByteString getColumnQualifierRegexFilter() { public boolean hasColumnRangeFilter() { return filterCase_ == 7; } + /** * * @@ -4933,6 +5064,7 @@ public com.google.bigtable.v2.ColumnRange getColumnRangeFilter() { } return com.google.bigtable.v2.ColumnRange.getDefaultInstance(); } + /** * * @@ -4951,6 +5083,7 @@ public com.google.bigtable.v2.ColumnRangeOrBuilder getColumnRangeFilterOrBuilder } public static final int TIMESTAMP_RANGE_FILTER_FIELD_NUMBER = 8; + /** * * @@ -4966,6 +5099,7 @@ public com.google.bigtable.v2.ColumnRangeOrBuilder getColumnRangeFilterOrBuilder public boolean hasTimestampRangeFilter() { return filterCase_ == 8; } + /** * * @@ -4984,6 +5118,7 @@ public com.google.bigtable.v2.TimestampRange getTimestampRangeFilter() { } return com.google.bigtable.v2.TimestampRange.getDefaultInstance(); } + /** * * @@ -5002,6 +5137,7 @@ public com.google.bigtable.v2.TimestampRangeOrBuilder getTimestampRangeFilterOrB } public static final int VALUE_REGEX_FILTER_FIELD_NUMBER = 9; + /** * * @@ -5021,6 +5157,7 @@ public com.google.bigtable.v2.TimestampRangeOrBuilder getTimestampRangeFilterOrB public boolean hasValueRegexFilter() { return filterCase_ == 9; } + /** * * @@ -5045,6 +5182,7 @@ public com.google.protobuf.ByteString getValueRegexFilter() { } public static final int VALUE_RANGE_FILTER_FIELD_NUMBER = 15; + /** * * @@ -5060,6 +5198,7 @@ public com.google.protobuf.ByteString getValueRegexFilter() { public boolean hasValueRangeFilter() { return filterCase_ == 15; } + /** * * @@ -5078,6 +5217,7 @@ public com.google.bigtable.v2.ValueRange getValueRangeFilter() { } return com.google.bigtable.v2.ValueRange.getDefaultInstance(); } + /** * * @@ -5096,6 +5236,7 @@ public com.google.bigtable.v2.ValueRangeOrBuilder getValueRangeFilterOrBuilder() } public static final int CELLS_PER_ROW_OFFSET_FILTER_FIELD_NUMBER = 10; + /** * * @@ -5113,6 +5254,7 @@ public com.google.bigtable.v2.ValueRangeOrBuilder getValueRangeFilterOrBuilder() public boolean hasCellsPerRowOffsetFilter() { return filterCase_ == 10; } + /** * * @@ -5135,6 +5277,7 @@ public int getCellsPerRowOffsetFilter() { } public static final int CELLS_PER_ROW_LIMIT_FILTER_FIELD_NUMBER = 11; + /** * * @@ -5152,6 +5295,7 @@ public int getCellsPerRowOffsetFilter() { public boolean hasCellsPerRowLimitFilter() { return filterCase_ == 11; } + /** * * @@ -5174,6 +5318,7 @@ public int getCellsPerRowLimitFilter() { } public static final int CELLS_PER_COLUMN_LIMIT_FILTER_FIELD_NUMBER = 12; + /** * * @@ -5194,6 +5339,7 @@ public int getCellsPerRowLimitFilter() { public boolean hasCellsPerColumnLimitFilter() { return filterCase_ == 12; } + /** * * @@ -5219,6 +5365,7 @@ public int getCellsPerColumnLimitFilter() { } public static final int STRIP_VALUE_TRANSFORMER_FIELD_NUMBER = 13; + /** * * @@ -5234,6 +5381,7 @@ public int getCellsPerColumnLimitFilter() { public boolean hasStripValueTransformer() { return filterCase_ == 13; } + /** * * @@ -5254,6 +5402,7 @@ public boolean getStripValueTransformer() { } public static final int APPLY_LABEL_TRANSFORMER_FIELD_NUMBER = 19; + /** * * @@ -5280,6 +5429,7 @@ public boolean getStripValueTransformer() { public boolean hasApplyLabelTransformer() { return filterCase_ == 19; } + /** * * @@ -5319,6 +5469,7 @@ public java.lang.String getApplyLabelTransformer() { return s; } } + /** * * @@ -5802,6 +5953,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -6287,6 +6439,7 @@ public Builder clearFilter() { com.google.bigtable.v2.RowFilter.Chain.Builder, com.google.bigtable.v2.RowFilter.ChainOrBuilder> chainBuilder_; + /** * * @@ -6303,6 +6456,7 @@ public Builder clearFilter() { public boolean hasChain() { return filterCase_ == 1; } + /** * * @@ -6329,6 +6483,7 @@ public com.google.bigtable.v2.RowFilter.Chain getChain() { return com.google.bigtable.v2.RowFilter.Chain.getDefaultInstance(); } } + /** * * @@ -6352,6 +6507,7 @@ public Builder setChain(com.google.bigtable.v2.RowFilter.Chain value) { filterCase_ = 1; return this; } + /** * * @@ -6372,6 +6528,7 @@ public Builder setChain(com.google.bigtable.v2.RowFilter.Chain.Builder builderFo filterCase_ = 1; return this; } + /** * * @@ -6405,6 +6562,7 @@ public Builder mergeChain(com.google.bigtable.v2.RowFilter.Chain value) { filterCase_ = 1; return this; } + /** * * @@ -6431,6 +6589,7 @@ public Builder clearChain() { } return this; } + /** * * @@ -6444,6 +6603,7 @@ public Builder clearChain() { public com.google.bigtable.v2.RowFilter.Chain.Builder getChainBuilder() { return getChainFieldBuilder().getBuilder(); } + /** * * @@ -6465,6 +6625,7 @@ public com.google.bigtable.v2.RowFilter.ChainOrBuilder getChainOrBuilder() { return com.google.bigtable.v2.RowFilter.Chain.getDefaultInstance(); } } + /** * * @@ -6504,6 +6665,7 @@ public com.google.bigtable.v2.RowFilter.ChainOrBuilder getChainOrBuilder() { com.google.bigtable.v2.RowFilter.Interleave.Builder, com.google.bigtable.v2.RowFilter.InterleaveOrBuilder> interleaveBuilder_; + /** * * @@ -6520,6 +6682,7 @@ public com.google.bigtable.v2.RowFilter.ChainOrBuilder getChainOrBuilder() { public boolean hasInterleave() { return filterCase_ == 2; } + /** * * @@ -6546,6 +6709,7 @@ public com.google.bigtable.v2.RowFilter.Interleave getInterleave() { return com.google.bigtable.v2.RowFilter.Interleave.getDefaultInstance(); } } + /** * * @@ -6569,6 +6733,7 @@ public Builder setInterleave(com.google.bigtable.v2.RowFilter.Interleave value) filterCase_ = 2; return this; } + /** * * @@ -6590,6 +6755,7 @@ public Builder setInterleave( filterCase_ = 2; return this; } + /** * * @@ -6623,6 +6789,7 @@ public Builder mergeInterleave(com.google.bigtable.v2.RowFilter.Interleave value filterCase_ = 2; return this; } + /** * * @@ -6649,6 +6816,7 @@ public Builder clearInterleave() { } return this; } + /** * * @@ -6662,6 +6830,7 @@ public Builder clearInterleave() { public com.google.bigtable.v2.RowFilter.Interleave.Builder getInterleaveBuilder() { return getInterleaveFieldBuilder().getBuilder(); } + /** * * @@ -6683,6 +6852,7 @@ public com.google.bigtable.v2.RowFilter.InterleaveOrBuilder getInterleaveOrBuild return com.google.bigtable.v2.RowFilter.Interleave.getDefaultInstance(); } } + /** * * @@ -6722,6 +6892,7 @@ public com.google.bigtable.v2.RowFilter.InterleaveOrBuilder getInterleaveOrBuild com.google.bigtable.v2.RowFilter.Condition.Builder, com.google.bigtable.v2.RowFilter.ConditionOrBuilder> conditionBuilder_; + /** * * @@ -6738,6 +6909,7 @@ public com.google.bigtable.v2.RowFilter.InterleaveOrBuilder getInterleaveOrBuild public boolean hasCondition() { return filterCase_ == 3; } + /** * * @@ -6764,6 +6936,7 @@ public com.google.bigtable.v2.RowFilter.Condition getCondition() { return com.google.bigtable.v2.RowFilter.Condition.getDefaultInstance(); } } + /** * * @@ -6787,6 +6960,7 @@ public Builder setCondition(com.google.bigtable.v2.RowFilter.Condition value) { filterCase_ = 3; return this; } + /** * * @@ -6808,6 +6982,7 @@ public Builder setCondition( filterCase_ = 3; return this; } + /** * * @@ -6841,6 +7016,7 @@ public Builder mergeCondition(com.google.bigtable.v2.RowFilter.Condition value) filterCase_ = 3; return this; } + /** * * @@ -6867,6 +7043,7 @@ public Builder clearCondition() { } return this; } + /** * * @@ -6880,6 +7057,7 @@ public Builder clearCondition() { public com.google.bigtable.v2.RowFilter.Condition.Builder getConditionBuilder() { return getConditionFieldBuilder().getBuilder(); } + /** * * @@ -6901,6 +7079,7 @@ public com.google.bigtable.v2.RowFilter.ConditionOrBuilder getConditionOrBuilder return com.google.bigtable.v2.RowFilter.Condition.getDefaultInstance(); } } + /** * * @@ -7007,6 +7186,7 @@ public com.google.bigtable.v2.RowFilter.ConditionOrBuilder getConditionOrBuilder public boolean hasSink() { return filterCase_ == 16; } + /** * * @@ -7082,6 +7262,7 @@ public boolean getSink() { } return false; } + /** * * @@ -7159,6 +7340,7 @@ public Builder setSink(boolean value) { onChanged(); return this; } + /** * * @@ -7252,6 +7434,7 @@ public Builder clearSink() { public boolean hasPassAllFilter() { return filterCase_ == 17; } + /** * * @@ -7270,6 +7453,7 @@ public boolean getPassAllFilter() { } return false; } + /** * * @@ -7290,6 +7474,7 @@ public Builder setPassAllFilter(boolean value) { onChanged(); return this; } + /** * * @@ -7326,6 +7511,7 @@ public Builder clearPassAllFilter() { public boolean hasBlockAllFilter() { return filterCase_ == 18; } + /** * * @@ -7344,6 +7530,7 @@ public boolean getBlockAllFilter() { } return false; } + /** * * @@ -7364,6 +7551,7 @@ public Builder setBlockAllFilter(boolean value) { onChanged(); return this; } + /** * * @@ -7405,6 +7593,7 @@ public Builder clearBlockAllFilter() { public boolean hasRowKeyRegexFilter() { return filterCase_ == 4; } + /** * * @@ -7428,6 +7617,7 @@ public com.google.protobuf.ByteString getRowKeyRegexFilter() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -7455,6 +7645,7 @@ public Builder setRowKeyRegexFilter(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -7496,6 +7687,7 @@ public Builder clearRowKeyRegexFilter() { public boolean hasRowSampleFilter() { return filterCase_ == 14; } + /** * * @@ -7514,6 +7706,7 @@ public double getRowSampleFilter() { } return 0D; } + /** * * @@ -7534,6 +7727,7 @@ public Builder setRowSampleFilter(double value) { onChanged(); return this; } + /** * * @@ -7575,6 +7769,7 @@ public Builder clearRowSampleFilter() { public boolean hasFamilyNameRegexFilter() { return filterCase_ == 5; } + /** * * @@ -7608,6 +7803,7 @@ public java.lang.String getFamilyNameRegexFilter() { return (java.lang.String) ref; } } + /** * * @@ -7641,6 +7837,7 @@ public com.google.protobuf.ByteString getFamilyNameRegexFilterBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -7667,6 +7864,7 @@ public Builder setFamilyNameRegexFilter(java.lang.String value) { onChanged(); return this; } + /** * * @@ -7691,6 +7889,7 @@ public Builder clearFamilyNameRegexFilter() { } return this; } + /** * * @@ -7738,6 +7937,7 @@ public Builder setFamilyNameRegexFilterBytes(com.google.protobuf.ByteString valu public boolean hasColumnQualifierRegexFilter() { return filterCase_ == 6; } + /** * * @@ -7760,6 +7960,7 @@ public com.google.protobuf.ByteString getColumnQualifierRegexFilter() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -7786,6 +7987,7 @@ public Builder setColumnQualifierRegexFilter(com.google.protobuf.ByteString valu onChanged(); return this; } + /** * * @@ -7816,6 +8018,7 @@ public Builder clearColumnQualifierRegexFilter() { com.google.bigtable.v2.ColumnRange.Builder, com.google.bigtable.v2.ColumnRangeOrBuilder> columnRangeFilterBuilder_; + /** * * @@ -7831,6 +8034,7 @@ public Builder clearColumnQualifierRegexFilter() { public boolean hasColumnRangeFilter() { return filterCase_ == 7; } + /** * * @@ -7856,6 +8060,7 @@ public com.google.bigtable.v2.ColumnRange getColumnRangeFilter() { return com.google.bigtable.v2.ColumnRange.getDefaultInstance(); } } + /** * * @@ -7878,6 +8083,7 @@ public Builder setColumnRangeFilter(com.google.bigtable.v2.ColumnRange value) { filterCase_ = 7; return this; } + /** * * @@ -7898,6 +8104,7 @@ public Builder setColumnRangeFilter( filterCase_ = 7; return this; } + /** * * @@ -7930,6 +8137,7 @@ public Builder mergeColumnRangeFilter(com.google.bigtable.v2.ColumnRange value) filterCase_ = 7; return this; } + /** * * @@ -7955,6 +8163,7 @@ public Builder clearColumnRangeFilter() { } return this; } + /** * * @@ -7967,6 +8176,7 @@ public Builder clearColumnRangeFilter() { public com.google.bigtable.v2.ColumnRange.Builder getColumnRangeFilterBuilder() { return getColumnRangeFilterFieldBuilder().getBuilder(); } + /** * * @@ -7987,6 +8197,7 @@ public com.google.bigtable.v2.ColumnRangeOrBuilder getColumnRangeFilterOrBuilder return com.google.bigtable.v2.ColumnRange.getDefaultInstance(); } } + /** * * @@ -8023,6 +8234,7 @@ public com.google.bigtable.v2.ColumnRangeOrBuilder getColumnRangeFilterOrBuilder com.google.bigtable.v2.TimestampRange.Builder, com.google.bigtable.v2.TimestampRangeOrBuilder> timestampRangeFilterBuilder_; + /** * * @@ -8038,6 +8250,7 @@ public com.google.bigtable.v2.ColumnRangeOrBuilder getColumnRangeFilterOrBuilder public boolean hasTimestampRangeFilter() { return filterCase_ == 8; } + /** * * @@ -8063,6 +8276,7 @@ public com.google.bigtable.v2.TimestampRange getTimestampRangeFilter() { return com.google.bigtable.v2.TimestampRange.getDefaultInstance(); } } + /** * * @@ -8085,6 +8299,7 @@ public Builder setTimestampRangeFilter(com.google.bigtable.v2.TimestampRange val filterCase_ = 8; return this; } + /** * * @@ -8105,6 +8320,7 @@ public Builder setTimestampRangeFilter( filterCase_ = 8; return this; } + /** * * @@ -8137,6 +8353,7 @@ public Builder mergeTimestampRangeFilter(com.google.bigtable.v2.TimestampRange v filterCase_ = 8; return this; } + /** * * @@ -8162,6 +8379,7 @@ public Builder clearTimestampRangeFilter() { } return this; } + /** * * @@ -8174,6 +8392,7 @@ public Builder clearTimestampRangeFilter() { public com.google.bigtable.v2.TimestampRange.Builder getTimestampRangeFilterBuilder() { return getTimestampRangeFilterFieldBuilder().getBuilder(); } + /** * * @@ -8194,6 +8413,7 @@ public com.google.bigtable.v2.TimestampRangeOrBuilder getTimestampRangeFilterOrB return com.google.bigtable.v2.TimestampRange.getDefaultInstance(); } } + /** * * @@ -8243,6 +8463,7 @@ public com.google.bigtable.v2.TimestampRangeOrBuilder getTimestampRangeFilterOrB public boolean hasValueRegexFilter() { return filterCase_ == 9; } + /** * * @@ -8264,6 +8485,7 @@ public com.google.protobuf.ByteString getValueRegexFilter() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -8289,6 +8511,7 @@ public Builder setValueRegexFilter(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -8318,6 +8541,7 @@ public Builder clearValueRegexFilter() { com.google.bigtable.v2.ValueRange.Builder, com.google.bigtable.v2.ValueRangeOrBuilder> valueRangeFilterBuilder_; + /** * * @@ -8333,6 +8557,7 @@ public Builder clearValueRegexFilter() { public boolean hasValueRangeFilter() { return filterCase_ == 15; } + /** * * @@ -8358,6 +8583,7 @@ public com.google.bigtable.v2.ValueRange getValueRangeFilter() { return com.google.bigtable.v2.ValueRange.getDefaultInstance(); } } + /** * * @@ -8380,6 +8606,7 @@ public Builder setValueRangeFilter(com.google.bigtable.v2.ValueRange value) { filterCase_ = 15; return this; } + /** * * @@ -8399,6 +8626,7 @@ public Builder setValueRangeFilter(com.google.bigtable.v2.ValueRange.Builder bui filterCase_ = 15; return this; } + /** * * @@ -8431,6 +8659,7 @@ public Builder mergeValueRangeFilter(com.google.bigtable.v2.ValueRange value) { filterCase_ = 15; return this; } + /** * * @@ -8456,6 +8685,7 @@ public Builder clearValueRangeFilter() { } return this; } + /** * * @@ -8468,6 +8698,7 @@ public Builder clearValueRangeFilter() { public com.google.bigtable.v2.ValueRange.Builder getValueRangeFilterBuilder() { return getValueRangeFilterFieldBuilder().getBuilder(); } + /** * * @@ -8488,6 +8719,7 @@ public com.google.bigtable.v2.ValueRangeOrBuilder getValueRangeFilterOrBuilder() return com.google.bigtable.v2.ValueRange.getDefaultInstance(); } } + /** * * @@ -8535,6 +8767,7 @@ public com.google.bigtable.v2.ValueRangeOrBuilder getValueRangeFilterOrBuilder() public boolean hasCellsPerRowOffsetFilter() { return filterCase_ == 10; } + /** * * @@ -8554,6 +8787,7 @@ public int getCellsPerRowOffsetFilter() { } return 0; } + /** * * @@ -8575,6 +8809,7 @@ public Builder setCellsPerRowOffsetFilter(int value) { onChanged(); return this; } + /** * * @@ -8613,6 +8848,7 @@ public Builder clearCellsPerRowOffsetFilter() { public boolean hasCellsPerRowLimitFilter() { return filterCase_ == 11; } + /** * * @@ -8632,6 +8868,7 @@ public int getCellsPerRowLimitFilter() { } return 0; } + /** * * @@ -8653,6 +8890,7 @@ public Builder setCellsPerRowLimitFilter(int value) { onChanged(); return this; } + /** * * @@ -8694,6 +8932,7 @@ public Builder clearCellsPerRowLimitFilter() { public boolean hasCellsPerColumnLimitFilter() { return filterCase_ == 12; } + /** * * @@ -8716,6 +8955,7 @@ public int getCellsPerColumnLimitFilter() { } return 0; } + /** * * @@ -8740,6 +8980,7 @@ public Builder setCellsPerColumnLimitFilter(int value) { onChanged(); return this; } + /** * * @@ -8779,6 +9020,7 @@ public Builder clearCellsPerColumnLimitFilter() { public boolean hasStripValueTransformer() { return filterCase_ == 13; } + /** * * @@ -8796,6 +9038,7 @@ public boolean getStripValueTransformer() { } return false; } + /** * * @@ -8815,6 +9058,7 @@ public Builder setStripValueTransformer(boolean value) { onChanged(); return this; } + /** * * @@ -8862,6 +9106,7 @@ public Builder clearStripValueTransformer() { public boolean hasApplyLabelTransformer() { return filterCase_ == 19; } + /** * * @@ -8902,6 +9147,7 @@ public java.lang.String getApplyLabelTransformer() { return (java.lang.String) ref; } } + /** * * @@ -8942,6 +9188,7 @@ public com.google.protobuf.ByteString getApplyLabelTransformerBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -8975,6 +9222,7 @@ public Builder setApplyLabelTransformer(java.lang.String value) { onChanged(); return this; } + /** * * @@ -9006,6 +9254,7 @@ public Builder clearApplyLabelTransformer() { } return this; } + /** * * 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..f57465bb5d 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface RowFilterOrBuilder @@ -37,6 +37,7 @@ public interface RowFilterOrBuilder * @return Whether the chain field is set. */ boolean hasChain(); + /** * * @@ -50,6 +51,7 @@ public interface RowFilterOrBuilder * @return The chain. */ com.google.bigtable.v2.RowFilter.Chain getChain(); + /** * * @@ -75,6 +77,7 @@ public interface RowFilterOrBuilder * @return Whether the interleave field is set. */ boolean hasInterleave(); + /** * * @@ -88,6 +91,7 @@ public interface RowFilterOrBuilder * @return The interleave. */ com.google.bigtable.v2.RowFilter.Interleave getInterleave(); + /** * * @@ -113,6 +117,7 @@ public interface RowFilterOrBuilder * @return Whether the condition field is set. */ boolean hasCondition(); + /** * * @@ -126,6 +131,7 @@ public interface RowFilterOrBuilder * @return The condition. */ com.google.bigtable.v2.RowFilter.Condition getCondition(); + /** * * @@ -208,6 +214,7 @@ public interface RowFilterOrBuilder * @return Whether the sink field is set. */ boolean hasSink(); + /** * * @@ -292,6 +299,7 @@ public interface RowFilterOrBuilder * @return Whether the passAllFilter field is set. */ boolean hasPassAllFilter(); + /** * * @@ -319,6 +327,7 @@ public interface RowFilterOrBuilder * @return Whether the blockAllFilter field is set. */ boolean hasBlockAllFilter(); + /** * * @@ -351,6 +360,7 @@ public interface RowFilterOrBuilder * @return Whether the rowKeyRegexFilter field is set. */ boolean hasRowKeyRegexFilter(); + /** * * @@ -383,6 +393,7 @@ public interface RowFilterOrBuilder * @return Whether the rowSampleFilter field is set. */ boolean hasRowSampleFilter(); + /** * * @@ -414,6 +425,7 @@ public interface RowFilterOrBuilder * @return Whether the familyNameRegexFilter field is set. */ boolean hasFamilyNameRegexFilter(); + /** * * @@ -431,6 +443,7 @@ public interface RowFilterOrBuilder * @return The familyNameRegexFilter. */ java.lang.String getFamilyNameRegexFilter(); + /** * * @@ -466,6 +479,7 @@ public interface RowFilterOrBuilder * @return Whether the columnQualifierRegexFilter field is set. */ boolean hasColumnQualifierRegexFilter(); + /** * * @@ -496,6 +510,7 @@ public interface RowFilterOrBuilder * @return Whether the columnRangeFilter field is set. */ boolean hasColumnRangeFilter(); + /** * * @@ -508,6 +523,7 @@ public interface RowFilterOrBuilder * @return The columnRangeFilter. */ com.google.bigtable.v2.ColumnRange getColumnRangeFilter(); + /** * * @@ -531,6 +547,7 @@ public interface RowFilterOrBuilder * @return Whether the timestampRangeFilter field is set. */ boolean hasTimestampRangeFilter(); + /** * * @@ -543,6 +560,7 @@ public interface RowFilterOrBuilder * @return The timestampRangeFilter. */ com.google.bigtable.v2.TimestampRange getTimestampRangeFilter(); + /** * * @@ -570,6 +588,7 @@ public interface RowFilterOrBuilder * @return Whether the valueRegexFilter field is set. */ boolean hasValueRegexFilter(); + /** * * @@ -599,6 +618,7 @@ public interface RowFilterOrBuilder * @return Whether the valueRangeFilter field is set. */ boolean hasValueRangeFilter(); + /** * * @@ -611,6 +631,7 @@ public interface RowFilterOrBuilder * @return The valueRangeFilter. */ com.google.bigtable.v2.ValueRange getValueRangeFilter(); + /** * * @@ -636,6 +657,7 @@ public interface RowFilterOrBuilder * @return Whether the cellsPerRowOffsetFilter field is set. */ boolean hasCellsPerRowOffsetFilter(); + /** * * @@ -665,6 +687,7 @@ public interface RowFilterOrBuilder * @return Whether the cellsPerRowLimitFilter field is set. */ boolean hasCellsPerRowLimitFilter(); + /** * * @@ -697,6 +720,7 @@ public interface RowFilterOrBuilder * @return Whether the cellsPerColumnLimitFilter field is set. */ boolean hasCellsPerColumnLimitFilter(); + /** * * @@ -727,6 +751,7 @@ public interface RowFilterOrBuilder * @return Whether the stripValueTransformer field is set. */ boolean hasStripValueTransformer(); + /** * * @@ -764,6 +789,7 @@ public interface RowFilterOrBuilder * @return Whether the applyLabelTransformer field is set. */ boolean hasApplyLabelTransformer(); + /** * * @@ -788,6 +814,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..770ee13750 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface RowOrBuilder @@ -50,6 +50,7 @@ public interface RowOrBuilder * repeated .google.bigtable.v2.Family families = 2; */ java.util.List getFamiliesList(); + /** * * @@ -61,6 +62,7 @@ public interface RowOrBuilder * repeated .google.bigtable.v2.Family families = 2; */ com.google.bigtable.v2.Family getFamilies(int index); + /** * * @@ -72,6 +74,7 @@ public interface RowOrBuilder * repeated .google.bigtable.v2.Family families = 2; */ int getFamiliesCount(); + /** * * @@ -83,6 +86,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..39ec453bd3 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class RowRange extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.RowRange) RowRangeOrBuilder { private static final long serialVersionUID = 0L; + // Use RowRange.newBuilder() to construct. private RowRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -76,6 +77,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 +127,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 +161,7 @@ public EndKeyCase getEndKeyCase() { } public static final int START_KEY_CLOSED_FIELD_NUMBER = 1; + /** * * @@ -173,6 +177,7 @@ public EndKeyCase getEndKeyCase() { public boolean hasStartKeyClosed() { return startKeyCase_ == 1; } + /** * * @@ -193,6 +198,7 @@ public com.google.protobuf.ByteString getStartKeyClosed() { } public static final int START_KEY_OPEN_FIELD_NUMBER = 2; + /** * * @@ -208,6 +214,7 @@ public com.google.protobuf.ByteString getStartKeyClosed() { public boolean hasStartKeyOpen() { return startKeyCase_ == 2; } + /** * * @@ -228,6 +235,7 @@ public com.google.protobuf.ByteString getStartKeyOpen() { } public static final int END_KEY_OPEN_FIELD_NUMBER = 3; + /** * * @@ -243,6 +251,7 @@ public com.google.protobuf.ByteString getStartKeyOpen() { public boolean hasEndKeyOpen() { return endKeyCase_ == 3; } + /** * * @@ -263,6 +272,7 @@ public com.google.protobuf.ByteString getEndKeyOpen() { } public static final int END_KEY_CLOSED_FIELD_NUMBER = 4; + /** * * @@ -278,6 +288,7 @@ public com.google.protobuf.ByteString getEndKeyOpen() { public boolean hasEndKeyClosed() { return endKeyCase_ == 4; } + /** * * @@ -523,6 +534,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -798,6 +810,7 @@ public Builder clearEndKey() { public boolean hasStartKeyClosed() { return startKeyCase_ == 1; } + /** * * @@ -815,6 +828,7 @@ public com.google.protobuf.ByteString getStartKeyClosed() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -836,6 +850,7 @@ public Builder setStartKeyClosed(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -870,6 +885,7 @@ public Builder clearStartKeyClosed() { public boolean hasStartKeyOpen() { return startKeyCase_ == 2; } + /** * * @@ -887,6 +903,7 @@ public com.google.protobuf.ByteString getStartKeyOpen() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -908,6 +925,7 @@ public Builder setStartKeyOpen(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -942,6 +960,7 @@ public Builder clearStartKeyOpen() { public boolean hasEndKeyOpen() { return endKeyCase_ == 3; } + /** * * @@ -959,6 +978,7 @@ public com.google.protobuf.ByteString getEndKeyOpen() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -980,6 +1000,7 @@ public Builder setEndKeyOpen(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1014,6 +1035,7 @@ public Builder clearEndKeyOpen() { public boolean hasEndKeyClosed() { return endKeyCase_ == 4; } + /** * * @@ -1031,6 +1053,7 @@ public com.google.protobuf.ByteString getEndKeyClosed() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1052,6 +1075,7 @@ public Builder setEndKeyClosed(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * 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..6eca57fd21 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface RowRangeOrBuilder @@ -36,6 +36,7 @@ public interface RowRangeOrBuilder * @return Whether the startKeyClosed field is set. */ boolean hasStartKeyClosed(); + /** * * @@ -61,6 +62,7 @@ public interface RowRangeOrBuilder * @return Whether the startKeyOpen field is set. */ boolean hasStartKeyOpen(); + /** * * @@ -86,6 +88,7 @@ public interface RowRangeOrBuilder * @return Whether the endKeyOpen field is set. */ boolean hasEndKeyOpen(); + /** * * @@ -111,6 +114,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..967b7ebb11 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class RowSet extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.RowSet) RowSetOrBuilder { private static final long serialVersionUID = 0L; + // Use RowSet.newBuilder() to construct. private RowSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -67,6 +68,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 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getRowKeysList() { return rowKeys_; } + /** * * @@ -96,6 +99,7 @@ public java.util.List getRowKeysList() { public int getRowKeysCount() { return rowKeys_.size(); } + /** * * @@ -116,6 +120,7 @@ public com.google.protobuf.ByteString getRowKeys(int index) { @SuppressWarnings("serial") private java.util.List rowRanges_; + /** * * @@ -129,6 +134,7 @@ public com.google.protobuf.ByteString getRowKeys(int index) { public java.util.List getRowRangesList() { return rowRanges_; } + /** * * @@ -143,6 +149,7 @@ public java.util.List getRowRangesList() { getRowRangesOrBuilderList() { return rowRanges_; } + /** * * @@ -156,6 +163,7 @@ public java.util.List getRowRangesList() { public int getRowRangesCount() { return rowRanges_.size(); } + /** * * @@ -169,6 +177,7 @@ public int getRowRangesCount() { public com.google.bigtable.v2.RowRange getRowRanges(int index) { return rowRanges_.get(index); } + /** * * @@ -358,6 +367,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -612,6 +622,7 @@ private void ensureRowKeysIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -627,6 +638,7 @@ public java.util.List getRowKeysList() { rowKeys_.makeImmutable(); return rowKeys_; } + /** * * @@ -641,6 +653,7 @@ public java.util.List getRowKeysList() { public int getRowKeysCount() { return rowKeys_.size(); } + /** * * @@ -656,6 +669,7 @@ public int getRowKeysCount() { public com.google.protobuf.ByteString getRowKeys(int index) { return rowKeys_.get(index); } + /** * * @@ -679,6 +693,7 @@ public Builder setRowKeys(int index, com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -701,6 +716,7 @@ public Builder addRowKeys(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -721,6 +737,7 @@ public Builder addAllRowKeys( onChanged(); return this; } + /** * * @@ -771,6 +788,7 @@ public java.util.List getRowRangesList() { return rowRangesBuilder_.getMessageList(); } } + /** * * @@ -787,6 +805,7 @@ public int getRowRangesCount() { return rowRangesBuilder_.getCount(); } } + /** * * @@ -803,6 +822,7 @@ public com.google.bigtable.v2.RowRange getRowRanges(int index) { return rowRangesBuilder_.getMessage(index); } } + /** * * @@ -825,6 +845,7 @@ public Builder setRowRanges(int index, com.google.bigtable.v2.RowRange value) { } return this; } + /** * * @@ -845,6 +866,7 @@ public Builder setRowRanges( } return this; } + /** * * @@ -867,6 +889,7 @@ public Builder addRowRanges(com.google.bigtable.v2.RowRange value) { } return this; } + /** * * @@ -889,6 +912,7 @@ public Builder addRowRanges(int index, com.google.bigtable.v2.RowRange value) { } return this; } + /** * * @@ -908,6 +932,7 @@ public Builder addRowRanges(com.google.bigtable.v2.RowRange.Builder builderForVa } return this; } + /** * * @@ -928,6 +953,7 @@ public Builder addRowRanges( } return this; } + /** * * @@ -948,6 +974,7 @@ public Builder addAllRowRanges( } return this; } + /** * * @@ -967,6 +994,7 @@ public Builder clearRowRanges() { } return this; } + /** * * @@ -986,6 +1014,7 @@ public Builder removeRowRanges(int index) { } return this; } + /** * * @@ -998,6 +1027,7 @@ public Builder removeRowRanges(int index) { public com.google.bigtable.v2.RowRange.Builder getRowRangesBuilder(int index) { return getRowRangesFieldBuilder().getBuilder(index); } + /** * * @@ -1014,6 +1044,7 @@ public com.google.bigtable.v2.RowRangeOrBuilder getRowRangesOrBuilder(int index) return rowRangesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1031,6 +1062,7 @@ public com.google.bigtable.v2.RowRangeOrBuilder getRowRangesOrBuilder(int index) return java.util.Collections.unmodifiableList(rowRanges_); } } + /** * * @@ -1044,6 +1076,7 @@ public com.google.bigtable.v2.RowRange.Builder addRowRangesBuilder() { return getRowRangesFieldBuilder() .addBuilder(com.google.bigtable.v2.RowRange.getDefaultInstance()); } + /** * * @@ -1057,6 +1090,7 @@ public com.google.bigtable.v2.RowRange.Builder addRowRangesBuilder(int index) { return getRowRangesFieldBuilder() .addBuilder(index, com.google.bigtable.v2.RowRange.getDefaultInstance()); } + /** * * 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..80ed76d6f9 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface RowSetOrBuilder @@ -36,6 +36,7 @@ public interface RowSetOrBuilder * @return A list containing the rowKeys. */ java.util.List getRowKeysList(); + /** * * @@ -48,6 +49,7 @@ public interface RowSetOrBuilder * @return The count of rowKeys. */ int getRowKeysCount(); + /** * * @@ -72,6 +74,7 @@ public interface RowSetOrBuilder * repeated .google.bigtable.v2.RowRange row_ranges = 2; */ java.util.List getRowRangesList(); + /** * * @@ -82,6 +85,7 @@ public interface RowSetOrBuilder * repeated .google.bigtable.v2.RowRange row_ranges = 2; */ com.google.bigtable.v2.RowRange getRowRanges(int index); + /** * * @@ -92,6 +96,7 @@ public interface RowSetOrBuilder * repeated .google.bigtable.v2.RowRange row_ranges = 2; */ int getRowRangesCount(); + /** * * @@ -102,6 +107,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..a7aa674b01 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class SampleRowKeysRequest extends com.google.protobuf.GeneratedMes // @@protoc_insertion_point(message_implements:google.bigtable.v2.SampleRowKeysRequest) SampleRowKeysRequestOrBuilder { private static final long serialVersionUID = 0L; + // Use SampleRowKeysRequest.newBuilder() to construct. private SampleRowKeysRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -41,6 +42,7 @@ private SampleRowKeysRequest(com.google.protobuf.GeneratedMessageV3.Builder b private SampleRowKeysRequest() { tableName_ = ""; authorizedViewName_ = ""; + materializedViewName_ = ""; appProfileId_ = ""; } @@ -69,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -97,6 +100,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -130,6 +134,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object authorizedViewName_ = ""; + /** * * @@ -159,6 +164,7 @@ public java.lang.String getAuthorizedViewName() { return s; } } + /** * * @@ -189,10 +195,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 +287,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -265,6 +336,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, authorizedViewName_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(materializedViewName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, materializedViewName_); + } getUnknownFields().writeTo(output); } @@ -283,6 +357,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, authorizedViewName_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(materializedViewName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, materializedViewName_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -301,6 +378,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 +395,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(); @@ -419,6 +499,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -460,6 +541,7 @@ public Builder clear() { bitField0_ = 0; tableName_ = ""; authorizedViewName_ = ""; + materializedViewName_ = ""; appProfileId_ = ""; return this; } @@ -504,6 +586,9 @@ 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_; } } @@ -563,9 +648,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 +693,7 @@ public Builder mergeFrom( case 18: { appProfileId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 18 case 34: @@ -612,6 +702,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 +728,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -659,6 +756,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -686,6 +784,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -712,6 +811,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -734,6 +834,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -763,6 +864,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object authorizedViewName_ = ""; + /** * * @@ -791,6 +893,7 @@ public java.lang.String getAuthorizedViewName() { return (java.lang.String) ref; } } + /** * * @@ -819,6 +922,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -846,6 +950,7 @@ public Builder setAuthorizedViewName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -869,6 +974,7 @@ public Builder clearAuthorizedViewName() { onChanged(); return this; } + /** * * @@ -898,7 +1004,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 +1165,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -945,6 +1189,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -963,10 +1208,11 @@ public Builder setAppProfileId(java.lang.String value) { throw new NullPointerException(); } appProfileId_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } + /** * * @@ -981,10 +1227,11 @@ public Builder setAppProfileId(java.lang.String value) { */ public Builder clearAppProfileId() { appProfileId_ = getDefaultInstance().getAppProfileId(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } + /** * * @@ -1004,7 +1251,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); appProfileId_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } 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..1fa4984f65 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface SampleRowKeysRequestOrBuilder @@ -41,6 +41,7 @@ public interface SampleRowKeysRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -77,6 +78,7 @@ public interface SampleRowKeysRequestOrBuilder * @return The authorizedViewName. */ java.lang.String getAuthorizedViewName(); + /** * * @@ -96,6 +98,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 +147,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..f05fc70389 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class SampleRowKeysResponse extends com.google.protobuf.GeneratedMe // @@protoc_insertion_point(message_implements:google.bigtable.v2.SampleRowKeysResponse) SampleRowKeysResponseOrBuilder { private static final long serialVersionUID = 0L; + // Use SampleRowKeysResponse.newBuilder() to construct. private SampleRowKeysResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,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 +91,7 @@ public com.google.protobuf.ByteString getRowKey() { public static final int OFFSET_BYTES_FIELD_NUMBER = 2; private long offsetBytes_ = 0L; + /** * * @@ -276,6 +279,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -470,6 +474,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -491,6 +496,7 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getRowKey() { return rowKey_; } + /** * * @@ -518,6 +524,7 @@ public Builder setRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -543,6 +550,7 @@ public Builder clearRowKey() { } private long offsetBytes_; + /** * * @@ -561,6 +569,7 @@ public Builder clearRowKey() { public long getOffsetBytes() { return offsetBytes_; } + /** * * @@ -583,6 +592,7 @@ public Builder setOffsetBytes(long value) { onChanged(); return this; } + /** * * 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..f6cdb88307 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/bigtable.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface SampleRowKeysResponseOrBuilder 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..f889ad11a0 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -35,6 +35,7 @@ public final class StreamContinuationToken extends com.google.protobuf.Generated // @@protoc_insertion_point(message_implements:google.bigtable.v2.StreamContinuationToken) StreamContinuationTokenOrBuilder { private static final long serialVersionUID = 0L; + // Use StreamContinuationToken.newBuilder() to construct. private StreamContinuationToken(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -68,6 +69,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 +85,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasPartition() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -100,6 +103,7 @@ public com.google.bigtable.v2.StreamPartition getPartition() { ? com.google.bigtable.v2.StreamPartition.getDefaultInstance() : partition_; } + /** * * @@ -120,6 +124,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object token_ = ""; + /** * * @@ -143,6 +148,7 @@ public java.lang.String getToken() { return s; } } + /** * * @@ -340,6 +346,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -559,6 +566,7 @@ public Builder mergeFrom( com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder> partitionBuilder_; + /** * * @@ -573,6 +581,7 @@ public Builder mergeFrom( public boolean hasPartition() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -593,6 +602,7 @@ public com.google.bigtable.v2.StreamPartition getPartition() { return partitionBuilder_.getMessage(); } } + /** * * @@ -615,6 +625,7 @@ public Builder setPartition(com.google.bigtable.v2.StreamPartition value) { onChanged(); return this; } + /** * * @@ -634,6 +645,7 @@ public Builder setPartition(com.google.bigtable.v2.StreamPartition.Builder build onChanged(); return this; } + /** * * @@ -661,6 +673,7 @@ public Builder mergePartition(com.google.bigtable.v2.StreamPartition value) { } return this; } + /** * * @@ -680,6 +693,7 @@ public Builder clearPartition() { onChanged(); return this; } + /** * * @@ -694,6 +708,7 @@ public com.google.bigtable.v2.StreamPartition.Builder getPartitionBuilder() { onChanged(); return getPartitionFieldBuilder().getBuilder(); } + /** * * @@ -712,6 +727,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { : partition_; } } + /** * * @@ -739,6 +755,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { } private java.lang.Object token_ = ""; + /** * * @@ -761,6 +778,7 @@ public java.lang.String getToken() { return (java.lang.String) ref; } } + /** * * @@ -783,6 +801,7 @@ public com.google.protobuf.ByteString getTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -804,6 +823,7 @@ public Builder setToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -821,6 +841,7 @@ public Builder clearToken() { onChanged(); return this; } + /** * * 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..aeb7d560d0 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface StreamContinuationTokenOrBuilder @@ -36,6 +36,7 @@ public interface StreamContinuationTokenOrBuilder * @return Whether the partition field is set. */ boolean hasPartition(); + /** * * @@ -48,6 +49,7 @@ public interface StreamContinuationTokenOrBuilder * @return The partition. */ com.google.bigtable.v2.StreamPartition getPartition(); + /** * * @@ -71,6 +73,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..dcbc9f4993 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -35,6 +35,7 @@ public final class StreamContinuationTokens extends com.google.protobuf.Generate // @@protoc_insertion_point(message_implements:google.bigtable.v2.StreamContinuationTokens) StreamContinuationTokensOrBuilder { private static final long serialVersionUID = 0L; + // Use StreamContinuationTokens.newBuilder() to construct. private StreamContinuationTokens(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -69,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List tokens_; + /** * * @@ -82,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getTokensList() { return tokens_; } + /** * * @@ -96,6 +99,7 @@ public java.util.List getTokensL getTokensOrBuilderList() { return tokens_; } + /** * * @@ -109,6 +113,7 @@ public java.util.List getTokensL public int getTokensCount() { return tokens_.size(); } + /** * * @@ -122,6 +127,7 @@ public int getTokensCount() { public com.google.bigtable.v2.StreamContinuationToken getTokens(int index) { return tokens_.get(index); } + /** * * @@ -297,6 +303,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -560,6 +567,7 @@ public java.util.List getTokensL return tokensBuilder_.getMessageList(); } } + /** * * @@ -576,6 +584,7 @@ public int getTokensCount() { return tokensBuilder_.getCount(); } } + /** * * @@ -592,6 +601,7 @@ public com.google.bigtable.v2.StreamContinuationToken getTokens(int index) { return tokensBuilder_.getMessage(index); } } + /** * * @@ -614,6 +624,7 @@ public Builder setTokens(int index, com.google.bigtable.v2.StreamContinuationTok } return this; } + /** * * @@ -634,6 +645,7 @@ public Builder setTokens( } return this; } + /** * * @@ -656,6 +668,7 @@ public Builder addTokens(com.google.bigtable.v2.StreamContinuationToken value) { } return this; } + /** * * @@ -678,6 +691,7 @@ public Builder addTokens(int index, com.google.bigtable.v2.StreamContinuationTok } return this; } + /** * * @@ -698,6 +712,7 @@ public Builder addTokens( } return this; } + /** * * @@ -718,6 +733,7 @@ public Builder addTokens( } return this; } + /** * * @@ -738,6 +754,7 @@ public Builder addAllTokens( } return this; } + /** * * @@ -757,6 +774,7 @@ public Builder clearTokens() { } return this; } + /** * * @@ -776,6 +794,7 @@ public Builder removeTokens(int index) { } return this; } + /** * * @@ -788,6 +807,7 @@ public Builder removeTokens(int index) { public com.google.bigtable.v2.StreamContinuationToken.Builder getTokensBuilder(int index) { return getTokensFieldBuilder().getBuilder(index); } + /** * * @@ -804,6 +824,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getTokensOrBuilde return tokensBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -821,6 +842,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getTokensOrBuilde return java.util.Collections.unmodifiableList(tokens_); } } + /** * * @@ -834,6 +856,7 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder addTokensBuilder() return getTokensFieldBuilder() .addBuilder(com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance()); } + /** * * @@ -847,6 +870,7 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder addTokensBuilder(i return getTokensFieldBuilder() .addBuilder(index, com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance()); } + /** * * 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..ad9c68a183 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface StreamContinuationTokensOrBuilder @@ -34,6 +34,7 @@ public interface StreamContinuationTokensOrBuilder * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; */ java.util.List getTokensList(); + /** * * @@ -44,6 +45,7 @@ public interface StreamContinuationTokensOrBuilder * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; */ com.google.bigtable.v2.StreamContinuationToken getTokens(int index); + /** * * @@ -54,6 +56,7 @@ public interface StreamContinuationTokensOrBuilder * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; */ int getTokensCount(); + /** * * @@ -65,6 +68,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..52cdc17551 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -34,6 +34,7 @@ public final class StreamPartition extends com.google.protobuf.GeneratedMessageV // @@protoc_insertion_point(message_implements:google.bigtable.v2.StreamPartition) StreamPartitionOrBuilder { private static final long serialVersionUID = 0L; + // Use StreamPartition.newBuilder() to construct. private StreamPartition(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -65,6 +66,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 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasRowRange() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -97,6 +100,7 @@ public boolean hasRowRange() { public com.google.bigtable.v2.RowRange getRowRange() { return rowRange_ == null ? com.google.bigtable.v2.RowRange.getDefaultInstance() : rowRange_; } + /** * * @@ -275,6 +279,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -478,6 +483,7 @@ public Builder mergeFrom( com.google.bigtable.v2.RowRange.Builder, com.google.bigtable.v2.RowRangeOrBuilder> rowRangeBuilder_; + /** * * @@ -493,6 +499,7 @@ public Builder mergeFrom( public boolean hasRowRange() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -512,6 +519,7 @@ public com.google.bigtable.v2.RowRange getRowRange() { return rowRangeBuilder_.getMessage(); } } + /** * * @@ -535,6 +543,7 @@ public Builder setRowRange(com.google.bigtable.v2.RowRange value) { onChanged(); return this; } + /** * * @@ -555,6 +564,7 @@ public Builder setRowRange(com.google.bigtable.v2.RowRange.Builder builderForVal onChanged(); return this; } + /** * * @@ -583,6 +593,7 @@ public Builder mergeRowRange(com.google.bigtable.v2.RowRange value) { } return this; } + /** * * @@ -603,6 +614,7 @@ public Builder clearRowRange() { onChanged(); return this; } + /** * * @@ -618,6 +630,7 @@ public com.google.bigtable.v2.RowRange.Builder getRowRangeBuilder() { onChanged(); return getRowRangeFieldBuilder().getBuilder(); } + /** * * @@ -635,6 +648,7 @@ public com.google.bigtable.v2.RowRangeOrBuilder getRowRangeOrBuilder() { return rowRange_ == null ? com.google.bigtable.v2.RowRange.getDefaultInstance() : rowRange_; } } + /** * * 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..a5134901e1 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface StreamPartitionOrBuilder @@ -37,6 +37,7 @@ public interface StreamPartitionOrBuilder * @return Whether the rowRange field is set. */ boolean hasRowRange(); + /** * * @@ -50,6 +51,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..557218a2df 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 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. 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..8d9dc7e6a8 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class TimestampRange extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.TimestampRange) TimestampRangeOrBuilder { private static final long serialVersionUID = 0L; + // Use TimestampRange.newBuilder() to construct. private TimestampRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -63,6 +64,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 +83,7 @@ public long getStartTimestampMicros() { public static final int END_TIMESTAMP_MICROS_FIELD_NUMBER = 2; private long endTimestampMicros_ = 0L; + /** * * @@ -263,6 +266,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -457,6 +461,7 @@ public Builder mergeFrom( private int bitField0_; private long startTimestampMicros_; + /** * * @@ -472,6 +477,7 @@ public Builder mergeFrom( public long getStartTimestampMicros() { return startTimestampMicros_; } + /** * * @@ -491,6 +497,7 @@ public Builder setStartTimestampMicros(long value) { onChanged(); return this; } + /** * * @@ -510,6 +517,7 @@ public Builder clearStartTimestampMicros() { } private long endTimestampMicros_; + /** * * @@ -525,6 +533,7 @@ public Builder clearStartTimestampMicros() { public long getEndTimestampMicros() { return endTimestampMicros_; } + /** * * @@ -544,6 +553,7 @@ public Builder setEndTimestampMicros(long value) { onChanged(); return this; } + /** * * 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..2a093e2b10 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface TimestampRangeOrBuilder 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 new file mode 100644 index 0000000000..b025b121ce --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Type.java @@ -0,0 +1,24269 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/types.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +/** + * + * + *
    + * `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 final class Type extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type) + TypeOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Type.newBuilder() to construct. + private Type(com.google.protobuf.GeneratedMessageV3.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 + 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 interface BytesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Bytes) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The encoding to use when converting to/from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; + * + * @return Whether the encoding field is set. + */ + boolean hasEncoding(); + + /** + * + * + *
    +     * The encoding to use when converting to/from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; + * + * @return The encoding. + */ + com.google.bigtable.v2.Type.Bytes.Encoding getEncoding(); + + /** + * + * + *
    +     * The encoding to use when converting to/from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; + */ + com.google.bigtable.v2.Type.Bytes.EncodingOrBuilder getEncodingOrBuilder(); + } + + /** + * + * + *
    +   * Bytes
    +   * Values of type `Bytes` are stored in `Value.bytes_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Bytes} + */ + public static final class Bytes extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Bytes) + BytesOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Bytes.newBuilder() to construct. + private Bytes(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Bytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Bytes.class, + com.google.bigtable.v2.Type.Bytes.Builder.class); + } + + public interface EncodingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Bytes.Encoding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +       * Use `Raw` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + * + * @return Whether the raw field is set. + */ + boolean hasRaw(); + + /** + * + * + *
    +       * Use `Raw` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + * + * @return The raw. + */ + com.google.bigtable.v2.Type.Bytes.Encoding.Raw getRaw(); + + /** + * + * + *
    +       * Use `Raw` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + */ + com.google.bigtable.v2.Type.Bytes.Encoding.RawOrBuilder getRawOrBuilder(); + + com.google.bigtable.v2.Type.Bytes.Encoding.EncodingCase getEncodingCase(); + } + + /** + * + * + *
    +     * Rules used to convert to/from lower level types.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Bytes.Encoding} + */ + public static final class Encoding extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Bytes.Encoding) + EncodingOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Encoding.newBuilder() to construct. + private Encoding(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Bytes_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Bytes.Encoding.class, + com.google.bigtable.v2.Type.Bytes.Encoding.Builder.class); + } + + public interface RawOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Bytes.Encoding.Raw) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +       * Leaves the value "as-is"
    +       * * Order-preserving? Yes
    +       * * Self-delimiting? No
    +       * * Compatibility? N/A
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Bytes.Encoding.Raw} + */ + public static final class Raw extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Bytes.Encoding.Raw) + RawOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Raw.newBuilder() to construct. + private Raw(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Bytes_Encoding_Raw_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Bytes.Encoding.Raw.class, + com.google.bigtable.v2.Type.Bytes.Encoding.Raw.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.Bytes.Encoding.Raw)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Bytes.Encoding.Raw other = + (com.google.bigtable.v2.Type.Bytes.Encoding.Raw) 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.Bytes.Encoding.Raw parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Bytes.Encoding.Raw 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.Bytes.Encoding.Raw parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Bytes.Encoding.Raw 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.Bytes.Encoding.Raw parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Bytes.Encoding.Raw 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.Bytes.Encoding.Raw parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.Bytes.Encoding.Raw 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; + } + + /** + * + * + *
    +         * Leaves the value "as-is"
    +         * * Order-preserving? Yes
    +         * * Self-delimiting? No
    +         * * Compatibility? N/A
    +         * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Bytes.Encoding.Raw} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Bytes.Encoding.Raw) + com.google.bigtable.v2.Type.Bytes.Encoding.RawOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Bytes_Encoding_Raw_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Bytes.Encoding.Raw.class, + com.google.bigtable.v2.Type.Bytes.Encoding.Raw.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Bytes.Encoding.Raw.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Bytes_Encoding_Raw_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes.Encoding.Raw getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes.Encoding.Raw build() { + com.google.bigtable.v2.Type.Bytes.Encoding.Raw result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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); + 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.Bytes.Encoding.Raw) { + return mergeFrom((com.google.bigtable.v2.Type.Bytes.Encoding.Raw) other); + } else { + super.mergeFrom(other); + return this; + } + } + + 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; + 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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.Raw) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Bytes.Encoding.Raw) + private static final com.google.bigtable.v2.Type.Bytes.Encoding.Raw DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Bytes.Encoding.Raw(); + } + + public static com.google.bigtable.v2.Type.Bytes.Encoding.Raw getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Raw 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.Bytes.Encoding.Raw 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 { + RAW(1), + 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 RAW; + 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 RAW_FIELD_NUMBER = 1; + + /** + * + * + *
    +       * Use `Raw` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + * + * @return Whether the raw field is set. + */ + @java.lang.Override + public boolean hasRaw() { + return encodingCase_ == 1; + } + + /** + * + * + *
    +       * Use `Raw` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + * + * @return The raw. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes.Encoding.Raw getRaw() { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Bytes.Encoding.Raw) encoding_; + } + return com.google.bigtable.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); + } + + /** + * + * + *
    +       * Use `Raw` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes.Encoding.RawOrBuilder getRawOrBuilder() { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Bytes.Encoding.Raw) encoding_; + } + return com.google.bigtable.v2.Type.Bytes.Encoding.Raw.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.Bytes.Encoding.Raw) 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.Bytes.Encoding.Raw) 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.Bytes.Encoding)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Bytes.Encoding other = + (com.google.bigtable.v2.Type.Bytes.Encoding) obj; + + if (!getEncodingCase().equals(other.getEncodingCase())) return false; + switch (encodingCase_) { + case 1: + if (!getRaw().equals(other.getRaw())) 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) + RAW_FIELD_NUMBER; + hash = (53 * hash) + getRaw().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type.Bytes.Encoding parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Bytes.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.Bytes.Encoding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Bytes.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.Bytes.Encoding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Bytes.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.Bytes.Encoding parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.Bytes.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.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.Bytes.Encoding} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Bytes.Encoding) + com.google.bigtable.v2.Type.Bytes.EncodingOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Bytes_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Bytes.Encoding.class, + com.google.bigtable.v2.Type.Bytes.Encoding.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Bytes.Encoding.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rawBuilder_ != null) { + rawBuilder_.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_Bytes_Encoding_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes.Encoding getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Bytes.Encoding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes.Encoding build() { + com.google.bigtable.v2.Type.Bytes.Encoding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes.Encoding buildPartial() { + com.google.bigtable.v2.Type.Bytes.Encoding result = + new com.google.bigtable.v2.Type.Bytes.Encoding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.Type.Bytes.Encoding result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.Type.Bytes.Encoding result) { + result.encodingCase_ = encodingCase_; + result.encoding_ = this.encoding_; + if (encodingCase_ == 1 && rawBuilder_ != null) { + result.encoding_ = rawBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Bytes.Encoding) { + return mergeFrom((com.google.bigtable.v2.Type.Bytes.Encoding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.Bytes.Encoding other) { + if (other == com.google.bigtable.v2.Type.Bytes.Encoding.getDefaultInstance()) return this; + switch (other.getEncodingCase()) { + case RAW: + { + mergeRaw(other.getRaw()); + 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(getRawFieldBuilder().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 EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } + + public Builder clearEncoding() { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + 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_; + + /** + * + * + *
    +         * Use `Raw` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + * + * @return Whether the raw field is set. + */ + @java.lang.Override + public boolean hasRaw() { + return encodingCase_ == 1; + } + + /** + * + * + *
    +         * Use `Raw` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + * + * @return The raw. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes.Encoding.Raw getRaw() { + if (rawBuilder_ == null) { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Bytes.Encoding.Raw) encoding_; + } + return com.google.bigtable.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); + } else { + if (encodingCase_ == 1) { + return rawBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); + } + } + + /** + * + * + *
    +         * Use `Raw` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + */ + public Builder setRaw(com.google.bigtable.v2.Type.Bytes.Encoding.Raw value) { + if (rawBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + rawBuilder_.setMessage(value); + } + encodingCase_ = 1; + return this; + } + + /** + * + * + *
    +         * Use `Raw` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + */ + public Builder setRaw( + com.google.bigtable.v2.Type.Bytes.Encoding.Raw.Builder builderForValue) { + if (rawBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + rawBuilder_.setMessage(builderForValue.build()); + } + encodingCase_ = 1; + return this; + } + + /** + * + * + *
    +         * Use `Raw` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + */ + public Builder mergeRaw(com.google.bigtable.v2.Type.Bytes.Encoding.Raw value) { + if (rawBuilder_ == null) { + if (encodingCase_ == 1 + && encoding_ + != com.google.bigtable.v2.Type.Bytes.Encoding.Raw.getDefaultInstance()) { + encoding_ = + com.google.bigtable.v2.Type.Bytes.Encoding.Raw.newBuilder( + (com.google.bigtable.v2.Type.Bytes.Encoding.Raw) encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 1) { + rawBuilder_.mergeFrom(value); + } else { + rawBuilder_.setMessage(value); + } + } + encodingCase_ = 1; + return this; + } + + /** + * + * + *
    +         * Use `Raw` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + */ + public Builder clearRaw() { + if (rawBuilder_ == null) { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + } + rawBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +         * Use `Raw` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + */ + public com.google.bigtable.v2.Type.Bytes.Encoding.Raw.Builder getRawBuilder() { + return getRawFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +         * Use `Raw` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes.Encoding.RawOrBuilder getRawOrBuilder() { + if ((encodingCase_ == 1) && (rawBuilder_ != null)) { + return rawBuilder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Bytes.Encoding.Raw) encoding_; + } + return com.google.bigtable.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); + } + } + + /** + * + * + *
    +         * Use `Raw` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + 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() { + if (rawBuilder_ == null) { + if (!(encodingCase_ == 1)) { + encoding_ = com.google.bigtable.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); + } + rawBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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>( + (com.google.bigtable.v2.Type.Bytes.Encoding.Raw) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 1; + onChanged(); + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Bytes.Encoding) + private static final com.google.bigtable.v2.Type.Bytes.Encoding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Bytes.Encoding(); + } + + public static com.google.bigtable.v2.Type.Bytes.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.Bytes.Encoding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + 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.
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes.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.Bytes.Encoding encoding = 1; + * + * @return The encoding. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes.Encoding getEncoding() { + return encoding_ == null + ? com.google.bigtable.v2.Type.Bytes.Encoding.getDefaultInstance() + : encoding_; + } + + /** + * + * + *
    +     * The encoding to use when converting to/from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes.EncodingOrBuilder getEncodingOrBuilder() { + return encoding_ == null + ? com.google.bigtable.v2.Type.Bytes.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.v2.Type.Bytes)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Bytes other = (com.google.bigtable.v2.Type.Bytes) 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; + } + + @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; + } + + public static com.google.bigtable.v2.Type.Bytes parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Bytes 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.Bytes parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Bytes 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.Bytes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Bytes 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.Bytes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.Bytes 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; + } + + /** + * + * + *
    +     * Bytes
    +     * Values of type `Bytes` are stored in `Value.bytes_value`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Bytes} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Bytes) + com.google.bigtable.v2.Type.BytesOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Bytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Bytes.class, + com.google.bigtable.v2.Type.Bytes.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Bytes.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(); + } + } + + @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_Bytes_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Bytes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes build() { + com.google.bigtable.v2.Type.Bytes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes buildPartial() { + com.google.bigtable.v2.Type.Bytes result = new com.google.bigtable.v2.Type.Bytes(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.Type.Bytes 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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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) { + return mergeFrom((com.google.bigtable.v2.Type.Bytes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.Bytes other) { + if (other == com.google.bigtable.v2.Type.Bytes.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(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_; + + private com.google.bigtable.v2.Type.Bytes.Encoding encoding_; + private com.google.protobuf.SingleFieldBuilderV3< + 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.
    +       * 
    + * + * .google.bigtable.v2.Type.Bytes.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.Bytes.Encoding encoding = 1; + * + * @return The encoding. + */ + public com.google.bigtable.v2.Type.Bytes.Encoding getEncoding() { + if (encodingBuilder_ == null) { + return encoding_ == null + ? com.google.bigtable.v2.Type.Bytes.Encoding.getDefaultInstance() + : encoding_; + } else { + return encodingBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * The encoding to use when converting to/from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; + */ + public Builder setEncoding(com.google.bigtable.v2.Type.Bytes.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.v2.Type.Bytes.Encoding encoding = 1; + */ + public Builder setEncoding( + com.google.bigtable.v2.Type.Bytes.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.v2.Type.Bytes.Encoding encoding = 1; + */ + public Builder mergeEncoding(com.google.bigtable.v2.Type.Bytes.Encoding value) { + if (encodingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && encoding_ != null + && encoding_ != com.google.bigtable.v2.Type.Bytes.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/from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Bytes.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.Bytes.Encoding encoding = 1; + */ + public com.google.bigtable.v2.Type.Bytes.Encoding.Builder getEncodingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getEncodingFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * The encoding to use when converting to/from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; + */ + public com.google.bigtable.v2.Type.Bytes.EncodingOrBuilder getEncodingOrBuilder() { + if (encodingBuilder_ != null) { + return encodingBuilder_.getMessageOrBuilder(); + } else { + return encoding_ == null + ? com.google.bigtable.v2.Type.Bytes.Encoding.getDefaultInstance() + : encoding_; + } + } + + /** + * + * + *
    +       * The encoding to use when converting to/from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Bytes.Encoding, + com.google.bigtable.v2.Type.Bytes.Encoding.Builder, + com.google.bigtable.v2.Type.Bytes.EncodingOrBuilder> + getEncodingFieldBuilder() { + if (encodingBuilder_ == null) { + encodingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Bytes.Encoding, + com.google.bigtable.v2.Type.Bytes.Encoding.Builder, + com.google.bigtable.v2.Type.Bytes.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.v2.Type.Bytes) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Bytes) + private static final com.google.bigtable.v2.Type.Bytes DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Bytes(); + } + + public static com.google.bigtable.v2.Type.Bytes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Bytes 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.Bytes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface StringOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.String) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The encoding to use when converting to/from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.String.Encoding encoding = 1; + * + * @return Whether the encoding field is set. + */ + boolean hasEncoding(); + + /** + * + * + *
    +     * The encoding to use when converting to/from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.String.Encoding encoding = 1; + * + * @return The encoding. + */ + com.google.bigtable.v2.Type.String.Encoding getEncoding(); + + /** + * + * + *
    +     * The encoding to use when converting to/from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.String.Encoding encoding = 1; + */ + com.google.bigtable.v2.Type.String.EncodingOrBuilder getEncodingOrBuilder(); + } + + /** + * + * + *
    +   * String
    +   * Values of type `String` are stored in `Value.string_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.String} + */ + public static final class String extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.String) + StringOrBuilder { + private static final long serialVersionUID = 0L; + + // Use String.newBuilder() to construct. + private String(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_String_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.String.class, + com.google.bigtable.v2.Type.String.Builder.class); + } + + public interface EncodingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.String.Encoding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +       * Deprecated: if set, converts to an empty `utf8_bytes`.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + * + * @deprecated google.bigtable.v2.Type.String.Encoding.utf8_raw is deprecated. See + * google/bigtable/v2/types.proto;l=97 + * @return Whether the utf8Raw field is set. + */ + @java.lang.Deprecated + boolean hasUtf8Raw(); + + /** + * + * + *
    +       * Deprecated: if set, converts to an empty `utf8_bytes`.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + * + * @deprecated google.bigtable.v2.Type.String.Encoding.utf8_raw is deprecated. See + * google/bigtable/v2/types.proto;l=97 + * @return The utf8Raw. + */ + @java.lang.Deprecated + com.google.bigtable.v2.Type.String.Encoding.Utf8Raw getUtf8Raw(); + + /** + * + * + *
    +       * Deprecated: if set, converts to an empty `utf8_bytes`.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.bigtable.v2.Type.String.Encoding.Utf8RawOrBuilder getUtf8RawOrBuilder(); + + /** + * + * + *
    +       * Use `Utf8Bytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * + * @return Whether the utf8Bytes field is set. + */ + boolean hasUtf8Bytes(); + + /** + * + * + *
    +       * Use `Utf8Bytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * + * @return The utf8Bytes. + */ + com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes getUtf8Bytes(); + + /** + * + * + *
    +       * Use `Utf8Bytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + com.google.bigtable.v2.Type.String.Encoding.Utf8BytesOrBuilder getUtf8BytesOrBuilder(); + + com.google.bigtable.v2.Type.String.Encoding.EncodingCase getEncodingCase(); + } + + /** + * + * + *
    +     * Rules used to convert to/from lower level types.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.String.Encoding} + */ + public static final class Encoding extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.String.Encoding) + EncodingOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Encoding.newBuilder() to construct. + private Encoding(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_String_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.String.Encoding.class, + com.google.bigtable.v2.Type.String.Encoding.Builder.class); + } + + @java.lang.Deprecated + public interface Utf8RawOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.String.Encoding.Utf8Raw) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +       * Deprecated: prefer the equivalent `Utf8Bytes`.
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.String.Encoding.Utf8Raw} + */ + @java.lang.Deprecated + public static final class Utf8Raw extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.String.Encoding.Utf8Raw) + Utf8RawOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Utf8Raw.newBuilder() to construct. + private Utf8Raw(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Raw_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.class, + com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.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.String.Encoding.Utf8Raw)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.String.Encoding.Utf8Raw other = + (com.google.bigtable.v2.Type.String.Encoding.Utf8Raw) 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.String.Encoding.Utf8Raw parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.String.Encoding.Utf8Raw 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.String.Encoding.Utf8Raw parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.String.Encoding.Utf8Raw 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.String.Encoding.Utf8Raw parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.String.Encoding.Utf8Raw 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.String.Encoding.Utf8Raw parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.String.Encoding.Utf8Raw 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; + } + + /** + * + * + *
    +         * Deprecated: prefer the equivalent `Utf8Bytes`.
    +         * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.String.Encoding.Utf8Raw} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.String.Encoding.Utf8Raw) + com.google.bigtable.v2.Type.String.Encoding.Utf8RawOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Raw_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.class, + com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_String_Encoding_Utf8Raw_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.String.Encoding.Utf8Raw getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.String.Encoding.Utf8Raw build() { + com.google.bigtable.v2.Type.String.Encoding.Utf8Raw result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.String.Encoding.Utf8Raw buildPartial() { + com.google.bigtable.v2.Type.String.Encoding.Utf8Raw result = + new com.google.bigtable.v2.Type.String.Encoding.Utf8Raw(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.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) { + if (other == com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.String.Encoding.Utf8Raw) + private static final com.google.bigtable.v2.Type.String.Encoding.Utf8Raw DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.String.Encoding.Utf8Raw(); + } + + public static com.google.bigtable.v2.Type.String.Encoding.Utf8Raw getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Utf8Raw 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.String.Encoding.Utf8Raw getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Utf8BytesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.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)`
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.String.Encoding.Utf8Bytes} + */ + public static final class Utf8Bytes extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.String.Encoding.Utf8Bytes) + Utf8BytesOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Utf8Bytes.newBuilder() to construct. + private Utf8Bytes(com.google.protobuf.GeneratedMessageV3.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.v2.TypesProto + .internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Bytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Bytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.class, + com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.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.String.Encoding.Utf8Bytes)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes other = + (com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) 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.String.Encoding.Utf8Bytes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes 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.String.Encoding.Utf8Bytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes 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.String.Encoding.Utf8Bytes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes 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.String.Encoding.Utf8Bytes parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.String.Encoding.Utf8Bytes 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; + } + + /** + * + * + *
    +         * 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)`
    +         * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.String.Encoding.Utf8Bytes} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.String.Encoding.Utf8Bytes) + com.google.bigtable.v2.Type.String.Encoding.Utf8BytesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Bytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Bytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.class, + com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_String_Encoding_Utf8Bytes_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes build() { + com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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); + 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.String.Encoding.Utf8Bytes) { + return mergeFrom((com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + 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; + 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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.Utf8Bytes) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.String.Encoding.Utf8Bytes) + private static final com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes(); + } + + public static com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Utf8Bytes 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.String.Encoding.Utf8Bytes 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 { + @java.lang.Deprecated + UTF8_RAW(1), + UTF8_BYTES(2), + 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 UTF8_RAW; + case 2: + return UTF8_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 UTF8_RAW_FIELD_NUMBER = 1; + + /** + * + * + *
    +       * Deprecated: if set, converts to an empty `utf8_bytes`.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + * + * @deprecated google.bigtable.v2.Type.String.Encoding.utf8_raw is deprecated. See + * google/bigtable/v2/types.proto;l=97 + * @return Whether the utf8Raw field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasUtf8Raw() { + return encodingCase_ == 1; + } + + /** + * + * + *
    +       * Deprecated: if set, converts to an empty `utf8_bytes`.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + * + * @deprecated google.bigtable.v2.Type.String.Encoding.utf8_raw is deprecated. See + * google/bigtable/v2/types.proto;l=97 + * @return The utf8Raw. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.bigtable.v2.Type.String.Encoding.Utf8Raw getUtf8Raw() { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.String.Encoding.Utf8Raw) encoding_; + } + return com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); + } + + /** + * + * + *
    +       * Deprecated: if set, converts to an empty `utf8_bytes`.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.bigtable.v2.Type.String.Encoding.Utf8RawOrBuilder getUtf8RawOrBuilder() { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.String.Encoding.Utf8Raw) encoding_; + } + return com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); + } + + public static final int UTF8_BYTES_FIELD_NUMBER = 2; + + /** + * + * + *
    +       * Use `Utf8Bytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * + * @return Whether the utf8Bytes field is set. + */ + @java.lang.Override + public boolean hasUtf8Bytes() { + return encodingCase_ == 2; + } + + /** + * + * + *
    +       * Use `Utf8Bytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * + * @return The utf8Bytes. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes getUtf8Bytes() { + if (encodingCase_ == 2) { + return (com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) encoding_; + } + return com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); + } + + /** + * + * + *
    +       * Use `Utf8Bytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.String.Encoding.Utf8BytesOrBuilder + getUtf8BytesOrBuilder() { + if (encodingCase_ == 2) { + return (com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) encoding_; + } + return com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.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.String.Encoding.Utf8Raw) encoding_); + } + if (encodingCase_ == 2) { + output.writeMessage(2, (com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) 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.String.Encoding.Utf8Raw) encoding_); + } + if (encodingCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) 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.String.Encoding)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.String.Encoding other = + (com.google.bigtable.v2.Type.String.Encoding) obj; + + if (!getEncodingCase().equals(other.getEncodingCase())) return false; + switch (encodingCase_) { + case 1: + if (!getUtf8Raw().equals(other.getUtf8Raw())) return false; + break; + case 2: + if (!getUtf8Bytes().equals(other.getUtf8Bytes())) 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) + UTF8_RAW_FIELD_NUMBER; + hash = (53 * hash) + getUtf8Raw().hashCode(); + break; + case 2: + hash = (37 * hash) + UTF8_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getUtf8Bytes().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type.String.Encoding parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.String.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.String.Encoding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.String.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.String.Encoding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.String.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.String.Encoding parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.String.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.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.String.Encoding} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.String.Encoding) + com.google.bigtable.v2.Type.String.EncodingOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_String_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.String.Encoding.class, + com.google.bigtable.v2.Type.String.Encoding.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.String.Encoding.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (utf8RawBuilder_ != null) { + utf8RawBuilder_.clear(); + } + if (utf8BytesBuilder_ != null) { + utf8BytesBuilder_.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_String_Encoding_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.String.Encoding getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.String.Encoding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.String.Encoding build() { + com.google.bigtable.v2.Type.String.Encoding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.String.Encoding buildPartial() { + com.google.bigtable.v2.Type.String.Encoding result = + new com.google.bigtable.v2.Type.String.Encoding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.Type.String.Encoding result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.Type.String.Encoding result) { + result.encodingCase_ = encodingCase_; + result.encoding_ = this.encoding_; + if (encodingCase_ == 1 && utf8RawBuilder_ != null) { + result.encoding_ = utf8RawBuilder_.build(); + } + if (encodingCase_ == 2 && utf8BytesBuilder_ != null) { + result.encoding_ = utf8BytesBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.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) { + if (other == com.google.bigtable.v2.Type.String.Encoding.getDefaultInstance()) + return this; + switch (other.getEncodingCase()) { + case UTF8_RAW: + { + mergeUtf8Raw(other.getUtf8Raw()); + break; + } + case UTF8_BYTES: + { + mergeUtf8Bytes(other.getUtf8Bytes()); + 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(getUtf8RawFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getUtf8BytesFieldBuilder().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; + } + + 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.SingleFieldBuilderV3< + 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_; + + /** + * + * + *
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + * + * @deprecated google.bigtable.v2.Type.String.Encoding.utf8_raw is deprecated. See + * google/bigtable/v2/types.proto;l=97 + * @return Whether the utf8Raw field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasUtf8Raw() { + return encodingCase_ == 1; + } + + /** + * + * + *
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + * + * @deprecated google.bigtable.v2.Type.String.Encoding.utf8_raw is deprecated. See + * google/bigtable/v2/types.proto;l=97 + * @return The utf8Raw. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.bigtable.v2.Type.String.Encoding.Utf8Raw getUtf8Raw() { + if (utf8RawBuilder_ == null) { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.String.Encoding.Utf8Raw) encoding_; + } + return com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); + } else { + if (encodingCase_ == 1) { + return utf8RawBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); + } + } + + /** + * + * + *
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setUtf8Raw(com.google.bigtable.v2.Type.String.Encoding.Utf8Raw value) { + if (utf8RawBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + utf8RawBuilder_.setMessage(value); + } + encodingCase_ = 1; + return this; + } + + /** + * + * + *
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setUtf8Raw( + com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.Builder builderForValue) { + if (utf8RawBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + utf8RawBuilder_.setMessage(builderForValue.build()); + } + encodingCase_ = 1; + return this; + } + + /** + * + * + *
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder mergeUtf8Raw(com.google.bigtable.v2.Type.String.Encoding.Utf8Raw value) { + if (utf8RawBuilder_ == null) { + if (encodingCase_ == 1 + && encoding_ + != com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance()) { + encoding_ = + com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.newBuilder( + (com.google.bigtable.v2.Type.String.Encoding.Utf8Raw) encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 1) { + utf8RawBuilder_.mergeFrom(value); + } else { + utf8RawBuilder_.setMessage(value); + } + } + encodingCase_ = 1; + return this; + } + + /** + * + * + *
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearUtf8Raw() { + if (utf8RawBuilder_ == null) { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + } + utf8RawBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.Builder getUtf8RawBuilder() { + return getUtf8RawFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.bigtable.v2.Type.String.Encoding.Utf8RawOrBuilder getUtf8RawOrBuilder() { + if ((encodingCase_ == 1) && (utf8RawBuilder_ != null)) { + return utf8RawBuilder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.String.Encoding.Utf8Raw) encoding_; + } + return com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); + } + } + + /** + * + * + *
    +         * Deprecated: if set, converts to an empty `utf8_bytes`.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + 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() { + if (utf8RawBuilder_ == null) { + if (!(encodingCase_ == 1)) { + encoding_ = com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); + } + utf8RawBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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>( + (com.google.bigtable.v2.Type.String.Encoding.Utf8Raw) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 1; + onChanged(); + return utf8RawBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + 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_; + + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * + * @return Whether the utf8Bytes field is set. + */ + @java.lang.Override + public boolean hasUtf8Bytes() { + return encodingCase_ == 2; + } + + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + * + * @return The utf8Bytes. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes getUtf8Bytes() { + if (utf8BytesBuilder_ == null) { + if (encodingCase_ == 2) { + return (com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) encoding_; + } + return com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); + } else { + if (encodingCase_ == 2) { + return utf8BytesBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); + } + } + + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + public Builder setUtf8Bytes(com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes value) { + if (utf8BytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + utf8BytesBuilder_.setMessage(value); + } + encodingCase_ = 2; + return this; + } + + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + public Builder setUtf8Bytes( + com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.Builder builderForValue) { + if (utf8BytesBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + utf8BytesBuilder_.setMessage(builderForValue.build()); + } + encodingCase_ = 2; + return this; + } + + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + public Builder mergeUtf8Bytes(com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes value) { + if (utf8BytesBuilder_ == null) { + if (encodingCase_ == 2 + && encoding_ + != com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance()) { + encoding_ = + com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.newBuilder( + (com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 2) { + utf8BytesBuilder_.mergeFrom(value); + } else { + utf8BytesBuilder_.setMessage(value); + } + } + encodingCase_ = 2; + return this; + } + + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + public Builder clearUtf8Bytes() { + if (utf8BytesBuilder_ == null) { + if (encodingCase_ == 2) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 2) { + encodingCase_ = 0; + encoding_ = null; + } + utf8BytesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + public com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.Builder getUtf8BytesBuilder() { + return getUtf8BytesFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.String.Encoding.Utf8BytesOrBuilder + getUtf8BytesOrBuilder() { + if ((encodingCase_ == 2) && (utf8BytesBuilder_ != null)) { + return utf8BytesBuilder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 2) { + return (com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) encoding_; + } + return com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); + } + } + + /** + * + * + *
    +         * Use `Utf8Bytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + 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() { + if (utf8BytesBuilder_ == null) { + if (!(encodingCase_ == 2)) { + encoding_ = + com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); + } + utf8BytesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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>( + (com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 2; + onChanged(); + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.String.Encoding) + private static final com.google.bigtable.v2.Type.String.Encoding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.String.Encoding(); + } + + public static com.google.bigtable.v2.Type.String.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.String.Encoding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + 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.
    +     * 
    + * + * .google.bigtable.v2.Type.String.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.String.Encoding encoding = 1; + * + * @return The encoding. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.String.Encoding getEncoding() { + return encoding_ == null + ? com.google.bigtable.v2.Type.String.Encoding.getDefaultInstance() + : encoding_; + } + + /** + * + * + *
    +     * The encoding to use when converting to/from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.String.Encoding encoding = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.String.EncodingOrBuilder getEncodingOrBuilder() { + return encoding_ == null + ? com.google.bigtable.v2.Type.String.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.v2.Type.String)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.String other = (com.google.bigtable.v2.Type.String) 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; + } + + @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; + } + + public static com.google.bigtable.v2.Type.String parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.String 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.String parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.String 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.String parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.String 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.String parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.String 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; + } + + /** + * + * + *
    +     * String
    +     * Values of type `String` are stored in `Value.string_value`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.String} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.String) + com.google.bigtable.v2.Type.StringOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_String_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.String.class, + com.google.bigtable.v2.Type.String.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.String.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(); + } + } + + @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_String_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.String getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.String.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.String build() { + com.google.bigtable.v2.Type.String result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.String buildPartial() { + com.google.bigtable.v2.Type.String result = new com.google.bigtable.v2.Type.String(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.Type.String 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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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) { + return mergeFrom((com.google.bigtable.v2.Type.String) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.String other) { + if (other == com.google.bigtable.v2.Type.String.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(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_; + + private com.google.bigtable.v2.Type.String.Encoding encoding_; + private com.google.protobuf.SingleFieldBuilderV3< + 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.
    +       * 
    + * + * .google.bigtable.v2.Type.String.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.String.Encoding encoding = 1; + * + * @return The encoding. + */ + public com.google.bigtable.v2.Type.String.Encoding getEncoding() { + if (encodingBuilder_ == null) { + return encoding_ == null + ? com.google.bigtable.v2.Type.String.Encoding.getDefaultInstance() + : encoding_; + } else { + return encodingBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * The encoding to use when converting to/from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding encoding = 1; + */ + public Builder setEncoding(com.google.bigtable.v2.Type.String.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.v2.Type.String.Encoding encoding = 1; + */ + public Builder setEncoding( + com.google.bigtable.v2.Type.String.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.v2.Type.String.Encoding encoding = 1; + */ + public Builder mergeEncoding(com.google.bigtable.v2.Type.String.Encoding value) { + if (encodingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && encoding_ != null + && encoding_ != com.google.bigtable.v2.Type.String.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/from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.String.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.String.Encoding encoding = 1; + */ + public com.google.bigtable.v2.Type.String.Encoding.Builder getEncodingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getEncodingFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * The encoding to use when converting to/from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding encoding = 1; + */ + public com.google.bigtable.v2.Type.String.EncodingOrBuilder getEncodingOrBuilder() { + if (encodingBuilder_ != null) { + return encodingBuilder_.getMessageOrBuilder(); + } else { + return encoding_ == null + ? com.google.bigtable.v2.Type.String.Encoding.getDefaultInstance() + : encoding_; + } + } + + /** + * + * + *
    +       * The encoding to use when converting to/from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.String.Encoding encoding = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.String.Encoding, + com.google.bigtable.v2.Type.String.Encoding.Builder, + com.google.bigtable.v2.Type.String.EncodingOrBuilder> + getEncodingFieldBuilder() { + if (encodingBuilder_ == null) { + encodingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.String.Encoding, + com.google.bigtable.v2.Type.String.Encoding.Builder, + com.google.bigtable.v2.Type.String.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.v2.Type.String) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.String) + private static final com.google.bigtable.v2.Type.String DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.String(); + } + + public static com.google.bigtable.v2.Type.String getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public String 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.String getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Int64OrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Int64) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * 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. + */ + boolean hasEncoding(); + + /** + * + * + *
    +     * The encoding to use when converting to/from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + * + * @return The encoding. + */ + com.google.bigtable.v2.Type.Int64.Encoding getEncoding(); + + /** + * + * + *
    +     * The encoding to use when converting to/from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + */ + com.google.bigtable.v2.Type.Int64.EncodingOrBuilder getEncodingOrBuilder(); + } + + /** + * + * + *
    +   * Int64
    +   * Values of type `Int64` are stored in `Value.int_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Int64} + */ + public static final class Int64 extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Int64) + Int64OrBuilder { + private static final long serialVersionUID = 0L; + + // Use Int64.newBuilder() to construct. + private Int64(com.google.protobuf.GeneratedMessageV3.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 + 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); + } + + public interface EncodingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Int64.Encoding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +       * Use `BigEndianBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + * @return Whether the bigEndianBytes field is set. + */ + boolean hasBigEndianBytes(); + + /** + * + * + *
    +       * Use `BigEndianBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + * @return The bigEndianBytes. + */ + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes getBigEndianBytes(); + + /** + * + * + *
    +       * Use `BigEndianBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + */ + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder + getBigEndianBytesOrBuilder(); + + com.google.bigtable.v2.Type.Int64.Encoding.EncodingCase getEncodingCase(); + } + + /** + * + * + *
    +     * Rules used to convert to/from lower level types.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Int64.Encoding} + */ + public static final class Encoding extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Int64.Encoding) + EncodingOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Encoding.newBuilder() to construct. + private Encoding(com.google.protobuf.GeneratedMessageV3.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 + 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 interface BigEndianBytesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +         * Deprecated: ignored if set.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * + * @return Whether the bytesType field is set. + */ + boolean hasBytesType(); + + /** + * + * + *
    +         * Deprecated: ignored if set.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * + * @return The bytesType. + */ + com.google.bigtable.v2.Type.Bytes getBytesType(); + + /** + * + * + *
    +         * Deprecated: ignored if set.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + 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`
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes} + */ + public static final class BigEndianBytes extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) + BigEndianBytesOrBuilder { + private static final long serialVersionUID = 0L; + + // Use BigEndianBytes.newBuilder() to construct. + private BigEndianBytes(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Int64_Encoding_BigEndianBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.class, + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.Builder.class); + } + + private int bitField0_; + public static final int BYTES_TYPE_FIELD_NUMBER = 1; + private com.google.bigtable.v2.Type.Bytes bytesType_; + + /** + * + * + *
    +         * Deprecated: ignored if set.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * + * @return Whether the bytesType field is set. + */ + @java.lang.Override + public boolean hasBytesType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +         * Deprecated: ignored if set.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * + * @return The bytesType. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Bytes getBytesType() { + return bytesType_ == null + ? com.google.bigtable.v2.Type.Bytes.getDefaultInstance() + : bytesType_; + } + + /** + * + * + *
    +         * Deprecated: ignored if set.
    +         * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { + return bytesType_ == null + ? com.google.bigtable.v2.Type.Bytes.getDefaultInstance() + : bytesType_; + } + + 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, getBytesType()); + } + 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, getBytesType()); + } + 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.Int64.Encoding.BigEndianBytes)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes other = + (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) obj; + + if (hasBytesType() != other.hasBytesType()) return false; + if (hasBytesType()) { + if (!getBytesType().equals(other.getBytesType())) 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 (hasBytesType()) { + hash = (37 * hash) + BYTES_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getBytesType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes 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.BigEndianBytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes 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.BigEndianBytes parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes 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.BigEndianBytes parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.Encoding.BigEndianBytes 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; + } + + /** + * + * + *
    +         * 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`
    +         * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Int64_Encoding_BigEndianBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.class, + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBytesTypeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bytesType_ = null; + if (bytesTypeBuilder_ != null) { + bytesTypeBuilder_.dispose(); + bytesTypeBuilder_ = 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_BigEndianBytes_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes build() { + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes buildPartial() { + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes result = + new com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bytesType_ = + bytesTypeBuilder_ == null ? bytesType_ : bytesTypeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) { + return mergeFrom((com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes other) { + if (other + == com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance()) + return this; + if (other.hasBytesType()) { + mergeBytesType(other.getBytesType()); + } + 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(getBytesTypeFieldBuilder().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.Bytes bytesType_; + 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_; + + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * + * @return Whether the bytesType field is set. + */ + public boolean hasBytesType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * + * @return The bytesType. + */ + public com.google.bigtable.v2.Type.Bytes getBytesType() { + if (bytesTypeBuilder_ == null) { + return bytesType_ == null + ? com.google.bigtable.v2.Type.Bytes.getDefaultInstance() + : bytesType_; + } else { + return bytesTypeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .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(); + } + bytesType_ = value; + } else { + bytesTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + public Builder setBytesType(com.google.bigtable.v2.Type.Bytes.Builder builderForValue) { + if (bytesTypeBuilder_ == null) { + bytesType_ = builderForValue.build(); + } else { + bytesTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + public Builder mergeBytesType(com.google.bigtable.v2.Type.Bytes value) { + if (bytesTypeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && bytesType_ != null + && bytesType_ != com.google.bigtable.v2.Type.Bytes.getDefaultInstance()) { + getBytesTypeBuilder().mergeFrom(value); + } else { + bytesType_ = value; + } + } else { + bytesTypeBuilder_.mergeFrom(value); + } + if (bytesType_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + public Builder clearBytesType() { + bitField0_ = (bitField0_ & ~0x00000001); + bytesType_ = null; + if (bytesTypeBuilder_ != null) { + bytesTypeBuilder_.dispose(); + bytesTypeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + public com.google.bigtable.v2.Type.Bytes.Builder getBytesTypeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBytesTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + public com.google.bigtable.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { + if (bytesTypeBuilder_ != null) { + return bytesTypeBuilder_.getMessageOrBuilder(); + } else { + return bytesType_ == null + ? com.google.bigtable.v2.Type.Bytes.getDefaultInstance() + : bytesType_; + } + } + + /** + * + * + *
    +           * Deprecated: ignored if set.
    +           * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + 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) { + 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>( + getBytesType(), getParentForChildren(), isClean()); + bytesType_ = null; + } + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) + private static final com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes(); + } + + public static com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigEndianBytes 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.BigEndianBytes + 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 { + BIG_ENDIAN_BYTES(1), + 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 BIG_ENDIAN_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 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_; + } + 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_; + } + return com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.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_); + } + 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_); + } + 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.Int64.Encoding)) { + return super.equals(obj); + } + 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: + } + 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) + BIG_ENDIAN_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getBigEndianBytes().hashCode(); + break; + case 0: + default: + } + 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 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 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + 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 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 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); + } + + 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); + } + + 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(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.bigtable.v2.Type.Int64.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.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 + 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); + } + + // Construct using com.google.bigtable.v2.Type.Int64.Encoding.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bigEndianBytesBuilder_ != null) { + bigEndianBytesBuilder_.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_Int64_Encoding_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance(); + } + + @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; + } + + @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; + } + + private void buildPartial0(com.google.bigtable.v2.Type.Int64.Encoding result) { + int from_bitField0_ = bitField0_; + } + + 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(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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) { + return mergeFrom((com.google.bigtable.v2.Type.Int64.Encoding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + 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; + } + } + 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( + 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 EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } + + public Builder clearEncoding() { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + 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 `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(); + } + } + + /** + * + * + *
    +         * 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; + } + + /** + * + * + *
    +         * 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; + } + + /** + * + * + *
    +         * 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; + } + + /** + * + * + *
    +         * 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(); + } + + /** + * + * + *
    +         * 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(); + } + } + + /** + * + * + *
    +         * 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_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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) + } + + // @@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 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; + } + + @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.v2.Type.Int64)) { + return super.equals(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; + } + + @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; + } + + 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.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.Int64 parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Int64 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Int64 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + 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); + } + + 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); + } + + 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); + } + + 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(); + } + } + + @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_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); + } + 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); + } + 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; + } + 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) { + return mergeFrom((com.google.bigtable.v2.Type.Int64) other); + } else { + super.mergeFrom(other); + 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; + } + + @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(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_; + + 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(); + } + } + + /** + * + * + *
    +       * 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(); + } + encoding_ = value; + } else { + encodingBuilder_.setMessage(value); + } + 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()); + } + 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); + } else { + encoding_ = value; + } + } else { + encodingBuilder_.mergeFrom(value); + } + 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_; + } + } + + /** + * + * + *
    +       * 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; + } + 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.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 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); + } + + private Bool() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Bool(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Bool_descriptor; + } + + @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); + } + + 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.Bool)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Bool other = (com.google.bigtable.v2.Type.Bool) 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.Bool parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Bool parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Bool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Bool parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + 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( + PARSER, input, extensionRegistry); + } + + 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); + } + + 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( + PARSER, input, extensionRegistry); + } + + 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); + } + + 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( + 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.Bool 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; + } + + /** + * + * + *
    +     * bool
    +     * Values of type `Bool` are stored in `Value.bool_value`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Bool} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@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_Bool_descriptor; + } + + @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); + } + + // Construct using com.google.bigtable.v2.Type.Bool.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Bool_descriptor; + } + + @java.lang.Override + 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.Bool build() { + com.google.bigtable.v2.Type.Bool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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); + 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.Bool) { + return mergeFrom((com.google.bigtable.v2.Type.Bool) 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; + 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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.Bool) + } + + // @@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.Bool(); + } + + 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() { + @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(); + } + }; + + 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.Bool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Float32OrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Float32) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +   * Float32
    +   * Values of type `Float32` are stored in `Value.float_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Float32} + */ + public static final class Float32 extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Float32) + Float32OrBuilder { + private static final long serialVersionUID = 0L; + + // Use Float32.newBuilder() to construct. + private Float32(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Float32() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Float32(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Float32_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Float32_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Float32.class, + com.google.bigtable.v2.Type.Float32.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.Float32)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Float32 other = (com.google.bigtable.v2.Type.Float32) 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.Float32 parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Float32 parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Float32 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Float32 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + 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( + PARSER, input, extensionRegistry); + } + + 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); + } + + 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( + PARSER, input, extensionRegistry); + } + + 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); + } + + 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( + 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.Float32 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; + } + + /** + * + * + *
    +     * Float32
    +     * Values of type `Float32` are stored in `Value.float_value`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Float32} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@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_Float32_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Float32_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Float32.class, + com.google.bigtable.v2.Type.Float32.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Float32.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Float32_descriptor; + } + + @java.lang.Override + 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.Float32 build() { + com.google.bigtable.v2.Type.Float32 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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); + 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); + } 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; + 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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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(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.Float32(); + } + + 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() { + @java.lang.Override + public Float32 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.Float32 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Float64OrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Float64) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +   * Float64
    +   * Values of type `Float64` are stored in `Value.float_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Float64} + */ + public static final class Float64 extends com.google.protobuf.GeneratedMessageV3 + 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); + } + + private Float64() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Float64(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Float64_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Float64_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Float64.class, + com.google.bigtable.v2.Type.Float64.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.Float64)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Float64 other = (com.google.bigtable.v2.Type.Float64) 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.Float64 parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Float64 parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Float64 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Float64 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + 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( + PARSER, input, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Float64 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, 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.Float64 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.Float64 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.Float64 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; + } + + /** + * + * + *
    +     * Float64
    +     * Values of type `Float64` are stored in `Value.float_value`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Float64} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@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_Float64_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Float64_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Float64.class, + com.google.bigtable.v2.Type.Float64.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Float64.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Float64_descriptor; + } + + @java.lang.Override + 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.Float64 build() { + com.google.bigtable.v2.Type.Float64 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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); + 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); + } 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; + 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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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(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.Float64(); + } + + 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() { + @java.lang.Override + public Float64 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.Float64 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TimestampOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Timestamp) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +   * Timestamp
    +   * Values of type `Timestamp` are stored in `Value.timestamp_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Timestamp} + */ + public static final class Timestamp extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Timestamp) + TimestampOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Timestamp.newBuilder() to construct. + private Timestamp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Timestamp() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Timestamp(); + } + + 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.GeneratedMessageV3.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); + } + + 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.Timestamp)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Timestamp other = (com.google.bigtable.v2.Type.Timestamp) 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.Timestamp parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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); + } + + public static com.google.bigtable.v2.Type.Timestamp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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); + } + + public static com.google.bigtable.v2.Type.Timestamp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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); + } + + public static com.google.bigtable.v2.Type.Timestamp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + 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.GeneratedMessageV3.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.Timestamp 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.Timestamp 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.Timestamp 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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_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; + } + + @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); + 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.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; + 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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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(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.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Date) + DateOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Date.newBuilder() to construct. + private Date(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Date() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new 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.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); + } + + 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.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); + } + + @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.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; + } + + @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); + } + + // Construct using com.google.bigtable.v2.Type.Date.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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); + } + + /** + * + * + *
    +   * 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); + } + + private Struct() { + fields_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Struct(); + } + + 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.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); + } + + 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.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 + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Field(); + } + + 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.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); + } + + 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.GeneratedMessageV3.isStringEmpty(fieldName_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(fieldName_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.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; + } + + @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); + } + + // Construct using com.google.bigtable.v2.Type.Struct.Field.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTypeFieldBuilder(); + } + } + + @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 clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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(getTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object 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.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 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 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_; + } + } + + /** + * + * + *
    +         * 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_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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 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); + } + + 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)); + } + 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)); + } + 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 (!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(); + } + 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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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); + } + + // Construct using com.google.bigtable.v2.Type.Struct.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @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); + 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_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.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.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(); + } + 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 + 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); + 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 getFieldsFieldBuilder().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 getFieldsFieldBuilder() + .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 getFieldsFieldBuilder() + .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 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; + } + return fieldsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.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.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Proto) + ProtoOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Proto.newBuilder() to construct. + private Proto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Proto() { + schemaBundleId_ = ""; + messageName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Proto(); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(schemaBundleId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(messageName_)) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.isStringEmpty(schemaBundleId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(messageName_)) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.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.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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); + } + 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); + } + 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_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.messageName_ = messageName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.Proto) { + return mergeFrom((com.google.bigtable.v2.Type.Proto) other); + } else { + super.mergeFrom(other); + return this; + } + } + + 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(); + } + if (!other.getMessageName().isEmpty()) { + messageName_ = other.messageName_; + 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: + { + 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; + } + } + + /** + * + * + *
    +       * 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; + } + + /** + * + * + *
    +       * 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; + } + + /** + * + * + *
    +       * 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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.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; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Proto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EnumOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Enum) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The ID of the schema bundle that this enum is defined in.
    +     * 
    + * + * 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.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Enum) + EnumOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Enum.newBuilder() to construct. + private Enum(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Enum() { + schemaBundleId_ = ""; + enumName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Enum(); + } + + 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 + protected com.google.protobuf.GeneratedMessageV3.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 ID of the schema bundle that this enum 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 enum 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 ENUM_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object enumName_ = ""; + + /** + * + * + *
    +     * 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.Override + 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 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. + */ + @java.lang.Override + 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; + + @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(schemaBundleId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(enumName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, enumName_); + } + 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(schemaBundleId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(enumName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, enumName_); + } + 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.Enum)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Enum other = (com.google.bigtable.v2.Type.Enum) obj; + + if (!getSchemaBundleId().equals(other.getSchemaBundleId())) return false; + if (!getEnumName().equals(other.getEnumName())) 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) + 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.Enum parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Enum parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Enum parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + 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.Enum parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + 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( + PARSER, input, extensionRegistry); + } + + 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); + } + + 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( + PARSER, input, extensionRegistry); + } + + 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); + } + + 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( + 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.Enum prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * A 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 Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@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_Enum_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.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); + } + + // Construct using com.google.bigtable.v2.Type.Enum.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + 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_Enum_descriptor; + } + + @java.lang.Override + 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.Enum build() { + com.google.bigtable.v2.Type.Enum result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + 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); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.Type.Enum result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schemaBundleId_ = schemaBundleId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enumName_ = enumName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.Enum) { + return mergeFrom((com.google.bigtable.v2.Type.Enum) other); + } else { + super.mergeFrom(other); + return this; + } + } + + 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(); + 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: + { + 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 ID of the schema bundle that this enum 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 enum 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 enum 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 enum 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 enum 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 enumName_ = ""; + + /** + * + * + *
    +       * 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. + */ + 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 (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * 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. + */ + 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 (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * 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 enumName to set. + * @return This builder for chaining. + */ + public Builder setEnumName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + enumName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The fully qualified name of the protobuf enum message, including package.
    +       * In the format of "foo.bar.EnumMessage".
    +       * 
    + * + * string enum_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnumName() { + enumName_ = getDefaultInstance().getEnumName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +       * 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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.Enum) + } + + // @@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.Enum(); + } + + 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() { + @java.lang.Override + public Enum 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.Enum getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ArrayOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Array) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The type of the elements in the array. This must not be `Array`.
    +     * 
    + * + * .google.bigtable.v2.Type element_type = 1; + * + * @return Whether the elementType field is set. + */ + boolean hasElementType(); + + /** + * + * + *
    +     * The type of the elements in the array. This must not be `Array`.
    +     * 
    + * + * .google.bigtable.v2.Type element_type = 1; + * + * @return The elementType. + */ + com.google.bigtable.v2.Type getElementType(); + + /** + * + * + *
    +     * The type of the elements in the array. This must not be `Array`.
    +     * 
    + * + * .google.bigtable.v2.Type element_type = 1; + */ + com.google.bigtable.v2.TypeOrBuilder getElementTypeOrBuilder(); + } + + /** + * + * + *
    +   * An ordered list of elements of a given type.
    +   * Values of type `Array` are stored in `Value.array_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Array} + */ + public static final class Array extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Array) + ArrayOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Array.newBuilder() to construct. + private Array(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Array_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Array.class, + com.google.bigtable.v2.Type.Array.Builder.class); + } + + private int bitField0_; + public static final int ELEMENT_TYPE_FIELD_NUMBER = 1; + private com.google.bigtable.v2.Type elementType_; + + /** + * + * + *
    +     * The type of the elements in the array. This must not be `Array`.
    +     * 
    + * + * .google.bigtable.v2.Type element_type = 1; + * + * @return Whether the elementType field is set. + */ + @java.lang.Override + public boolean hasElementType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * The type of the elements in the array. This must not be `Array`.
    +     * 
    + * + * .google.bigtable.v2.Type element_type = 1; + * + * @return The elementType. + */ + @java.lang.Override + public com.google.bigtable.v2.Type getElementType() { + return elementType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : elementType_; + } + + /** + * + * + *
    +     * The type of the elements in the array. This must not be `Array`.
    +     * 
    + * + * .google.bigtable.v2.Type element_type = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.TypeOrBuilder getElementTypeOrBuilder() { + return elementType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : elementType_; + } + + 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, getElementType()); + } + 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, getElementType()); + } + 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.Array)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Array other = (com.google.bigtable.v2.Type.Array) obj; + + if (hasElementType() != other.hasElementType()) return false; + if (hasElementType()) { + if (!getElementType().equals(other.getElementType())) 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 (hasElementType()) { + hash = (37 * hash) + ELEMENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getElementType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type.Array parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Array 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.Array parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Array 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.Array parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Array 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.Array parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.Array 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; + } + + /** + * + * + *
    +     * An ordered list of elements of a given type.
    +     * Values of type `Array` are stored in `Value.array_value`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Array} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Array) + com.google.bigtable.v2.Type.ArrayOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Array_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Array.class, + com.google.bigtable.v2.Type.Array.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Array.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getElementTypeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + elementType_ = null; + if (elementTypeBuilder_ != null) { + elementTypeBuilder_.dispose(); + elementTypeBuilder_ = 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_Array_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Array getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Array.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Array build() { + com.google.bigtable.v2.Type.Array result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Array buildPartial() { + com.google.bigtable.v2.Type.Array result = new com.google.bigtable.v2.Type.Array(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.Type.Array result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.elementType_ = + elementTypeBuilder_ == null ? elementType_ : elementTypeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Array) { + return mergeFrom((com.google.bigtable.v2.Type.Array) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.Array other) { + if (other == com.google.bigtable.v2.Type.Array.getDefaultInstance()) return this; + if (other.hasElementType()) { + mergeElementType(other.getElementType()); + } + 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(getElementTypeFieldBuilder().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 elementType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder> + elementTypeBuilder_; + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.v2.Type element_type = 1; + * + * @return Whether the elementType field is set. + */ + public boolean hasElementType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.v2.Type element_type = 1; + * + * @return The elementType. + */ + public com.google.bigtable.v2.Type getElementType() { + if (elementTypeBuilder_ == null) { + return elementType_ == null + ? com.google.bigtable.v2.Type.getDefaultInstance() + : elementType_; + } else { + return elementTypeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.v2.Type element_type = 1; + */ + public Builder setElementType(com.google.bigtable.v2.Type value) { + if (elementTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + elementType_ = value; + } else { + elementTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.v2.Type element_type = 1; + */ + public Builder setElementType(com.google.bigtable.v2.Type.Builder builderForValue) { + if (elementTypeBuilder_ == null) { + elementType_ = builderForValue.build(); + } else { + elementTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.v2.Type element_type = 1; + */ + public Builder mergeElementType(com.google.bigtable.v2.Type value) { + if (elementTypeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && elementType_ != null + && elementType_ != com.google.bigtable.v2.Type.getDefaultInstance()) { + getElementTypeBuilder().mergeFrom(value); + } else { + elementType_ = value; + } + } else { + elementTypeBuilder_.mergeFrom(value); + } + if (elementType_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.v2.Type element_type = 1; + */ + public Builder clearElementType() { + bitField0_ = (bitField0_ & ~0x00000001); + elementType_ = null; + if (elementTypeBuilder_ != null) { + elementTypeBuilder_.dispose(); + elementTypeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.v2.Type element_type = 1; + */ + public com.google.bigtable.v2.Type.Builder getElementTypeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getElementTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.v2.Type element_type = 1; + */ + public com.google.bigtable.v2.TypeOrBuilder getElementTypeOrBuilder() { + if (elementTypeBuilder_ != null) { + return elementTypeBuilder_.getMessageOrBuilder(); + } else { + return elementType_ == null + ? com.google.bigtable.v2.Type.getDefaultInstance() + : elementType_; + } + } + + /** + * + * + *
    +       * The type of the elements in the array. This must not be `Array`.
    +       * 
    + * + * .google.bigtable.v2.Type element_type = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder> + getElementTypeFieldBuilder() { + if (elementTypeBuilder_ == null) { + elementTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder>( + getElementType(), getParentForChildren(), isClean()); + elementType_ = null; + } + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Array) + private static final com.google.bigtable.v2.Type.Array DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Array(); + } + + public static com.google.bigtable.v2.Type.Array getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Array 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.Array getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MapOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Map) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The type of a map key.
    +     * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +     * 
    + * + * .google.bigtable.v2.Type key_type = 1; + * + * @return Whether the keyType field is set. + */ + boolean hasKeyType(); + + /** + * + * + *
    +     * The type of a map key.
    +     * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +     * 
    + * + * .google.bigtable.v2.Type key_type = 1; + * + * @return The keyType. + */ + com.google.bigtable.v2.Type getKeyType(); + + /** + * + * + *
    +     * The type of a map key.
    +     * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +     * 
    + * + * .google.bigtable.v2.Type key_type = 1; + */ + com.google.bigtable.v2.TypeOrBuilder getKeyTypeOrBuilder(); + + /** + * + * + *
    +     * The type of the values in a map.
    +     * 
    + * + * .google.bigtable.v2.Type value_type = 2; + * + * @return Whether the valueType field is set. + */ + boolean hasValueType(); + + /** + * + * + *
    +     * The type of the values in a map.
    +     * 
    + * + * .google.bigtable.v2.Type value_type = 2; + * + * @return The valueType. + */ + com.google.bigtable.v2.Type getValueType(); + + /** + * + * + *
    +     * The type of the values in a map.
    +     * 
    + * + * .google.bigtable.v2.Type value_type = 2; + */ + com.google.bigtable.v2.TypeOrBuilder getValueTypeOrBuilder(); + } + + /** + * + * + *
    +   * A mapping of keys to values of a given type.
    +   * Values of type `Map` are stored in a `Value.array_value` where each entry
    +   * is another `Value.array_value` with two elements (the key and the value,
    +   * in that order).
    +   * Normally encoded Map values won't have repeated keys, however, clients are
    +   * expected to handle the case in which they do. If the same key appears
    +   * multiple times, the _last_ value takes precedence.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Map} + */ + public static final class Map extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Map) + MapOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Map.newBuilder() to construct. + private Map(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Map_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Map.class, com.google.bigtable.v2.Type.Map.Builder.class); + } + + private int bitField0_; + public static final int KEY_TYPE_FIELD_NUMBER = 1; + private com.google.bigtable.v2.Type keyType_; + + /** + * + * + *
    +     * The type of a map key.
    +     * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +     * 
    + * + * .google.bigtable.v2.Type key_type = 1; + * + * @return Whether the keyType field is set. + */ + @java.lang.Override + public boolean hasKeyType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * The type of a map key.
    +     * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +     * 
    + * + * .google.bigtable.v2.Type key_type = 1; + * + * @return The keyType. + */ + @java.lang.Override + public com.google.bigtable.v2.Type getKeyType() { + return keyType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : keyType_; + } + + /** + * + * + *
    +     * The type of a map key.
    +     * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +     * 
    + * + * .google.bigtable.v2.Type key_type = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.TypeOrBuilder getKeyTypeOrBuilder() { + return keyType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : keyType_; + } + + public static final int VALUE_TYPE_FIELD_NUMBER = 2; + private com.google.bigtable.v2.Type valueType_; + + /** + * + * + *
    +     * The type of the values in a map.
    +     * 
    + * + * .google.bigtable.v2.Type value_type = 2; + * + * @return Whether the valueType field is set. + */ + @java.lang.Override + public boolean hasValueType() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +     * The type of the values in a map.
    +     * 
    + * + * .google.bigtable.v2.Type value_type = 2; + * + * @return The valueType. + */ + @java.lang.Override + public com.google.bigtable.v2.Type getValueType() { + return valueType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : valueType_; + } + + /** + * + * + *
    +     * The type of the values in a map.
    +     * 
    + * + * .google.bigtable.v2.Type value_type = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.TypeOrBuilder getValueTypeOrBuilder() { + return valueType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : valueType_; + } + + 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, getKeyType()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getValueType()); + } + 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, getKeyType()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getValueType()); + } + 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.Map)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Map other = (com.google.bigtable.v2.Type.Map) obj; + + if (hasKeyType() != other.hasKeyType()) return false; + if (hasKeyType()) { + if (!getKeyType().equals(other.getKeyType())) return false; + } + if (hasValueType() != other.hasValueType()) return false; + if (hasValueType()) { + if (!getValueType().equals(other.getValueType())) 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 (hasKeyType()) { + hash = (37 * hash) + KEY_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getKeyType().hashCode(); + } + if (hasValueType()) { + hash = (37 * hash) + VALUE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getValueType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type.Map parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Map 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.Map parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Map 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.Map parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Map 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.Map parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.Map prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * A mapping of keys to values of a given type.
    +     * Values of type `Map` are stored in a `Value.array_value` where each entry
    +     * is another `Value.array_value` with two elements (the key and the value,
    +     * in that order).
    +     * Normally encoded Map values won't have repeated keys, however, clients are
    +     * expected to handle the case in which they do. If the same key appears
    +     * multiple times, the _last_ value takes precedence.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Map} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Map) + com.google.bigtable.v2.Type.MapOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Map_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Map.class, + com.google.bigtable.v2.Type.Map.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Map.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getKeyTypeFieldBuilder(); + getValueTypeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyType_ = null; + if (keyTypeBuilder_ != null) { + keyTypeBuilder_.dispose(); + keyTypeBuilder_ = null; + } + valueType_ = null; + if (valueTypeBuilder_ != null) { + valueTypeBuilder_.dispose(); + valueTypeBuilder_ = 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_Map_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Map getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Map.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Map build() { + com.google.bigtable.v2.Type.Map result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Map buildPartial() { + com.google.bigtable.v2.Type.Map result = new com.google.bigtable.v2.Type.Map(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.Type.Map result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keyType_ = keyTypeBuilder_ == null ? keyType_ : keyTypeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.valueType_ = valueTypeBuilder_ == null ? valueType_ : valueTypeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Map) { + return mergeFrom((com.google.bigtable.v2.Type.Map) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.Map other) { + if (other == com.google.bigtable.v2.Type.Map.getDefaultInstance()) return this; + if (other.hasKeyType()) { + mergeKeyType(other.getKeyType()); + } + if (other.hasValueType()) { + mergeValueType(other.getValueType()); + } + 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(getKeyTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getValueTypeFieldBuilder().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.Type keyType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder> + keyTypeBuilder_; + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.v2.Type key_type = 1; + * + * @return Whether the keyType field is set. + */ + public boolean hasKeyType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.v2.Type key_type = 1; + * + * @return The keyType. + */ + public com.google.bigtable.v2.Type getKeyType() { + if (keyTypeBuilder_ == null) { + return keyType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : keyType_; + } else { + return keyTypeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.v2.Type key_type = 1; + */ + public Builder setKeyType(com.google.bigtable.v2.Type value) { + if (keyTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keyType_ = value; + } else { + keyTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.v2.Type key_type = 1; + */ + public Builder setKeyType(com.google.bigtable.v2.Type.Builder builderForValue) { + if (keyTypeBuilder_ == null) { + keyType_ = builderForValue.build(); + } else { + keyTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.v2.Type key_type = 1; + */ + public Builder mergeKeyType(com.google.bigtable.v2.Type value) { + if (keyTypeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && keyType_ != null + && keyType_ != com.google.bigtable.v2.Type.getDefaultInstance()) { + getKeyTypeBuilder().mergeFrom(value); + } else { + keyType_ = value; + } + } else { + keyTypeBuilder_.mergeFrom(value); + } + if (keyType_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.v2.Type key_type = 1; + */ + public Builder clearKeyType() { + bitField0_ = (bitField0_ & ~0x00000001); + keyType_ = null; + if (keyTypeBuilder_ != null) { + keyTypeBuilder_.dispose(); + keyTypeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.v2.Type key_type = 1; + */ + public com.google.bigtable.v2.Type.Builder getKeyTypeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getKeyTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.v2.Type key_type = 1; + */ + public com.google.bigtable.v2.TypeOrBuilder getKeyTypeOrBuilder() { + if (keyTypeBuilder_ != null) { + return keyTypeBuilder_.getMessageOrBuilder(); + } else { + return keyType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : keyType_; + } + } + + /** + * + * + *
    +       * The type of a map key.
    +       * Only `Bytes`, `String`, and `Int64` are allowed as key types.
    +       * 
    + * + * .google.bigtable.v2.Type key_type = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder> + getKeyTypeFieldBuilder() { + if (keyTypeBuilder_ == null) { + keyTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder>( + getKeyType(), getParentForChildren(), isClean()); + keyType_ = null; + } + return keyTypeBuilder_; + } + + private com.google.bigtable.v2.Type valueType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder> + valueTypeBuilder_; + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.v2.Type value_type = 2; + * + * @return Whether the valueType field is set. + */ + public boolean hasValueType() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.v2.Type value_type = 2; + * + * @return The valueType. + */ + public com.google.bigtable.v2.Type getValueType() { + if (valueTypeBuilder_ == null) { + return valueType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : valueType_; + } else { + return valueTypeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.v2.Type value_type = 2; + */ + public Builder setValueType(com.google.bigtable.v2.Type value) { + if (valueTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + } else { + valueTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.v2.Type value_type = 2; + */ + public Builder setValueType(com.google.bigtable.v2.Type.Builder builderForValue) { + if (valueTypeBuilder_ == null) { + valueType_ = builderForValue.build(); + } else { + valueTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.v2.Type value_type = 2; + */ + public Builder mergeValueType(com.google.bigtable.v2.Type value) { + if (valueTypeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && valueType_ != null + && valueType_ != com.google.bigtable.v2.Type.getDefaultInstance()) { + getValueTypeBuilder().mergeFrom(value); + } else { + valueType_ = value; + } + } else { + valueTypeBuilder_.mergeFrom(value); + } + if (valueType_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.v2.Type value_type = 2; + */ + public Builder clearValueType() { + bitField0_ = (bitField0_ & ~0x00000002); + valueType_ = null; + if (valueTypeBuilder_ != null) { + valueTypeBuilder_.dispose(); + valueTypeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.v2.Type value_type = 2; + */ + public com.google.bigtable.v2.Type.Builder getValueTypeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getValueTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.v2.Type value_type = 2; + */ + public com.google.bigtable.v2.TypeOrBuilder getValueTypeOrBuilder() { + if (valueTypeBuilder_ != null) { + return valueTypeBuilder_.getMessageOrBuilder(); + } else { + return valueType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : valueType_; + } + } + + /** + * + * + *
    +       * The type of the values in a map.
    +       * 
    + * + * .google.bigtable.v2.Type value_type = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder> + getValueTypeFieldBuilder() { + if (valueTypeBuilder_ == null) { + valueTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder>( + getValueType(), getParentForChildren(), isClean()); + valueType_ = null; + } + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Map) + private static final com.google.bigtable.v2.Type.Map DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Map(); + } + + public static com.google.bigtable.v2.Type.Map getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Map 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.Map getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AggregateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Aggregate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Type of the inputs that are accumulated by this `Aggregate`, which must
    +     * specify a full encoding.
    +     * Use `AddInput` mutations to accumulate new inputs.
    +     * 
    + * + * .google.bigtable.v2.Type input_type = 1; + * + * @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.
    +     * Use `AddInput` mutations to accumulate new inputs.
    +     * 
    + * + * .google.bigtable.v2.Type input_type = 1; + * + * @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.
    +     * Use `AddInput` mutations to accumulate new inputs.
    +     * 
    + * + * .google.bigtable.v2.Type input_type = 1; + */ + com.google.bigtable.v2.TypeOrBuilder getInputTypeOrBuilder(); + + /** + * + * + *
    +     * 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.
    +     * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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.
    +     * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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.
    +     * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.bigtable.v2.TypeOrBuilder getStateTypeOrBuilder(); + + /** + * + * + *
    +     * Sum aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + * + * @return Whether the sum field is set. + */ + boolean hasSum(); + + /** + * + * + *
    +     * Sum aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + * + * @return The sum. + */ + com.google.bigtable.v2.Type.Aggregate.Sum getSum(); + + /** + * + * + *
    +     * Sum aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + */ + com.google.bigtable.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder(); + + /** + * + * + *
    +     * HyperLogLogPlusPlusUniqueCount aggregator.
    +     * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + * + * @return Whether the hllppUniqueCount field is set. + */ + boolean hasHllppUniqueCount(); + + /** + * + * + *
    +     * HyperLogLogPlusPlusUniqueCount aggregator.
    +     * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + * + * @return The hllppUniqueCount. + */ + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount getHllppUniqueCount(); + + /** + * + * + *
    +     * HyperLogLogPlusPlusUniqueCount aggregator.
    +     * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder + getHllppUniqueCountOrBuilder(); + + /** + * + * + *
    +     * Max aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + * + * @return Whether the max field is set. + */ + boolean hasMax(); + + /** + * + * + *
    +     * Max aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + * + * @return The max. + */ + com.google.bigtable.v2.Type.Aggregate.Max getMax(); + + /** + * + * + *
    +     * Max aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + */ + com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder(); + + /** + * + * + *
    +     * Min aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + * + * @return Whether the min field is set. + */ + boolean hasMin(); + + /** + * + * + *
    +     * Min aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + * + * @return The min. + */ + com.google.bigtable.v2.Type.Aggregate.Min getMin(); + + /** + * + * + *
    +     * Min aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + */ + com.google.bigtable.v2.Type.Aggregate.MinOrBuilder getMinOrBuilder(); + + 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` .
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Aggregate} + */ + public static final class Aggregate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Aggregate) + AggregateOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Aggregate.newBuilder() to construct. + private Aggregate(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Aggregate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Aggregate.class, + com.google.bigtable.v2.Type.Aggregate.Builder.class); + } + + public interface SumOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Aggregate.Sum) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +     * Computes the sum of the input values.
    +     * Allowed input: `Int64`
    +     * State: same as input
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Aggregate.Sum} + */ + public static final class Sum extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Aggregate.Sum) + SumOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Sum.newBuilder() to construct. + private Sum(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Aggregate_Sum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Aggregate.Sum.class, + com.google.bigtable.v2.Type.Aggregate.Sum.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.Aggregate.Sum)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Aggregate.Sum other = + (com.google.bigtable.v2.Type.Aggregate.Sum) 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.Aggregate.Sum parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate.Sum 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.Aggregate.Sum parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate.Sum 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.Aggregate.Sum parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate.Sum 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.Aggregate.Sum parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.Aggregate.Sum 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; + } + + /** + * + * + *
    +       * Computes the sum of the input values.
    +       * Allowed input: `Int64`
    +       * State: same as input
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Aggregate.Sum} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Aggregate.Sum) + com.google.bigtable.v2.Type.Aggregate.SumOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Aggregate_Sum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Aggregate.Sum.class, + com.google.bigtable.v2.Type.Aggregate.Sum.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Aggregate.Sum.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Aggregate_Sum_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Sum getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Aggregate.Sum.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Sum build() { + com.google.bigtable.v2.Type.Aggregate.Sum result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Sum buildPartial() { + com.google.bigtable.v2.Type.Aggregate.Sum result = + new com.google.bigtable.v2.Type.Aggregate.Sum(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.Aggregate.Sum) { + return mergeFrom((com.google.bigtable.v2.Type.Aggregate.Sum) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.Aggregate.Sum other) { + if (other == com.google.bigtable.v2.Type.Aggregate.Sum.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Aggregate.Sum) + private static final com.google.bigtable.v2.Type.Aggregate.Sum DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Aggregate.Sum(); + } + + public static com.google.bigtable.v2.Type.Aggregate.Sum getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Sum 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.Aggregate.Sum getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MaxOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Aggregate.Max) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +     * Computes the max of the input values.
    +     * Allowed input: `Int64`
    +     * State: same as input
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Aggregate.Max} + */ + public static final class Max extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Aggregate.Max) + MaxOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Max.newBuilder() to construct. + private Max(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Aggregate_Max_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Aggregate.Max.class, + com.google.bigtable.v2.Type.Aggregate.Max.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.Aggregate.Max)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Aggregate.Max other = + (com.google.bigtable.v2.Type.Aggregate.Max) 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.Aggregate.Max parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate.Max 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.Aggregate.Max parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate.Max 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.Aggregate.Max parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate.Max 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.Aggregate.Max parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.Aggregate.Max 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; + } + + /** + * + * + *
    +       * Computes the max of the input values.
    +       * Allowed input: `Int64`
    +       * State: same as input
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Aggregate.Max} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Aggregate.Max) + com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Aggregate_Max_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Aggregate.Max.class, + com.google.bigtable.v2.Type.Aggregate.Max.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Aggregate.Max.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Aggregate_Max_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Max getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Aggregate.Max.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Max build() { + com.google.bigtable.v2.Type.Aggregate.Max result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Max buildPartial() { + com.google.bigtable.v2.Type.Aggregate.Max result = + new com.google.bigtable.v2.Type.Aggregate.Max(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.Aggregate.Max) { + return mergeFrom((com.google.bigtable.v2.Type.Aggregate.Max) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.Aggregate.Max other) { + if (other == com.google.bigtable.v2.Type.Aggregate.Max.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Aggregate.Max) + private static final com.google.bigtable.v2.Type.Aggregate.Max DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Aggregate.Max(); + } + + public static com.google.bigtable.v2.Type.Aggregate.Max getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Max 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.Aggregate.Max getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MinOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Aggregate.Min) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +     * Computes the min of the input values.
    +     * Allowed input: `Int64`
    +     * State: same as input
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Aggregate.Min} + */ + public static final class Min extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Aggregate.Min) + MinOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Min.newBuilder() to construct. + private Min(com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Aggregate_Min_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Aggregate.Min.class, + com.google.bigtable.v2.Type.Aggregate.Min.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.Aggregate.Min)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Aggregate.Min other = + (com.google.bigtable.v2.Type.Aggregate.Min) 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.Aggregate.Min parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate.Min 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.Aggregate.Min parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate.Min 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.Aggregate.Min parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate.Min 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.Aggregate.Min parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.Aggregate.Min 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; + } + + /** + * + * + *
    +       * Computes the min of the input values.
    +       * Allowed input: `Int64`
    +       * State: same as input
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Aggregate.Min} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Aggregate.Min) + com.google.bigtable.v2.Type.Aggregate.MinOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Aggregate_Min_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Aggregate.Min.class, + com.google.bigtable.v2.Type.Aggregate.Min.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Aggregate.Min.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Aggregate_Min_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Min getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Aggregate.Min.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Min build() { + com.google.bigtable.v2.Type.Aggregate.Min result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Min buildPartial() { + com.google.bigtable.v2.Type.Aggregate.Min result = + new com.google.bigtable.v2.Type.Aggregate.Min(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.Aggregate.Min) { + return mergeFrom((com.google.bigtable.v2.Type.Aggregate.Min) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.Aggregate.Min other) { + if (other == com.google.bigtable.v2.Type.Aggregate.Min.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Aggregate.Min) + private static final com.google.bigtable.v2.Type.Aggregate.Min DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Aggregate.Min(); + } + + public static com.google.bigtable.v2.Type.Aggregate.Min getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Min 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.Aggregate.Min getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface HyperLogLogPlusPlusUniqueCountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +     * Computes an approximate unique count over the input values. When using
    +     * raw data as input, be careful to use a consistent encoding. Otherwise
    +     * the same value encoded differently could count more than once, or two
    +     * distinct values could count as identical.
    +     * Input: Any, or omit for Raw
    +     * State: TBD
    +     * Special state conversions: `Int64` (the unique count estimate)
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} + */ + public static final class HyperLogLogPlusPlusUniqueCount + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + HyperLogLogPlusPlusUniqueCountOrBuilder { + private static final long serialVersionUID = 0L; + + // Use HyperLogLogPlusPlusUniqueCount.newBuilder() to construct. + private HyperLogLogPlusPlusUniqueCount( + com.google.protobuf.GeneratedMessageV3.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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.class, + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.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.Aggregate.HyperLogLogPlusPlusUniqueCount)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount other = + (com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) 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.Aggregate.HyperLogLogPlusPlusUniqueCount parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount 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.Aggregate.HyperLogLogPlusPlusUniqueCount parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount 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.Aggregate.HyperLogLogPlusPlusUniqueCount parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount 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.Aggregate.HyperLogLogPlusPlusUniqueCount parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + public static com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + 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.Aggregate.HyperLogLogPlusPlusUniqueCount 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.Aggregate.HyperLogLogPlusPlusUniqueCount 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.Aggregate.HyperLogLogPlusPlusUniqueCount 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; + } + + /** + * + * + *
    +       * Computes an approximate unique count over the input values. When using
    +       * raw data as input, be careful to use a consistent encoding. Otherwise
    +       * the same value encoded differently could count more than once, or two
    +       * distinct values could count as identical.
    +       * Input: Any, or omit for Raw
    +       * State: TBD
    +       * Special state conversions: `Int64` (the unique count estimate)
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.class, + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder + .class); + } + + // Construct using + // com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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_Aggregate_HyperLogLogPlusPlusUniqueCount_descriptor; + } + + @java.lang.Override + 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); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.HyperLogLogPlusPlusUniqueCount) { + return mergeFrom( + (com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount other) { + if (other + == com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + private static final com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount(); + } + + public static com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HyperLogLogPlusPlusUniqueCount 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.Aggregate.HyperLogLogPlusPlusUniqueCount + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int aggregatorCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object aggregator_; + + public enum AggregatorCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SUM(4), + HLLPP_UNIQUE_COUNT(5), + MAX(6), + MIN(7), + AGGREGATOR_NOT_SET(0); + private final int value; + + 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. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AggregatorCase valueOf(int value) { + return forNumber(value); + } + + public static AggregatorCase forNumber(int value) { + switch (value) { + case 4: + return SUM; + case 5: + return HLLPP_UNIQUE_COUNT; + case 6: + return MAX; + case 7: + return MIN; + case 0: + return AGGREGATOR_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AggregatorCase getAggregatorCase() { + return AggregatorCase.forNumber(aggregatorCase_); + } + + 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.
    +     * Use `AddInput` mutations to accumulate new inputs.
    +     * 
    + * + * .google.bigtable.v2.Type input_type = 1; + * + * @return Whether the inputType field is set. + */ + @java.lang.Override + public boolean hasInputType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * Type of the inputs that are accumulated by this `Aggregate`, which must
    +     * specify a full encoding.
    +     * Use `AddInput` mutations to accumulate new inputs.
    +     * 
    + * + * .google.bigtable.v2.Type input_type = 1; + * + * @return The inputType. + */ + @java.lang.Override + 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.
    +     * Use `AddInput` mutations to accumulate new inputs.
    +     * 
    + * + * .google.bigtable.v2.Type input_type = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.TypeOrBuilder getInputTypeOrBuilder() { + return inputType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : inputType_; + } + + 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.
    +     * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stateType field is set. + */ + @java.lang.Override + 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.
    +     * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateType. + */ + @java.lang.Override + 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.
    +     * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.bigtable.v2.TypeOrBuilder getStateTypeOrBuilder() { + return stateType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : stateType_; + } + + public static final int SUM_FIELD_NUMBER = 4; + + /** + * + * + *
    +     * Sum aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + * + * @return Whether the sum field is set. + */ + @java.lang.Override + public boolean hasSum() { + return aggregatorCase_ == 4; + } + + /** + * + * + *
    +     * Sum aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + * + * @return The sum. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Sum getSum() { + if (aggregatorCase_ == 4) { + return (com.google.bigtable.v2.Type.Aggregate.Sum) aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.Sum.getDefaultInstance(); + } + + /** + * + * + *
    +     * Sum aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder() { + if (aggregatorCase_ == 4) { + return (com.google.bigtable.v2.Type.Aggregate.Sum) aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.Sum.getDefaultInstance(); + } + + public static final int HLLPP_UNIQUE_COUNT_FIELD_NUMBER = 5; + + /** + * + * + *
    +     * HyperLogLogPlusPlusUniqueCount aggregator.
    +     * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + * + * @return Whether the hllppUniqueCount field is set. + */ + @java.lang.Override + public boolean hasHllppUniqueCount() { + return aggregatorCase_ == 5; + } + + /** + * + * + *
    +     * HyperLogLogPlusPlusUniqueCount aggregator.
    +     * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + * + * @return The hllppUniqueCount. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + getHllppUniqueCount() { + if (aggregatorCase_ == 5) { + return (com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance(); + } + + /** + * + * + *
    +     * HyperLogLogPlusPlusUniqueCount aggregator.
    +     * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder + getHllppUniqueCountOrBuilder() { + if (aggregatorCase_ == 5) { + return (com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance(); + } + + public static final int MAX_FIELD_NUMBER = 6; + + /** + * + * + *
    +     * Max aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + * + * @return Whether the max field is set. + */ + @java.lang.Override + public boolean hasMax() { + return aggregatorCase_ == 6; + } + + /** + * + * + *
    +     * Max aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + * + * @return The max. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Max getMax() { + if (aggregatorCase_ == 6) { + return (com.google.bigtable.v2.Type.Aggregate.Max) aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.Max.getDefaultInstance(); + } + + /** + * + * + *
    +     * Max aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder() { + if (aggregatorCase_ == 6) { + return (com.google.bigtable.v2.Type.Aggregate.Max) aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.Max.getDefaultInstance(); + } + + public static final int MIN_FIELD_NUMBER = 7; + + /** + * + * + *
    +     * Min aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + * + * @return Whether the min field is set. + */ + @java.lang.Override + public boolean hasMin() { + return aggregatorCase_ == 7; + } + + /** + * + * + *
    +     * Min aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + * + * @return The min. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Min getMin() { + if (aggregatorCase_ == 7) { + return (com.google.bigtable.v2.Type.Aggregate.Min) aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.Min.getDefaultInstance(); + } + + /** + * + * + *
    +     * Min aggregator.
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.MinOrBuilder getMinOrBuilder() { + if (aggregatorCase_ == 7) { + return (com.google.bigtable.v2.Type.Aggregate.Min) aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.Min.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInputType()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStateType()); + } + if (aggregatorCase_ == 4) { + output.writeMessage(4, (com.google.bigtable.v2.Type.Aggregate.Sum) aggregator_); + } + if (aggregatorCase_ == 5) { + output.writeMessage( + 5, (com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) aggregator_); + } + if (aggregatorCase_ == 6) { + output.writeMessage(6, (com.google.bigtable.v2.Type.Aggregate.Max) aggregator_); + } + if (aggregatorCase_ == 7) { + output.writeMessage(7, (com.google.bigtable.v2.Type.Aggregate.Min) aggregator_); + } + 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, getInputType()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStateType()); + } + if (aggregatorCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.bigtable.v2.Type.Aggregate.Sum) aggregator_); + } + if (aggregatorCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) aggregator_); + } + if (aggregatorCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.bigtable.v2.Type.Aggregate.Max) aggregator_); + } + if (aggregatorCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.bigtable.v2.Type.Aggregate.Min) aggregator_); + } + 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.Aggregate)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Aggregate other = (com.google.bigtable.v2.Type.Aggregate) obj; + + if (hasInputType() != other.hasInputType()) return false; + if (hasInputType()) { + if (!getInputType().equals(other.getInputType())) return false; + } + if (hasStateType() != other.hasStateType()) return false; + if (hasStateType()) { + if (!getStateType().equals(other.getStateType())) return false; + } + if (!getAggregatorCase().equals(other.getAggregatorCase())) return false; + switch (aggregatorCase_) { + case 4: + if (!getSum().equals(other.getSum())) return false; + break; + case 5: + if (!getHllppUniqueCount().equals(other.getHllppUniqueCount())) return false; + break; + case 6: + if (!getMax().equals(other.getMax())) return false; + break; + case 7: + if (!getMin().equals(other.getMin())) 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 (hasInputType()) { + hash = (37 * hash) + INPUT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInputType().hashCode(); + } + if (hasStateType()) { + hash = (37 * hash) + STATE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getStateType().hashCode(); + } + switch (aggregatorCase_) { + case 4: + hash = (37 * hash) + SUM_FIELD_NUMBER; + hash = (53 * hash) + getSum().hashCode(); + break; + case 5: + hash = (37 * hash) + HLLPP_UNIQUE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getHllppUniqueCount().hashCode(); + break; + case 6: + hash = (37 * hash) + MAX_FIELD_NUMBER; + hash = (53 * hash) + getMax().hashCode(); + break; + case 7: + hash = (37 * hash) + MIN_FIELD_NUMBER; + hash = (53 * hash) + getMin().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type.Aggregate parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate 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.Aggregate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate 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.Aggregate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Aggregate 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.Aggregate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.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( + 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); + } + + 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( + 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); + } + + 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( + 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.Aggregate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * A 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` .
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Aggregate} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Aggregate) + com.google.bigtable.v2.Type.AggregateOrBuilder { + 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 + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Aggregate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Aggregate.class, + com.google.bigtable.v2.Type.Aggregate.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Aggregate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputTypeFieldBuilder(); + getStateTypeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + inputType_ = null; + if (inputTypeBuilder_ != null) { + inputTypeBuilder_.dispose(); + inputTypeBuilder_ = null; + } + stateType_ = null; + if (stateTypeBuilder_ != null) { + stateTypeBuilder_.dispose(); + stateTypeBuilder_ = null; + } + if (sumBuilder_ != null) { + sumBuilder_.clear(); + } + if (hllppUniqueCountBuilder_ != null) { + hllppUniqueCountBuilder_.clear(); + } + if (maxBuilder_ != null) { + maxBuilder_.clear(); + } + if (minBuilder_ != null) { + minBuilder_.clear(); + } + aggregatorCase_ = 0; + aggregator_ = 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_Aggregate_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate build() { + com.google.bigtable.v2.Type.Aggregate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate buildPartial() { + com.google.bigtable.v2.Type.Aggregate result = + new com.google.bigtable.v2.Type.Aggregate(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.Type.Aggregate result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.inputType_ = inputTypeBuilder_ == null ? inputType_ : inputTypeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.stateType_ = stateTypeBuilder_ == null ? stateType_ : stateTypeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.Type.Aggregate result) { + result.aggregatorCase_ = aggregatorCase_; + result.aggregator_ = this.aggregator_; + if (aggregatorCase_ == 4 && sumBuilder_ != null) { + result.aggregator_ = sumBuilder_.build(); + } + if (aggregatorCase_ == 5 && hllppUniqueCountBuilder_ != null) { + result.aggregator_ = hllppUniqueCountBuilder_.build(); + } + if (aggregatorCase_ == 6 && maxBuilder_ != null) { + result.aggregator_ = maxBuilder_.build(); + } + if (aggregatorCase_ == 7 && minBuilder_ != null) { + result.aggregator_ = minBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Aggregate) { + return mergeFrom((com.google.bigtable.v2.Type.Aggregate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.Aggregate other) { + if (other == com.google.bigtable.v2.Type.Aggregate.getDefaultInstance()) return this; + if (other.hasInputType()) { + mergeInputType(other.getInputType()); + } + if (other.hasStateType()) { + mergeStateType(other.getStateType()); + } + switch (other.getAggregatorCase()) { + case SUM: + { + mergeSum(other.getSum()); + break; + } + case HLLPP_UNIQUE_COUNT: + { + mergeHllppUniqueCount(other.getHllppUniqueCount()); + break; + } + case MAX: + { + mergeMax(other.getMax()); + break; + } + case MIN: + { + mergeMin(other.getMin()); + break; + } + case AGGREGATOR_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(getInputTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStateTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + input.readMessage(getSumFieldBuilder().getBuilder(), extensionRegistry); + aggregatorCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + getHllppUniqueCountFieldBuilder().getBuilder(), extensionRegistry); + aggregatorCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(getMaxFieldBuilder().getBuilder(), extensionRegistry); + aggregatorCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage(getMinFieldBuilder().getBuilder(), extensionRegistry); + aggregatorCase_ = 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 aggregatorCase_ = 0; + private java.lang.Object aggregator_; + + public AggregatorCase getAggregatorCase() { + return AggregatorCase.forNumber(aggregatorCase_); + } + + public Builder clearAggregator() { + aggregatorCase_ = 0; + aggregator_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.bigtable.v2.Type inputType_; + private com.google.protobuf.SingleFieldBuilderV3< + 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.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.v2.Type input_type = 1; + * + * @return Whether the inputType field is set. + */ + public boolean hasInputType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.v2.Type input_type = 1; + * + * @return The inputType. + */ + public com.google.bigtable.v2.Type getInputType() { + if (inputTypeBuilder_ == null) { + return inputType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : inputType_; + } else { + return inputTypeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.v2.Type input_type = 1; + */ + public Builder setInputType(com.google.bigtable.v2.Type value) { + if (inputTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputType_ = value; + } else { + inputTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.v2.Type input_type = 1; + */ + public Builder setInputType(com.google.bigtable.v2.Type.Builder builderForValue) { + if (inputTypeBuilder_ == null) { + inputType_ = builderForValue.build(); + } else { + inputTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.v2.Type input_type = 1; + */ + public Builder mergeInputType(com.google.bigtable.v2.Type value) { + if (inputTypeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && inputType_ != null + && inputType_ != com.google.bigtable.v2.Type.getDefaultInstance()) { + getInputTypeBuilder().mergeFrom(value); + } else { + inputType_ = value; + } + } else { + inputTypeBuilder_.mergeFrom(value); + } + if (inputType_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.v2.Type input_type = 1; + */ + public Builder clearInputType() { + bitField0_ = (bitField0_ & ~0x00000001); + inputType_ = null; + if (inputTypeBuilder_ != null) { + inputTypeBuilder_.dispose(); + inputTypeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.v2.Type input_type = 1; + */ + public com.google.bigtable.v2.Type.Builder getInputTypeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getInputTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Type of the inputs that are accumulated by this `Aggregate`, which must
    +       * specify a full encoding.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.v2.Type input_type = 1; + */ + public com.google.bigtable.v2.TypeOrBuilder getInputTypeOrBuilder() { + if (inputTypeBuilder_ != null) { + return inputTypeBuilder_.getMessageOrBuilder(); + } else { + 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.
    +       * Use `AddInput` mutations to accumulate new inputs.
    +       * 
    + * + * .google.bigtable.v2.Type input_type = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder> + getInputTypeFieldBuilder() { + if (inputTypeBuilder_ == null) { + inputTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder>( + getInputType(), getParentForChildren(), isClean()); + inputType_ = null; + } + return inputTypeBuilder_; + } + + private com.google.bigtable.v2.Type stateType_; + private com.google.protobuf.SingleFieldBuilderV3< + 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.
    +       * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stateType field is set. + */ + 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.
    +       * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateType. + */ + public com.google.bigtable.v2.Type getStateType() { + if (stateTypeBuilder_ == null) { + return stateType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : stateType_; + } else { + 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.
    +       * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStateType(com.google.bigtable.v2.Type value) { + if (stateTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stateType_ = value; + } else { + stateTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + 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.
    +       * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStateType(com.google.bigtable.v2.Type.Builder builderForValue) { + if (stateTypeBuilder_ == null) { + stateType_ = builderForValue.build(); + } else { + stateTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + 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.
    +       * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStateType(com.google.bigtable.v2.Type value) { + if (stateTypeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && stateType_ != null + && stateType_ != com.google.bigtable.v2.Type.getDefaultInstance()) { + getStateTypeBuilder().mergeFrom(value); + } else { + stateType_ = value; + } + } else { + stateTypeBuilder_.mergeFrom(value); + } + if (stateType_ != null) { + bitField0_ |= 0x00000002; + 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.
    +       * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStateType() { + bitField0_ = (bitField0_ & ~0x00000002); + stateType_ = null; + if (stateTypeBuilder_ != null) { + stateTypeBuilder_.dispose(); + stateTypeBuilder_ = null; + } + 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.
    +       * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.bigtable.v2.Type.Builder getStateTypeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStateTypeFieldBuilder().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.
    +       * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.bigtable.v2.TypeOrBuilder getStateTypeOrBuilder() { + if (stateTypeBuilder_ != null) { + return stateTypeBuilder_.getMessageOrBuilder(); + } else { + 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.
    +       * 
    + * + * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder> + getStateTypeFieldBuilder() { + if (stateTypeBuilder_ == null) { + stateTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder>( + getStateType(), getParentForChildren(), isClean()); + stateType_ = null; + } + return stateTypeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Aggregate.Sum, + com.google.bigtable.v2.Type.Aggregate.Sum.Builder, + com.google.bigtable.v2.Type.Aggregate.SumOrBuilder> + sumBuilder_; + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + * + * @return Whether the sum field is set. + */ + @java.lang.Override + public boolean hasSum() { + return aggregatorCase_ == 4; + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + * + * @return The sum. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Sum getSum() { + if (sumBuilder_ == null) { + if (aggregatorCase_ == 4) { + return (com.google.bigtable.v2.Type.Aggregate.Sum) aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.Sum.getDefaultInstance(); + } else { + if (aggregatorCase_ == 4) { + return sumBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Aggregate.Sum.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + */ + public Builder setSum(com.google.bigtable.v2.Type.Aggregate.Sum value) { + if (sumBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregator_ = value; + onChanged(); + } else { + sumBuilder_.setMessage(value); + } + aggregatorCase_ = 4; + return this; + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + */ + public Builder setSum(com.google.bigtable.v2.Type.Aggregate.Sum.Builder builderForValue) { + if (sumBuilder_ == null) { + aggregator_ = builderForValue.build(); + onChanged(); + } else { + sumBuilder_.setMessage(builderForValue.build()); + } + aggregatorCase_ = 4; + return this; + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + */ + public Builder mergeSum(com.google.bigtable.v2.Type.Aggregate.Sum value) { + if (sumBuilder_ == null) { + if (aggregatorCase_ == 4 + && aggregator_ != com.google.bigtable.v2.Type.Aggregate.Sum.getDefaultInstance()) { + aggregator_ = + com.google.bigtable.v2.Type.Aggregate.Sum.newBuilder( + (com.google.bigtable.v2.Type.Aggregate.Sum) aggregator_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregator_ = value; + } + onChanged(); + } else { + if (aggregatorCase_ == 4) { + sumBuilder_.mergeFrom(value); + } else { + sumBuilder_.setMessage(value); + } + } + aggregatorCase_ = 4; + return this; + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + */ + public Builder clearSum() { + if (sumBuilder_ == null) { + if (aggregatorCase_ == 4) { + aggregatorCase_ = 0; + aggregator_ = null; + onChanged(); + } + } else { + if (aggregatorCase_ == 4) { + aggregatorCase_ = 0; + aggregator_ = null; + } + sumBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + */ + public com.google.bigtable.v2.Type.Aggregate.Sum.Builder getSumBuilder() { + return getSumFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder() { + if ((aggregatorCase_ == 4) && (sumBuilder_ != null)) { + return sumBuilder_.getMessageOrBuilder(); + } else { + if (aggregatorCase_ == 4) { + return (com.google.bigtable.v2.Type.Aggregate.Sum) aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.Sum.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Sum aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Aggregate.Sum, + com.google.bigtable.v2.Type.Aggregate.Sum.Builder, + com.google.bigtable.v2.Type.Aggregate.SumOrBuilder> + getSumFieldBuilder() { + if (sumBuilder_ == null) { + if (!(aggregatorCase_ == 4)) { + aggregator_ = com.google.bigtable.v2.Type.Aggregate.Sum.getDefaultInstance(); + } + sumBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Aggregate.Sum, + com.google.bigtable.v2.Type.Aggregate.Sum.Builder, + com.google.bigtable.v2.Type.Aggregate.SumOrBuilder>( + (com.google.bigtable.v2.Type.Aggregate.Sum) aggregator_, + getParentForChildren(), + isClean()); + aggregator_ = null; + } + aggregatorCase_ = 4; + onChanged(); + return sumBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount, + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder, + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder> + hllppUniqueCountBuilder_; + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + * + * @return Whether the hllppUniqueCount field is set. + */ + @java.lang.Override + public boolean hasHllppUniqueCount() { + return aggregatorCase_ == 5; + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + * + * @return The hllppUniqueCount. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + getHllppUniqueCount() { + if (hllppUniqueCountBuilder_ == null) { + if (aggregatorCase_ == 5) { + return (com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance(); + } else { + if (aggregatorCase_ == 5) { + return hllppUniqueCountBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + public Builder setHllppUniqueCount( + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount value) { + if (hllppUniqueCountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregator_ = value; + onChanged(); + } else { + hllppUniqueCountBuilder_.setMessage(value); + } + aggregatorCase_ = 5; + return this; + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + public Builder setHllppUniqueCount( + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder + builderForValue) { + if (hllppUniqueCountBuilder_ == null) { + aggregator_ = builderForValue.build(); + onChanged(); + } else { + hllppUniqueCountBuilder_.setMessage(builderForValue.build()); + } + aggregatorCase_ = 5; + return this; + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + public Builder mergeHllppUniqueCount( + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount value) { + if (hllppUniqueCountBuilder_ == null) { + if (aggregatorCase_ == 5 + && aggregator_ + != com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance()) { + aggregator_ = + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.newBuilder( + (com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + aggregator_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregator_ = value; + } + onChanged(); + } else { + if (aggregatorCase_ == 5) { + hllppUniqueCountBuilder_.mergeFrom(value); + } else { + hllppUniqueCountBuilder_.setMessage(value); + } + } + aggregatorCase_ = 5; + return this; + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + public Builder clearHllppUniqueCount() { + if (hllppUniqueCountBuilder_ == null) { + if (aggregatorCase_ == 5) { + aggregatorCase_ = 0; + aggregator_ = null; + onChanged(); + } + } else { + if (aggregatorCase_ == 5) { + aggregatorCase_ = 0; + aggregator_ = null; + } + hllppUniqueCountBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + public com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder + getHllppUniqueCountBuilder() { + return getHllppUniqueCountFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder + getHllppUniqueCountOrBuilder() { + if ((aggregatorCase_ == 5) && (hllppUniqueCountBuilder_ != null)) { + return hllppUniqueCountBuilder_.getMessageOrBuilder(); + } else { + if (aggregatorCase_ == 5) { + return (com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * HyperLogLogPlusPlusUniqueCount aggregator.
    +       * 
    + * + * + * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount, + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder, + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder> + getHllppUniqueCountFieldBuilder() { + if (hllppUniqueCountBuilder_ == null) { + if (!(aggregatorCase_ == 5)) { + aggregator_ = + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount + .getDefaultInstance(); + } + hllppUniqueCountBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount, + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder, + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder>( + (com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) + aggregator_, + getParentForChildren(), + isClean()); + aggregator_ = null; + } + aggregatorCase_ = 5; + onChanged(); + return hllppUniqueCountBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Aggregate.Max, + com.google.bigtable.v2.Type.Aggregate.Max.Builder, + com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder> + maxBuilder_; + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + * + * @return Whether the max field is set. + */ + @java.lang.Override + public boolean hasMax() { + return aggregatorCase_ == 6; + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + * + * @return The max. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Max getMax() { + if (maxBuilder_ == null) { + if (aggregatorCase_ == 6) { + return (com.google.bigtable.v2.Type.Aggregate.Max) aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.Max.getDefaultInstance(); + } else { + if (aggregatorCase_ == 6) { + return maxBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Aggregate.Max.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + */ + public Builder setMax(com.google.bigtable.v2.Type.Aggregate.Max value) { + if (maxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregator_ = value; + onChanged(); + } else { + maxBuilder_.setMessage(value); + } + aggregatorCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + */ + public Builder setMax(com.google.bigtable.v2.Type.Aggregate.Max.Builder builderForValue) { + if (maxBuilder_ == null) { + aggregator_ = builderForValue.build(); + onChanged(); + } else { + maxBuilder_.setMessage(builderForValue.build()); + } + aggregatorCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + */ + public Builder mergeMax(com.google.bigtable.v2.Type.Aggregate.Max value) { + if (maxBuilder_ == null) { + if (aggregatorCase_ == 6 + && aggregator_ != com.google.bigtable.v2.Type.Aggregate.Max.getDefaultInstance()) { + aggregator_ = + com.google.bigtable.v2.Type.Aggregate.Max.newBuilder( + (com.google.bigtable.v2.Type.Aggregate.Max) aggregator_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregator_ = value; + } + onChanged(); + } else { + if (aggregatorCase_ == 6) { + maxBuilder_.mergeFrom(value); + } else { + maxBuilder_.setMessage(value); + } + } + aggregatorCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + */ + public Builder clearMax() { + if (maxBuilder_ == null) { + if (aggregatorCase_ == 6) { + aggregatorCase_ = 0; + aggregator_ = null; + onChanged(); + } + } else { + if (aggregatorCase_ == 6) { + aggregatorCase_ = 0; + aggregator_ = null; + } + maxBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + */ + public com.google.bigtable.v2.Type.Aggregate.Max.Builder getMaxBuilder() { + return getMaxFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder() { + if ((aggregatorCase_ == 6) && (maxBuilder_ != null)) { + return maxBuilder_.getMessageOrBuilder(); + } else { + if (aggregatorCase_ == 6) { + return (com.google.bigtable.v2.Type.Aggregate.Max) aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.Max.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Max aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Max max = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Aggregate.Max, + com.google.bigtable.v2.Type.Aggregate.Max.Builder, + com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder> + getMaxFieldBuilder() { + if (maxBuilder_ == null) { + if (!(aggregatorCase_ == 6)) { + aggregator_ = com.google.bigtable.v2.Type.Aggregate.Max.getDefaultInstance(); + } + maxBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Aggregate.Max, + com.google.bigtable.v2.Type.Aggregate.Max.Builder, + com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder>( + (com.google.bigtable.v2.Type.Aggregate.Max) aggregator_, + getParentForChildren(), + isClean()); + aggregator_ = null; + } + aggregatorCase_ = 6; + onChanged(); + return maxBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Aggregate.Min, + com.google.bigtable.v2.Type.Aggregate.Min.Builder, + com.google.bigtable.v2.Type.Aggregate.MinOrBuilder> + minBuilder_; + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + * + * @return Whether the min field is set. + */ + @java.lang.Override + public boolean hasMin() { + return aggregatorCase_ == 7; + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + * + * @return The min. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.Min getMin() { + if (minBuilder_ == null) { + if (aggregatorCase_ == 7) { + return (com.google.bigtable.v2.Type.Aggregate.Min) aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.Min.getDefaultInstance(); + } else { + if (aggregatorCase_ == 7) { + return minBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Aggregate.Min.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + */ + public Builder setMin(com.google.bigtable.v2.Type.Aggregate.Min value) { + if (minBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregator_ = value; + onChanged(); + } else { + minBuilder_.setMessage(value); + } + aggregatorCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + */ + public Builder setMin(com.google.bigtable.v2.Type.Aggregate.Min.Builder builderForValue) { + if (minBuilder_ == null) { + aggregator_ = builderForValue.build(); + onChanged(); + } else { + minBuilder_.setMessage(builderForValue.build()); + } + aggregatorCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + */ + public Builder mergeMin(com.google.bigtable.v2.Type.Aggregate.Min value) { + if (minBuilder_ == null) { + if (aggregatorCase_ == 7 + && aggregator_ != com.google.bigtable.v2.Type.Aggregate.Min.getDefaultInstance()) { + aggregator_ = + com.google.bigtable.v2.Type.Aggregate.Min.newBuilder( + (com.google.bigtable.v2.Type.Aggregate.Min) aggregator_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregator_ = value; + } + onChanged(); + } else { + if (aggregatorCase_ == 7) { + minBuilder_.mergeFrom(value); + } else { + minBuilder_.setMessage(value); + } + } + aggregatorCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + */ + public Builder clearMin() { + if (minBuilder_ == null) { + if (aggregatorCase_ == 7) { + aggregatorCase_ = 0; + aggregator_ = null; + onChanged(); + } + } else { + if (aggregatorCase_ == 7) { + aggregatorCase_ = 0; + aggregator_ = null; + } + minBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + */ + public com.google.bigtable.v2.Type.Aggregate.Min.Builder getMinBuilder() { + return getMinFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate.MinOrBuilder getMinOrBuilder() { + if ((aggregatorCase_ == 7) && (minBuilder_ != null)) { + return minBuilder_.getMessageOrBuilder(); + } else { + if (aggregatorCase_ == 7) { + return (com.google.bigtable.v2.Type.Aggregate.Min) aggregator_; + } + return com.google.bigtable.v2.Type.Aggregate.Min.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Min aggregator.
    +       * 
    + * + * .google.bigtable.v2.Type.Aggregate.Min min = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Aggregate.Min, + com.google.bigtable.v2.Type.Aggregate.Min.Builder, + com.google.bigtable.v2.Type.Aggregate.MinOrBuilder> + getMinFieldBuilder() { + if (minBuilder_ == null) { + if (!(aggregatorCase_ == 7)) { + aggregator_ = com.google.bigtable.v2.Type.Aggregate.Min.getDefaultInstance(); + } + minBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Aggregate.Min, + com.google.bigtable.v2.Type.Aggregate.Min.Builder, + com.google.bigtable.v2.Type.Aggregate.MinOrBuilder>( + (com.google.bigtable.v2.Type.Aggregate.Min) aggregator_, + getParentForChildren(), + isClean()); + aggregator_ = null; + } + aggregatorCase_ = 7; + onChanged(); + 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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Aggregate) + private static final com.google.bigtable.v2.Type.Aggregate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Aggregate(); + } + + public static com.google.bigtable.v2.Type.Aggregate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Aggregate 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.Aggregate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BYTES_TYPE(1), + STRING_TYPE(2), + INT64_TYPE(5), + FLOAT32_TYPE(12), + FLOAT64_TYPE(9), + BOOL_TYPE(8), + TIMESTAMP_TYPE(10), + DATE_TYPE(11), + AGGREGATE_TYPE(6), + 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. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 1: + return BYTES_TYPE; + case 2: + return STRING_TYPE; + case 5: + return INT64_TYPE; + case 12: + return FLOAT32_TYPE; + case 9: + return FLOAT64_TYPE; + case 8: + return BOOL_TYPE; + case 10: + return TIMESTAMP_TYPE; + case 11: + return DATE_TYPE; + case 6: + return AGGREGATE_TYPE; + case 7: + return STRUCT_TYPE; + case 3: + 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: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public static final int BYTES_TYPE_FIELD_NUMBER = 1; + + /** + * + * + *
    +   * 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 + public com.google.bigtable.v2.Type.Bytes getBytesType() { + if (kindCase_ == 1) { + return (com.google.bigtable.v2.Type.Bytes) kind_; + } + return com.google.bigtable.v2.Type.Bytes.getDefaultInstance(); + } + + /** + * + * + *
    +   * Bytes
    +   * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { + if (kindCase_ == 1) { + return (com.google.bigtable.v2.Type.Bytes) kind_; + } + return com.google.bigtable.v2.Type.Bytes.getDefaultInstance(); + } + + public static final int STRING_TYPE_FIELD_NUMBER = 2; + + /** + * + * + *
    +   * String
    +   * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + * + * @return Whether the stringType field is set. + */ + @java.lang.Override + public boolean hasStringType() { + return kindCase_ == 2; + } + + /** + * + * + *
    +   * String
    +   * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + * + * @return The stringType. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.String getStringType() { + if (kindCase_ == 2) { + return (com.google.bigtable.v2.Type.String) kind_; + } + return com.google.bigtable.v2.Type.String.getDefaultInstance(); + } + + /** + * + * + *
    +   * String
    +   * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.StringOrBuilder getStringTypeOrBuilder() { + if (kindCase_ == 2) { + return (com.google.bigtable.v2.Type.String) kind_; + } + return com.google.bigtable.v2.Type.String.getDefaultInstance(); + } + + public static final int INT64_TYPE_FIELD_NUMBER = 5; + + /** + * + * + *
    +   * Int64
    +   * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + * + * @return Whether the int64Type field is set. + */ + @java.lang.Override + public boolean hasInt64Type() { + return kindCase_ == 5; + } + + /** + * + * + *
    +   * Int64
    +   * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + * + * @return The int64Type. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64 getInt64Type() { + if (kindCase_ == 5) { + return (com.google.bigtable.v2.Type.Int64) kind_; + } + return com.google.bigtable.v2.Type.Int64.getDefaultInstance(); + } + + /** + * + * + *
    +   * Int64
    +   * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64OrBuilder getInt64TypeOrBuilder() { + if (kindCase_ == 5) { + return (com.google.bigtable.v2.Type.Int64) kind_; + } + return com.google.bigtable.v2.Type.Int64.getDefaultInstance(); + } + + public static final int FLOAT32_TYPE_FIELD_NUMBER = 12; + + /** + * + * + *
    +   * Float32
    +   * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + * + * @return Whether the float32Type field is set. + */ + @java.lang.Override + public boolean hasFloat32Type() { + return kindCase_ == 12; + } + + /** + * + * + *
    +   * Float32
    +   * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + * + * @return The float32Type. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Float32 getFloat32Type() { + if (kindCase_ == 12) { + return (com.google.bigtable.v2.Type.Float32) kind_; + } + return com.google.bigtable.v2.Type.Float32.getDefaultInstance(); + } + + /** + * + * + *
    +   * Float32
    +   * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Float32OrBuilder getFloat32TypeOrBuilder() { + if (kindCase_ == 12) { + return (com.google.bigtable.v2.Type.Float32) kind_; + } + return com.google.bigtable.v2.Type.Float32.getDefaultInstance(); + } + + public static final int FLOAT64_TYPE_FIELD_NUMBER = 9; + + /** + * + * + *
    +   * Float64
    +   * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + * + * @return Whether the float64Type field is set. + */ + @java.lang.Override + public boolean hasFloat64Type() { + return kindCase_ == 9; + } + + /** + * + * + *
    +   * Float64
    +   * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + * + * @return The float64Type. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Float64 getFloat64Type() { + if (kindCase_ == 9) { + return (com.google.bigtable.v2.Type.Float64) kind_; + } + return com.google.bigtable.v2.Type.Float64.getDefaultInstance(); + } + + /** + * + * + *
    +   * Float64
    +   * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Float64OrBuilder getFloat64TypeOrBuilder() { + if (kindCase_ == 9) { + return (com.google.bigtable.v2.Type.Float64) kind_; + } + return com.google.bigtable.v2.Type.Float64.getDefaultInstance(); + } + + public static final int BOOL_TYPE_FIELD_NUMBER = 8; + + /** + * + * + *
    +   * Bool
    +   * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + * + * @return Whether the boolType field is set. + */ + @java.lang.Override + public boolean hasBoolType() { + return kindCase_ == 8; + } + + /** + * + * + *
    +   * Bool
    +   * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + * + * @return The boolType. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Bool getBoolType() { + if (kindCase_ == 8) { + return (com.google.bigtable.v2.Type.Bool) kind_; + } + return com.google.bigtable.v2.Type.Bool.getDefaultInstance(); + } + + /** + * + * + *
    +   * Bool
    +   * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.BoolOrBuilder getBoolTypeOrBuilder() { + if (kindCase_ == 8) { + return (com.google.bigtable.v2.Type.Bool) kind_; + } + return com.google.bigtable.v2.Type.Bool.getDefaultInstance(); + } + + public static final int TIMESTAMP_TYPE_FIELD_NUMBER = 10; + + /** + * + * + *
    +   * Timestamp
    +   * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * + * @return Whether the timestampType field is set. + */ + @java.lang.Override + public boolean hasTimestampType() { + return kindCase_ == 10; + } + + /** + * + * + *
    +   * Timestamp
    +   * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * + * @return The timestampType. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Timestamp getTimestampType() { + if (kindCase_ == 10) { + return (com.google.bigtable.v2.Type.Timestamp) kind_; + } + return com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); + } + + /** + * + * + *
    +   * Timestamp
    +   * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.TimestampOrBuilder getTimestampTypeOrBuilder() { + if (kindCase_ == 10) { + return (com.google.bigtable.v2.Type.Timestamp) kind_; + } + return com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); + } + + public static final int DATE_TYPE_FIELD_NUMBER = 11; + + /** + * + * + *
    +   * Date
    +   * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + * + * @return Whether the dateType field is set. + */ + @java.lang.Override + public boolean hasDateType() { + return kindCase_ == 11; + } + + /** + * + * + *
    +   * Date
    +   * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + * + * @return The dateType. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Date getDateType() { + if (kindCase_ == 11) { + return (com.google.bigtable.v2.Type.Date) kind_; + } + return com.google.bigtable.v2.Type.Date.getDefaultInstance(); + } + + /** + * + * + *
    +   * Date
    +   * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.DateOrBuilder getDateTypeOrBuilder() { + if (kindCase_ == 11) { + return (com.google.bigtable.v2.Type.Date) kind_; + } + return com.google.bigtable.v2.Type.Date.getDefaultInstance(); + } + + public static final int AGGREGATE_TYPE_FIELD_NUMBER = 6; + + /** + * + * + *
    +   * Aggregate
    +   * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * + * @return Whether the aggregateType field is set. + */ + @java.lang.Override + public boolean hasAggregateType() { + return kindCase_ == 6; + } + + /** + * + * + *
    +   * Aggregate
    +   * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * + * @return The aggregateType. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Aggregate getAggregateType() { + if (kindCase_ == 6) { + return (com.google.bigtable.v2.Type.Aggregate) kind_; + } + return com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); + } + + /** + * + * + *
    +   * Aggregate
    +   * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.AggregateOrBuilder getAggregateTypeOrBuilder() { + if (kindCase_ == 6) { + return (com.google.bigtable.v2.Type.Aggregate) kind_; + } + return com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); + } + + public static final int STRUCT_TYPE_FIELD_NUMBER = 7; + + /** + * + * + *
    +   * Struct
    +   * 
    + * + * .google.bigtable.v2.Type.Struct struct_type = 7; + * + * @return Whether the structType field is set. + */ + @java.lang.Override + 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(); + } + + /** + * + * + *
    +   * Struct
    +   * 
    + * + * .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 mapType. + */ + @java.lang.Override + 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.Map.getDefaultInstance(); + } + + /** + * + * + *
    +   * Map
    +   * 
    + * + * .google.bigtable.v2.Type.Map map_type = 4; + */ + @java.lang.Override + 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.Map.getDefaultInstance(); + } + + public static final int PROTO_TYPE_FIELD_NUMBER = 13; + + /** + * + * + *
    +   * Proto
    +   * 
    + * + * .google.bigtable.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.v2.Type.Proto proto_type = 13; + * + * @return The protoType. + */ + @java.lang.Override + 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.Proto.getDefaultInstance(); + } + + /** + * + * + *
    +   * Proto
    +   * 
    + * + * .google.bigtable.v2.Type.Proto proto_type = 13; + */ + @java.lang.Override + 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.Proto.getDefaultInstance(); + } + + public static final int ENUM_TYPE_FIELD_NUMBER = 14; + + /** + * + * + *
    +   * Enum
    +   * 
    + * + * .google.bigtable.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.v2.Type.Enum enum_type = 14; + * + * @return The enumType. + */ + @java.lang.Override + 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.Enum.getDefaultInstance(); + } + + /** + * + * + *
    +   * Enum
    +   * 
    + * + * .google.bigtable.v2.Type.Enum enum_type = 14; + */ + @java.lang.Override + 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.Enum.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 (kindCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.v2.Type.Bytes) kind_); + } + if (kindCase_ == 2) { + output.writeMessage(2, (com.google.bigtable.v2.Type.String) kind_); + } + if (kindCase_ == 3) { + output.writeMessage(3, (com.google.bigtable.v2.Type.Array) kind_); + } + if (kindCase_ == 4) { + output.writeMessage(4, (com.google.bigtable.v2.Type.Map) kind_); + } + if (kindCase_ == 5) { + output.writeMessage(5, (com.google.bigtable.v2.Type.Int64) kind_); + } + if (kindCase_ == 6) { + output.writeMessage(6, (com.google.bigtable.v2.Type.Aggregate) kind_); + } + if (kindCase_ == 7) { + output.writeMessage(7, (com.google.bigtable.v2.Type.Struct) kind_); + } + if (kindCase_ == 8) { + output.writeMessage(8, (com.google.bigtable.v2.Type.Bool) kind_); + } + if (kindCase_ == 9) { + output.writeMessage(9, (com.google.bigtable.v2.Type.Float64) kind_); + } + if (kindCase_ == 10) { + output.writeMessage(10, (com.google.bigtable.v2.Type.Timestamp) kind_); + } + if (kindCase_ == 11) { + output.writeMessage(11, (com.google.bigtable.v2.Type.Date) kind_); + } + 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); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.Type.Bytes) kind_); + } + if (kindCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.v2.Type.String) kind_); + } + if (kindCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.bigtable.v2.Type.Array) kind_); + } + if (kindCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.bigtable.v2.Type.Map) kind_); + } + if (kindCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.bigtable.v2.Type.Int64) kind_); + } + if (kindCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.bigtable.v2.Type.Aggregate) kind_); + } + if (kindCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.bigtable.v2.Type.Struct) kind_); + } + if (kindCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.bigtable.v2.Type.Bool) kind_); + } + if (kindCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.bigtable.v2.Type.Float64) kind_); + } + if (kindCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.bigtable.v2.Type.Timestamp) kind_); + } + if (kindCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.bigtable.v2.Type.Date) kind_); + } + if (kindCase_ == 12) { + size += + 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; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.v2.Type)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type other = (com.google.bigtable.v2.Type) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getBytesType().equals(other.getBytesType())) return false; + break; + case 2: + if (!getStringType().equals(other.getStringType())) return false; + break; + case 5: + if (!getInt64Type().equals(other.getInt64Type())) return false; + break; + case 12: + if (!getFloat32Type().equals(other.getFloat32Type())) return false; + break; + case 9: + if (!getFloat64Type().equals(other.getFloat64Type())) return false; + break; + case 8: + if (!getBoolType().equals(other.getBoolType())) return false; + break; + case 10: + if (!getTimestampType().equals(other.getTimestampType())) return false; + break; + case 11: + if (!getDateType().equals(other.getDateType())) return false; + break; + case 6: + if (!getAggregateType().equals(other.getAggregateType())) return false; + break; + case 7: + if (!getStructType().equals(other.getStructType())) return false; + break; + case 3: + if (!getArrayType().equals(other.getArrayType())) return false; + break; + 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: + } + 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 (kindCase_) { + case 1: + hash = (37 * hash) + BYTES_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getBytesType().hashCode(); + break; + case 2: + hash = (37 * hash) + STRING_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getStringType().hashCode(); + break; + case 5: + hash = (37 * hash) + INT64_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInt64Type().hashCode(); + break; + case 12: + hash = (37 * hash) + FLOAT32_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getFloat32Type().hashCode(); + break; + case 9: + hash = (37 * hash) + FLOAT64_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getFloat64Type().hashCode(); + break; + case 8: + hash = (37 * hash) + BOOL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getBoolType().hashCode(); + break; + case 10: + hash = (37 * hash) + TIMESTAMP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getTimestampType().hashCode(); + break; + case 11: + hash = (37 * hash) + DATE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getDateType().hashCode(); + break; + case 6: + hash = (37 * hash) + AGGREGATE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAggregateType().hashCode(); + break; + case 7: + hash = (37 * hash) + STRUCT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getStructType().hashCode(); + break; + case 3: + hash = (37 * hash) + ARRAY_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getArrayType().hashCode(); + break; + case 4: + 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); + } + + 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.GeneratedMessageV3.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.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + 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 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); + } + + 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); + } + + 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); + } + + @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.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; + } + + @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); + } + + // Construct using com.google.bigtable.v2.Type.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.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.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(); + } + + @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; + } + + @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; + } + + 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(); + } + if (kindCase_ == 13 && protoTypeBuilder_ != null) { + result.kind_ = protoTypeBuilder_.build(); + } + if (kindCase_ == 14 && enumTypeBuilder_ != null) { + result.kind_ = enumTypeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type) { + return mergeFrom((com.google.bigtable.v2.Type) other); + } else { + super.mergeFrom(other); + 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 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(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 + case 106: + { + input.readMessage(getProtoTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 13; + break; + } // case 106 + case 114: + { + input.readMessage(getEnumTypeFieldBuilder().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_; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + 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
    +     * 
    + * + * .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 + 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(); + } + } + + /** + * + * + *
    +     * 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; + } + + /** + * + * + *
    +     * 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()); + } + 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_ = 1; + return this; + } + + /** + * + * + *
    +     * 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; + } + + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + public com.google.bigtable.v2.Type.Bytes.Builder getBytesTypeBuilder() { + return getBytesTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + @java.lang.Override + 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(); + } + } + + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 1; + onChanged(); + return bytesTypeBuilder_; + } + + 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_; + + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + * + * @return Whether the stringType field is set. + */ + @java.lang.Override + public boolean hasStringType() { + return kindCase_ == 2; + } + + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + * + * @return The stringType. + */ + @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_; + } + return com.google.bigtable.v2.Type.String.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return stringTypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.String.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * 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; + } + + /** + * + * + *
    +     * 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; + } + + /** + * + * + *
    +     * 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 { + if (kindCase_ == 2) { + stringTypeBuilder_.mergeFrom(value); + } else { + stringTypeBuilder_.setMessage(value); + } + } + kindCase_ = 2; + return this; + } + + /** + * + * + *
    +     * 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(); + } + return this; + } + + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + */ + public com.google.bigtable.v2.Type.String.Builder getStringTypeBuilder() { + return getStringTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + */ + @java.lang.Override + 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(); + } + } + + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 2; + onChanged(); + return stringTypeBuilder_; + } + + 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_; + + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + * + * @return Whether the int64Type field is set. + */ + @java.lang.Override + public boolean hasInt64Type() { + return kindCase_ == 5; + } + + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + * + * @return The int64Type. + */ + @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_; + } + return com.google.bigtable.v2.Type.Int64.getDefaultInstance(); + } else { + if (kindCase_ == 5) { + return int64TypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Int64.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + */ + public Builder setInt64Type(com.google.bigtable.v2.Type.Int64 value) { + if (int64TypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + int64TypeBuilder_.setMessage(value); + } + kindCase_ = 5; + return this; + } + + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + */ + public Builder setInt64Type(com.google.bigtable.v2.Type.Int64.Builder builderForValue) { + if (int64TypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + int64TypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 5; + return this; + } + + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + */ + 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.Int64.newBuilder( + (com.google.bigtable.v2.Type.Int64) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 5) { + int64TypeBuilder_.mergeFrom(value); + } else { + int64TypeBuilder_.setMessage(value); + } + } + kindCase_ = 5; + return this; + } + + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + */ + public Builder clearInt64Type() { + if (int64TypeBuilder_ == null) { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + } + int64TypeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + */ + public com.google.bigtable.v2.Type.Int64.Builder getInt64TypeBuilder() { + return getInt64TypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64OrBuilder getInt64TypeOrBuilder() { + if ((kindCase_ == 5) && (int64TypeBuilder_ != null)) { + return int64TypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 5) { + return (com.google.bigtable.v2.Type.Int64) kind_; + } + return com.google.bigtable.v2.Type.Int64.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Int64
    +     * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 5; + onChanged(); + return int64TypeBuilder_; + } + + 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_; + + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + * + * @return Whether the float32Type field is set. + */ + @java.lang.Override + public boolean hasFloat32Type() { + return kindCase_ == 12; + } + + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + * + * @return The float32Type. + */ + @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_; + } + return com.google.bigtable.v2.Type.Float32.getDefaultInstance(); + } else { + if (kindCase_ == 12) { + return float32TypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Float32.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + */ + public Builder setFloat32Type(com.google.bigtable.v2.Type.Float32 value) { + if (float32TypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + float32TypeBuilder_.setMessage(value); + } + kindCase_ = 12; + return this; + } + + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + */ + public Builder setFloat32Type(com.google.bigtable.v2.Type.Float32.Builder builderForValue) { + if (float32TypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + float32TypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 12; + return this; + } + + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + */ + 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.Float32.newBuilder( + (com.google.bigtable.v2.Type.Float32) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 12) { + float32TypeBuilder_.mergeFrom(value); + } else { + float32TypeBuilder_.setMessage(value); + } + } + kindCase_ = 12; + return this; + } + + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + */ + public Builder clearFloat32Type() { + if (float32TypeBuilder_ == null) { + if (kindCase_ == 12) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 12) { + kindCase_ = 0; + kind_ = null; + } + float32TypeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + */ + public com.google.bigtable.v2.Type.Float32.Builder getFloat32TypeBuilder() { + return getFloat32TypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Float32OrBuilder getFloat32TypeOrBuilder() { + if ((kindCase_ == 12) && (float32TypeBuilder_ != null)) { + return float32TypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 12) { + return (com.google.bigtable.v2.Type.Float32) kind_; + } + return com.google.bigtable.v2.Type.Float32.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Float32
    +     * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 12; + onChanged(); + return float32TypeBuilder_; + } + + 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_; + + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + * + * @return Whether the float64Type field is set. + */ + @java.lang.Override + public boolean hasFloat64Type() { + return kindCase_ == 9; + } + + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + * + * @return The float64Type. + */ + @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_; + } + return com.google.bigtable.v2.Type.Float64.getDefaultInstance(); + } else { + if (kindCase_ == 9) { + return float64TypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Float64.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + */ + public Builder setFloat64Type(com.google.bigtable.v2.Type.Float64 value) { + if (float64TypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + float64TypeBuilder_.setMessage(value); + } + kindCase_ = 9; + return this; + } + + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + */ + public Builder setFloat64Type(com.google.bigtable.v2.Type.Float64.Builder builderForValue) { + if (float64TypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + float64TypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 9; + return this; + } + + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + */ + 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.Float64.newBuilder( + (com.google.bigtable.v2.Type.Float64) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 9) { + float64TypeBuilder_.mergeFrom(value); + } else { + float64TypeBuilder_.setMessage(value); + } + } + kindCase_ = 9; + return this; + } + + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + */ + public Builder clearFloat64Type() { + if (float64TypeBuilder_ == null) { + if (kindCase_ == 9) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 9) { + kindCase_ = 0; + kind_ = null; + } + float64TypeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + */ + public com.google.bigtable.v2.Type.Float64.Builder getFloat64TypeBuilder() { + return getFloat64TypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Float64OrBuilder getFloat64TypeOrBuilder() { + if ((kindCase_ == 9) && (float64TypeBuilder_ != null)) { + return float64TypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 9) { + return (com.google.bigtable.v2.Type.Float64) kind_; + } + return com.google.bigtable.v2.Type.Float64.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Float64
    +     * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 9; + onChanged(); + return float64TypeBuilder_; + } + + 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_; + + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + * + * @return Whether the boolType field is set. + */ + @java.lang.Override + public boolean hasBoolType() { + return kindCase_ == 8; + } + + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + * + * @return The boolType. + */ + @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_; + } + return com.google.bigtable.v2.Type.Bool.getDefaultInstance(); + } else { + if (kindCase_ == 8) { + return boolTypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Bool.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + */ + public Builder setBoolType(com.google.bigtable.v2.Type.Bool value) { + if (boolTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + boolTypeBuilder_.setMessage(value); + } + kindCase_ = 8; + return this; + } + + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + */ + public Builder setBoolType(com.google.bigtable.v2.Type.Bool.Builder builderForValue) { + if (boolTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + boolTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 8; + return this; + } + + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + */ + 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.Bool.newBuilder((com.google.bigtable.v2.Type.Bool) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 8) { + boolTypeBuilder_.mergeFrom(value); + } else { + boolTypeBuilder_.setMessage(value); + } + } + kindCase_ = 8; + return this; + } + + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + */ + public Builder clearBoolType() { + if (boolTypeBuilder_ == null) { + if (kindCase_ == 8) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 8) { + kindCase_ = 0; + kind_ = null; + } + boolTypeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + */ + public com.google.bigtable.v2.Type.Bool.Builder getBoolTypeBuilder() { + return getBoolTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.BoolOrBuilder getBoolTypeOrBuilder() { + if ((kindCase_ == 8) && (boolTypeBuilder_ != null)) { + return boolTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 8) { + return (com.google.bigtable.v2.Type.Bool) kind_; + } + return com.google.bigtable.v2.Type.Bool.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Bool
    +     * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 8; + onChanged(); + return boolTypeBuilder_; + } + + 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_; + + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * + * @return Whether the timestampType field is set. + */ + @java.lang.Override + public boolean hasTimestampType() { + return kindCase_ == 10; + } + + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * + * @return The timestampType. + */ + @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_; + } + return com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); + } else { + if (kindCase_ == 10) { + return timestampTypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + */ + public Builder setTimestampType(com.google.bigtable.v2.Type.Timestamp value) { + if (timestampTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + timestampTypeBuilder_.setMessage(value); + } + kindCase_ = 10; + return this; + } + + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + */ + public Builder setTimestampType(com.google.bigtable.v2.Type.Timestamp.Builder builderForValue) { + if (timestampTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + timestampTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 10; + return this; + } + + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + */ + 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.Timestamp.newBuilder( + (com.google.bigtable.v2.Type.Timestamp) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 10) { + timestampTypeBuilder_.mergeFrom(value); + } else { + timestampTypeBuilder_.setMessage(value); + } + } + kindCase_ = 10; + return this; + } + + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + */ + public Builder clearTimestampType() { + if (timestampTypeBuilder_ == null) { + if (kindCase_ == 10) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 10) { + kindCase_ = 0; + kind_ = null; + } + timestampTypeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + */ + public com.google.bigtable.v2.Type.Timestamp.Builder getTimestampTypeBuilder() { + return getTimestampTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.TimestampOrBuilder getTimestampTypeOrBuilder() { + if ((kindCase_ == 10) && (timestampTypeBuilder_ != null)) { + return timestampTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 10) { + return (com.google.bigtable.v2.Type.Timestamp) kind_; + } + return com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Timestamp
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 10; + onChanged(); + return timestampTypeBuilder_; + } + + 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_; + + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + * + * @return Whether the dateType field is set. + */ + @java.lang.Override + public boolean hasDateType() { + return kindCase_ == 11; + } + + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + * + * @return The dateType. + */ + @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_; + } + return com.google.bigtable.v2.Type.Date.getDefaultInstance(); + } else { + if (kindCase_ == 11) { + return dateTypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Date.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + */ + public Builder setDateType(com.google.bigtable.v2.Type.Date value) { + if (dateTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + dateTypeBuilder_.setMessage(value); + } + kindCase_ = 11; + return this; + } + + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + */ + public Builder setDateType(com.google.bigtable.v2.Type.Date.Builder builderForValue) { + if (dateTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + dateTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 11; + return this; + } + + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + */ + 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.Date.newBuilder((com.google.bigtable.v2.Type.Date) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 11) { + dateTypeBuilder_.mergeFrom(value); + } else { + dateTypeBuilder_.setMessage(value); + } + } + kindCase_ = 11; + return this; + } + + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + */ + public Builder clearDateType() { + if (dateTypeBuilder_ == null) { + if (kindCase_ == 11) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 11) { + kindCase_ = 0; + kind_ = null; + } + dateTypeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + */ + public com.google.bigtable.v2.Type.Date.Builder getDateTypeBuilder() { + return getDateTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.DateOrBuilder getDateTypeOrBuilder() { + if ((kindCase_ == 11) && (dateTypeBuilder_ != null)) { + return dateTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 11) { + return (com.google.bigtable.v2.Type.Date) kind_; + } + return com.google.bigtable.v2.Type.Date.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Date
    +     * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 11; + onChanged(); + return dateTypeBuilder_; + } + + 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_; + + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * + * @return Whether the aggregateType field is set. + */ + @java.lang.Override + public boolean hasAggregateType() { + return kindCase_ == 6; + } + + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * + * @return The aggregateType. + */ + @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_; + } + return com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); + } else { + if (kindCase_ == 6) { + return aggregateTypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + */ + public Builder setAggregateType(com.google.bigtable.v2.Type.Aggregate value) { + if (aggregateTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + aggregateTypeBuilder_.setMessage(value); + } + kindCase_ = 6; + return this; + } + + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + */ + public Builder setAggregateType(com.google.bigtable.v2.Type.Aggregate.Builder builderForValue) { + if (aggregateTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + aggregateTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 6; + return this; + } + + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + */ + 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.Aggregate.newBuilder( + (com.google.bigtable.v2.Type.Aggregate) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 6) { + aggregateTypeBuilder_.mergeFrom(value); + } else { + aggregateTypeBuilder_.setMessage(value); + } + } + kindCase_ = 6; + return this; + } + + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + */ + public Builder clearAggregateType() { + if (aggregateTypeBuilder_ == null) { + if (kindCase_ == 6) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 6) { + kindCase_ = 0; + kind_ = null; + } + aggregateTypeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + */ + public com.google.bigtable.v2.Type.Aggregate.Builder getAggregateTypeBuilder() { + return getAggregateTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.AggregateOrBuilder getAggregateTypeOrBuilder() { + if ((kindCase_ == 6) && (aggregateTypeBuilder_ != null)) { + return aggregateTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 6) { + return (com.google.bigtable.v2.Type.Aggregate) kind_; + } + return com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Aggregate
    +     * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 6; + onChanged(); + return aggregateTypeBuilder_; + } + + 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_; + + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.v2.Type.Struct struct_type = 7; + * + * @return Whether the structType field is set. + */ + @java.lang.Override + 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 (structTypeBuilder_ == null) { + if (kindCase_ == 7) { + return (com.google.bigtable.v2.Type.Struct) kind_; + } + return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); + } else { + if (kindCase_ == 7) { + return structTypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.v2.Type.Struct struct_type = 7; + */ + public Builder setStructType(com.google.bigtable.v2.Type.Struct value) { + if (structTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + structTypeBuilder_.setMessage(value); + } + kindCase_ = 7; + return this; + } + + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.v2.Type.Struct struct_type = 7; + */ + public Builder setStructType(com.google.bigtable.v2.Type.Struct.Builder builderForValue) { + if (structTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + structTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 7; + return this; + } + + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.v2.Type.Struct struct_type = 7; + */ + 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.Struct.newBuilder( + (com.google.bigtable.v2.Type.Struct) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 7) { + structTypeBuilder_.mergeFrom(value); + } else { + structTypeBuilder_.setMessage(value); + } + } + kindCase_ = 7; + return this; + } + + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.v2.Type.Struct struct_type = 7; + */ + public Builder clearStructType() { + if (structTypeBuilder_ == null) { + if (kindCase_ == 7) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 7) { + kindCase_ = 0; + kind_ = null; + } + structTypeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.v2.Type.Struct struct_type = 7; + */ + public com.google.bigtable.v2.Type.Struct.Builder getStructTypeBuilder() { + return getStructTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.v2.Type.Struct struct_type = 7; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.StructOrBuilder getStructTypeOrBuilder() { + if ((kindCase_ == 7) && (structTypeBuilder_ != null)) { + return structTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 7) { + return (com.google.bigtable.v2.Type.Struct) kind_; + } + return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Struct
    +     * 
    + * + * .google.bigtable.v2.Type.Struct struct_type = 7; + */ + 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(); + } + 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()); + kind_ = null; + } + kindCase_ = 7; + onChanged(); + return structTypeBuilder_; + } + + 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_; + + /** + * + * + *
    +     * 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 (arrayTypeBuilder_ == null) { + if (kindCase_ == 3) { + return (com.google.bigtable.v2.Type.Array) kind_; + } + return com.google.bigtable.v2.Type.Array.getDefaultInstance(); + } else { + if (kindCase_ == 3) { + return arrayTypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Array.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Array
    +     * 
    + * + * .google.bigtable.v2.Type.Array array_type = 3; + */ + public Builder setArrayType(com.google.bigtable.v2.Type.Array value) { + if (arrayTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + arrayTypeBuilder_.setMessage(value); + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
    +     * Array
    +     * 
    + * + * .google.bigtable.v2.Type.Array array_type = 3; + */ + public Builder setArrayType(com.google.bigtable.v2.Type.Array.Builder builderForValue) { + if (arrayTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + arrayTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
    +     * Array
    +     * 
    + * + * .google.bigtable.v2.Type.Array array_type = 3; + */ + 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.Array.newBuilder( + (com.google.bigtable.v2.Type.Array) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 3) { + arrayTypeBuilder_.mergeFrom(value); + } else { + arrayTypeBuilder_.setMessage(value); + } + } + kindCase_ = 3; + return this; + } + + /** + * + * + *
    +     * Array
    +     * 
    + * + * .google.bigtable.v2.Type.Array array_type = 3; + */ + public Builder clearArrayType() { + if (arrayTypeBuilder_ == null) { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + } + arrayTypeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Array
    +     * 
    + * + * .google.bigtable.v2.Type.Array array_type = 3; + */ + public com.google.bigtable.v2.Type.Array.Builder getArrayTypeBuilder() { + return getArrayTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Array
    +     * 
    + * + * .google.bigtable.v2.Type.Array array_type = 3; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.ArrayOrBuilder getArrayTypeOrBuilder() { + if ((kindCase_ == 3) && (arrayTypeBuilder_ != null)) { + return arrayTypeBuilder_.getMessageOrBuilder(); + } else { + 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; + */ + 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()); + kind_ = null; + } + kindCase_ = 3; + onChanged(); + return arrayTypeBuilder_; + } + + 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_; + + /** + * + * + *
    +     * 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 mapType. + */ + @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_; + } + return com.google.bigtable.v2.Type.Map.getDefaultInstance(); + } else { + if (kindCase_ == 4) { + return mapTypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Map.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Map
    +     * 
    + * + * .google.bigtable.v2.Type.Map map_type = 4; + */ + public Builder setMapType(com.google.bigtable.v2.Type.Map value) { + if (mapTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + mapTypeBuilder_.setMessage(value); + } + kindCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Map
    +     * 
    + * + * .google.bigtable.v2.Type.Map map_type = 4; + */ + public Builder setMapType(com.google.bigtable.v2.Type.Map.Builder builderForValue) { + if (mapTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + mapTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Map
    +     * 
    + * + * .google.bigtable.v2.Type.Map map_type = 4; + */ + 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.Map.newBuilder((com.google.bigtable.v2.Type.Map) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 4) { + mapTypeBuilder_.mergeFrom(value); + } else { + mapTypeBuilder_.setMessage(value); + } + } + kindCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Map
    +     * 
    + * + * .google.bigtable.v2.Type.Map map_type = 4; + */ + public Builder clearMapType() { + if (mapTypeBuilder_ == null) { + if (kindCase_ == 4) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 4) { + kindCase_ = 0; + kind_ = null; + } + mapTypeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Map
    +     * 
    + * + * .google.bigtable.v2.Type.Map map_type = 4; + */ + public com.google.bigtable.v2.Type.Map.Builder getMapTypeBuilder() { + return getMapTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Map
    +     * 
    + * + * .google.bigtable.v2.Type.Map map_type = 4; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.MapOrBuilder getMapTypeOrBuilder() { + if ((kindCase_ == 4) && (mapTypeBuilder_ != null)) { + return mapTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 4) { + return (com.google.bigtable.v2.Type.Map) kind_; + } + return com.google.bigtable.v2.Type.Map.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Map
    +     * 
    + * + * .google.bigtable.v2.Type.Map map_type = 4; + */ + 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()); + kind_ = null; + } + kindCase_ = 4; + onChanged(); + return mapTypeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Proto, + com.google.bigtable.v2.Type.Proto.Builder, + com.google.bigtable.v2.Type.ProtoOrBuilder> + protoTypeBuilder_; + + /** + * + * + *
    +     * Proto
    +     * 
    + * + * .google.bigtable.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.v2.Type.Proto proto_type = 13; + * + * @return The protoType. + */ + @java.lang.Override + 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.Proto.getDefaultInstance(); + } else { + if (kindCase_ == 13) { + return protoTypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Proto.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Proto
    +     * 
    + * + * .google.bigtable.v2.Type.Proto proto_type = 13; + */ + public Builder setProtoType(com.google.bigtable.v2.Type.Proto value) { + if (protoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + protoTypeBuilder_.setMessage(value); + } + kindCase_ = 13; + return this; + } + + /** + * + * + *
    +     * Proto
    +     * 
    + * + * .google.bigtable.v2.Type.Proto proto_type = 13; + */ + public Builder setProtoType(com.google.bigtable.v2.Type.Proto.Builder builderForValue) { + if (protoTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + protoTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 13; + return this; + } + + /** + * + * + *
    +     * Proto
    +     * 
    + * + * .google.bigtable.v2.Type.Proto proto_type = 13; + */ + 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.Proto.newBuilder( + (com.google.bigtable.v2.Type.Proto) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 13) { + protoTypeBuilder_.mergeFrom(value); + } else { + protoTypeBuilder_.setMessage(value); + } + } + kindCase_ = 13; + return this; + } + + /** + * + * + *
    +     * Proto
    +     * 
    + * + * .google.bigtable.v2.Type.Proto proto_type = 13; + */ + public Builder clearProtoType() { + if (protoTypeBuilder_ == null) { + if (kindCase_ == 13) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 13) { + kindCase_ = 0; + kind_ = null; + } + protoTypeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Proto
    +     * 
    + * + * .google.bigtable.v2.Type.Proto proto_type = 13; + */ + public com.google.bigtable.v2.Type.Proto.Builder getProtoTypeBuilder() { + return getProtoTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Proto
    +     * 
    + * + * .google.bigtable.v2.Type.Proto proto_type = 13; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.ProtoOrBuilder getProtoTypeOrBuilder() { + if ((kindCase_ == 13) && (protoTypeBuilder_ != null)) { + return protoTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 13) { + return (com.google.bigtable.v2.Type.Proto) kind_; + } + return com.google.bigtable.v2.Type.Proto.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Proto
    +     * 
    + * + * .google.bigtable.v2.Type.Proto proto_type = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Proto, + com.google.bigtable.v2.Type.Proto.Builder, + com.google.bigtable.v2.Type.ProtoOrBuilder> + getProtoTypeFieldBuilder() { + if (protoTypeBuilder_ == null) { + if (!(kindCase_ == 13)) { + kind_ = com.google.bigtable.v2.Type.Proto.getDefaultInstance(); + } + protoTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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_ = 13; + onChanged(); + return protoTypeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Enum, + com.google.bigtable.v2.Type.Enum.Builder, + com.google.bigtable.v2.Type.EnumOrBuilder> + enumTypeBuilder_; + + /** + * + * + *
    +     * Enum
    +     * 
    + * + * .google.bigtable.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.v2.Type.Enum enum_type = 14; + * + * @return The enumType. + */ + @java.lang.Override + 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.Enum.getDefaultInstance(); + } else { + if (kindCase_ == 14) { + return enumTypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Enum.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Enum
    +     * 
    + * + * .google.bigtable.v2.Type.Enum enum_type = 14; + */ + public Builder setEnumType(com.google.bigtable.v2.Type.Enum value) { + if (enumTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + enumTypeBuilder_.setMessage(value); + } + kindCase_ = 14; + return this; + } + + /** + * + * + *
    +     * Enum
    +     * 
    + * + * .google.bigtable.v2.Type.Enum enum_type = 14; + */ + public Builder setEnumType(com.google.bigtable.v2.Type.Enum.Builder builderForValue) { + if (enumTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + enumTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 14; + return this; + } + + /** + * + * + *
    +     * Enum
    +     * 
    + * + * .google.bigtable.v2.Type.Enum enum_type = 14; + */ + 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.Enum.newBuilder((com.google.bigtable.v2.Type.Enum) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 14) { + enumTypeBuilder_.mergeFrom(value); + } else { + enumTypeBuilder_.setMessage(value); + } + } + kindCase_ = 14; + return this; + } + + /** + * + * + *
    +     * Enum
    +     * 
    + * + * .google.bigtable.v2.Type.Enum enum_type = 14; + */ + public Builder clearEnumType() { + if (enumTypeBuilder_ == null) { + if (kindCase_ == 14) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 14) { + kindCase_ = 0; + kind_ = null; + } + enumTypeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Enum
    +     * 
    + * + * .google.bigtable.v2.Type.Enum enum_type = 14; + */ + public com.google.bigtable.v2.Type.Enum.Builder getEnumTypeBuilder() { + return getEnumTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Enum
    +     * 
    + * + * .google.bigtable.v2.Type.Enum enum_type = 14; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.EnumOrBuilder getEnumTypeOrBuilder() { + if ((kindCase_ == 14) && (enumTypeBuilder_ != null)) { + return enumTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 14) { + return (com.google.bigtable.v2.Type.Enum) kind_; + } + return com.google.bigtable.v2.Type.Enum.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Enum
    +     * 
    + * + * .google.bigtable.v2.Type.Enum enum_type = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.Type.Enum, + com.google.bigtable.v2.Type.Enum.Builder, + com.google.bigtable.v2.Type.EnumOrBuilder> + getEnumTypeFieldBuilder() { + if (enumTypeBuilder_ == null) { + if (!(kindCase_ == 14)) { + kind_ = com.google.bigtable.v2.Type.Enum.getDefaultInstance(); + } + enumTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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_ = 14; + onChanged(); + return enumTypeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type) + private static final com.google.bigtable.v2.Type DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type(); + } + + public static com.google.bigtable.v2.Type getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Type 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 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} 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 new file mode 100644 index 0000000000..31c327db77 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TypeOrBuilder.java @@ -0,0 +1,546 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/types.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +public interface TypeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Bytes
    +   * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * + * @return Whether the bytesType field is set. + */ + boolean hasBytesType(); + + /** + * + * + *
    +   * Bytes
    +   * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * + * @return The bytesType. + */ + com.google.bigtable.v2.Type.Bytes getBytesType(); + + /** + * + * + *
    +   * Bytes
    +   * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + com.google.bigtable.v2.Type.BytesOrBuilder getBytesTypeOrBuilder(); + + /** + * + * + *
    +   * String
    +   * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + * + * @return Whether the stringType field is set. + */ + boolean hasStringType(); + + /** + * + * + *
    +   * String
    +   * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + * + * @return The stringType. + */ + com.google.bigtable.v2.Type.String getStringType(); + + /** + * + * + *
    +   * String
    +   * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + */ + com.google.bigtable.v2.Type.StringOrBuilder getStringTypeOrBuilder(); + + /** + * + * + *
    +   * Int64
    +   * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + * + * @return Whether the int64Type field is set. + */ + boolean hasInt64Type(); + + /** + * + * + *
    +   * Int64
    +   * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + * + * @return The int64Type. + */ + com.google.bigtable.v2.Type.Int64 getInt64Type(); + + /** + * + * + *
    +   * Int64
    +   * 
    + * + * .google.bigtable.v2.Type.Int64 int64_type = 5; + */ + com.google.bigtable.v2.Type.Int64OrBuilder getInt64TypeOrBuilder(); + + /** + * + * + *
    +   * Float32
    +   * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + * + * @return Whether the float32Type field is set. + */ + boolean hasFloat32Type(); + + /** + * + * + *
    +   * Float32
    +   * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + * + * @return The float32Type. + */ + com.google.bigtable.v2.Type.Float32 getFloat32Type(); + + /** + * + * + *
    +   * Float32
    +   * 
    + * + * .google.bigtable.v2.Type.Float32 float32_type = 12; + */ + com.google.bigtable.v2.Type.Float32OrBuilder getFloat32TypeOrBuilder(); + + /** + * + * + *
    +   * Float64
    +   * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + * + * @return Whether the float64Type field is set. + */ + boolean hasFloat64Type(); + + /** + * + * + *
    +   * Float64
    +   * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + * + * @return The float64Type. + */ + com.google.bigtable.v2.Type.Float64 getFloat64Type(); + + /** + * + * + *
    +   * Float64
    +   * 
    + * + * .google.bigtable.v2.Type.Float64 float64_type = 9; + */ + com.google.bigtable.v2.Type.Float64OrBuilder getFloat64TypeOrBuilder(); + + /** + * + * + *
    +   * Bool
    +   * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + * + * @return Whether the boolType field is set. + */ + boolean hasBoolType(); + + /** + * + * + *
    +   * Bool
    +   * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + * + * @return The boolType. + */ + com.google.bigtable.v2.Type.Bool getBoolType(); + + /** + * + * + *
    +   * Bool
    +   * 
    + * + * .google.bigtable.v2.Type.Bool bool_type = 8; + */ + com.google.bigtable.v2.Type.BoolOrBuilder getBoolTypeOrBuilder(); + + /** + * + * + *
    +   * Timestamp
    +   * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * + * @return Whether the timestampType field is set. + */ + boolean hasTimestampType(); + + /** + * + * + *
    +   * Timestamp
    +   * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * + * @return The timestampType. + */ + com.google.bigtable.v2.Type.Timestamp getTimestampType(); + + /** + * + * + *
    +   * Timestamp
    +   * 
    + * + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + */ + com.google.bigtable.v2.Type.TimestampOrBuilder getTimestampTypeOrBuilder(); + + /** + * + * + *
    +   * Date
    +   * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + * + * @return Whether the dateType field is set. + */ + boolean hasDateType(); + + /** + * + * + *
    +   * Date
    +   * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + * + * @return The dateType. + */ + com.google.bigtable.v2.Type.Date getDateType(); + + /** + * + * + *
    +   * Date
    +   * 
    + * + * .google.bigtable.v2.Type.Date date_type = 11; + */ + com.google.bigtable.v2.Type.DateOrBuilder getDateTypeOrBuilder(); + + /** + * + * + *
    +   * Aggregate
    +   * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * + * @return Whether the aggregateType field is set. + */ + boolean hasAggregateType(); + + /** + * + * + *
    +   * Aggregate
    +   * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * + * @return The aggregateType. + */ + com.google.bigtable.v2.Type.Aggregate getAggregateType(); + + /** + * + * + *
    +   * Aggregate
    +   * 
    + * + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + */ + com.google.bigtable.v2.Type.AggregateOrBuilder getAggregateTypeOrBuilder(); + + /** + * + * + *
    +   * Struct
    +   * 
    + * + * .google.bigtable.v2.Type.Struct struct_type = 7; + * + * @return Whether the structType field is set. + */ + boolean hasStructType(); + + /** + * + * + *
    +   * Struct
    +   * 
    + * + * .google.bigtable.v2.Type.Struct struct_type = 7; + * + * @return The structType. + */ + com.google.bigtable.v2.Type.Struct getStructType(); + + /** + * + * + *
    +   * Struct
    +   * 
    + * + * .google.bigtable.v2.Type.Struct struct_type = 7; + */ + com.google.bigtable.v2.Type.StructOrBuilder getStructTypeOrBuilder(); + + /** + * + * + *
    +   * Array
    +   * 
    + * + * .google.bigtable.v2.Type.Array array_type = 3; + * + * @return Whether the arrayType field is set. + */ + boolean hasArrayType(); + + /** + * + * + *
    +   * Array
    +   * 
    + * + * .google.bigtable.v2.Type.Array array_type = 3; + * + * @return The arrayType. + */ + com.google.bigtable.v2.Type.Array getArrayType(); + + /** + * + * + *
    +   * Array
    +   * 
    + * + * .google.bigtable.v2.Type.Array array_type = 3; + */ + com.google.bigtable.v2.Type.ArrayOrBuilder getArrayTypeOrBuilder(); + + /** + * + * + *
    +   * Map
    +   * 
    + * + * .google.bigtable.v2.Type.Map map_type = 4; + * + * @return Whether the mapType field is set. + */ + boolean hasMapType(); + + /** + * + * + *
    +   * Map
    +   * 
    + * + * .google.bigtable.v2.Type.Map map_type = 4; + * + * @return The mapType. + */ + com.google.bigtable.v2.Type.Map getMapType(); + + /** + * + * + *
    +   * Map
    +   * 
    + * + * .google.bigtable.v2.Type.Map map_type = 4; + */ + 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 new file mode 100644 index 0000000000..956e8338a2 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TypesProto.java @@ -0,0 +1,431 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/types.proto + +// Protobuf Java Version: 3.25.8 +package com.google.bigtable.v2; + +public final class TypesProto { + private TypesProto() {} + + 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_Type_descriptor; + static final com.google.protobuf.GeneratedMessageV3.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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + internal_static_google_bigtable_v2_Type_Int64_Encoding_BigEndianBytes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_Type_Bool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.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 + 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 + 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 + internal_static_google_bigtable_v2_Type_Timestamp_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_Type_Date_descriptor; + static final com.google.protobuf.GeneratedMessageV3.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 + 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 + internal_static_google_bigtable_v2_Type_Struct_Field_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_Type_Proto_descriptor; + static final com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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 + 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 + 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 + 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 + 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 + 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 + 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 + internal_static_google_bigtable_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_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\036google/bigtable/v2/types.proto\022\022google" + + ".bigtable.v2\032\037google/api/field_behavior." + + "proto\"\270\022\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" + + "le.v2.Type.Int64H\000\0228\n\014float32_type\030\014 \001(\013" + + "2 .google.bigtable.v2.Type.Float32H\000\0228\n\014" + + "float64_type\030\t \001(\0132 .google.bigtable.v2." + + "Type.Float64H\000\0222\n\tbool_type\030\010 \001(\0132\035.goog" + + "le.bigtable.v2.Type.BoolH\000\022<\n\016timestamp_" + + "type\030\n \001(\0132\".google.bigtable.v2.Type.Tim" + + "estampH\000\0222\n\tdate_type\030\013 \001(\0132\035.google.big" + + "table.v2.Type.DateH\000\022<\n\016aggregate_type\030\006" + + " \001(\0132\".google.bigtable.v2.Type.Aggregate" + + "H\000\0226\n\013struct_type\030\007 \001(\0132\037.google.bigtabl" + + "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\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\235\001\n\005Bytes\0229" + + "\n\010encoding\030\001 \001(\0132\'.google.bigtable.v2.Ty" + + "pe.Bytes.Encoding\032Y\n\010Encoding\022:\n\003raw\030\001 \001" + + "(\0132+.google.bigtable.v2.Type.Bytes.Encod" + + "ing.RawH\000\032\005\n\003RawB\n\n\010encoding\032\215\002\n\006String\022" + + ":\n\010encoding\030\001 \001(\0132(.google.bigtable.v2.T" + + "ype.String.Encoding\032\306\001\n\010Encoding\022H\n\010utf8" + + "_raw\030\001 \001(\01320.google.bigtable.v2.Type.Str" + + "ing.Encoding.Utf8RawB\002\030\001H\000\022H\n\nutf8_bytes" + + "\030\002 \001(\01322.google.bigtable.v2.Type.String." + + "Encoding.Utf8BytesH\000\032\r\n\007Utf8Raw:\002\030\001\032\013\n\tU" + + "tf8BytesB\n\n\010encoding\032\365\001\n\005Int64\0229\n\010encodi" + + "ng\030\001 \001(\0132\'.google.bigtable.v2.Type.Int64" + + ".Encoding\032\260\001\n\010Encoding\022R\n\020big_endian_byt" + + "es\030\001 \001(\01326.google.bigtable.v2.Type.Int64" + + ".Encoding.BigEndianBytesH\000\032D\n\016BigEndianB" + + "ytes\0222\n\nbytes_type\030\001 \001(\0132\036.google.bigtab" + + "le.v2.Type.BytesB\n\n\010encoding\032\006\n\004Bool\032\t\n\007" + + "Float32\032\t\n\007Float64\032\013\n\tTimestamp\032\006\n\004Date\032" + + "\204\001\n\006Struct\0225\n\006fields\030\001 \003(\0132%.google.bigt" + + "able.v2.Type.Struct.Field\032C\n\005Field\022\022\n\nfi" + + "eld_name\030\001 \001(\t\022&\n\004type\030\002 \001(\0132\030.google.bi" + + "gtable.v2.Type\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.go" + + "ogle.bigtable.v2.Type\032_\n\003Map\022*\n\010key_type" + + "\030\001 \001(\0132\030.google.bigtable.v2.Type\022,\n\nvalu" + + "e_type\030\002 \001(\0132\030.google.bigtable.v2.Type\032\267" + + "\003\n\tAggregate\022,\n\ninput_type\030\001 \001(\0132\030.googl" + + "e.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.S" + + "umH\000\022_\n\022hllpp_unique_count\030\005 \001(\0132A.googl" + + "e.bigtable.v2.Type.Aggregate.HyperLogLog" + + "PlusPlusUniqueCountH\000\0225\n\003max\030\006 \001(\0132&.goo" + + "gle.bigtable.v2.Type.Aggregate.MaxH\000\0225\n\003" + + "min\030\007 \001(\0132&.google.bigtable.v2.Type.Aggr" + + "egate.MinH\000\032\005\n\003Sum\032\005\n\003Max\032\005\n\003Min\032 \n\036Hype" + + "rLogLogPlusPlusUniqueCountB\014\n\naggregator" + + "B\006\n\004kindB\264\001\n\026com.google.bigtable.v2B\nTyp" + + "esProtoP\001Z8cloud.google.com/go/bigtable/" + + "apiv2/bigtablepb;bigtablepb\252\002\030Google.Clo" + + "ud.Bigtable.V2\312\002\030Google\\Cloud\\Bigtable\\V" + + "2\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(), + }); + internal_static_google_bigtable_v2_Type_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_bigtable_v2_Type_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_descriptor, + new java.lang.String[] { + "BytesType", + "StringType", + "Int64Type", + "Float32Type", + "Float64Type", + "BoolType", + "TimestampType", + "DateType", + "AggregateType", + "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_Bytes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Encoding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Raw_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Bytes_Encoding_Raw_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_v2_Type_String_descriptor = + internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(1); + internal_static_google_bigtable_v2_Type_String_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Encoding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Utf8Raw_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Utf8Bytes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Bytes_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_v2_Type_Int64_descriptor = + internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(2); + internal_static_google_bigtable_v2_Type_Int64_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Encoding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Int64_Encoding_descriptor, + new java.lang.String[] { + "BigEndianBytes", "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_BigEndianBytes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Int64_Encoding_BigEndianBytes_descriptor, + new java.lang.String[] { + "BytesType", + }); + internal_static_google_bigtable_v2_Type_Bool_descriptor = + internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(3); + internal_static_google_bigtable_v2_Type_Bool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Float32_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Float64_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Timestamp_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Timestamp_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_v2_Type_Date_descriptor = + internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(7); + internal_static_google_bigtable_v2_Type_Date_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Struct_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Struct_descriptor, + new java.lang.String[] { + "Fields", + }); + 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_Field_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Struct_Field_descriptor, + new java.lang.String[] { + "FieldName", "Type", + }); + internal_static_google_bigtable_v2_Type_Proto_descriptor = + internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(9); + internal_static_google_bigtable_v2_Type_Proto_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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.getNestedTypes().get(10); + internal_static_google_bigtable_v2_Type_Enum_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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(11); + internal_static_google_bigtable_v2_Type_Array_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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(12); + internal_static_google_bigtable_v2_Type_Map_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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(13); + internal_static_google_bigtable_v2_Type_Aggregate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Sum_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Max_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_Min_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.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_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_descriptor, + new java.lang.String[] {}); + 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 5969534c26..c18dde5edd 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -36,6 +36,7 @@ public final class Value extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.Value) ValueOrBuilder { private static final long serialVersionUID = 0L; + // Use Value.newBuilder() to construct. private Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -62,6 +63,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.bigtable.v2.Value.class, com.google.bigtable.v2.Value.Builder.class); } + private int bitField0_; private int kindCase_ = 0; @SuppressWarnings("serial") @@ -73,13 +75,21 @@ public enum KindCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { RAW_VALUE(8), RAW_TIMESTAMP_MICROS(9), + BYTES_VALUE(2), + STRING_VALUE(3), INT_VALUE(6), + BOOL_VALUE(10), + FLOAT_VALUE(11), + TIMESTAMP_VALUE(12), + DATE_VALUE(13), + ARRAY_VALUE(4), 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. @@ -96,8 +106,22 @@ public static KindCase forNumber(int value) { return RAW_VALUE; case 9: return RAW_TIMESTAMP_MICROS; + case 2: + return BYTES_VALUE; + case 3: + return STRING_VALUE; case 6: return INT_VALUE; + case 10: + return BOOL_VALUE; + case 11: + return FLOAT_VALUE; + case 12: + return TIMESTAMP_VALUE; + case 13: + return DATE_VALUE; + case 4: + return ARRAY_VALUE; case 0: return KIND_NOT_SET; default: @@ -114,7 +138,93 @@ public KindCase getKindCase() { return KindCase.forNumber(kindCase_); } + public static final int TYPE_FIELD_NUMBER = 7; + private com.google.bigtable.v2.Type type_; + + /** + * + * + *
    +   * The verified `Type` of this `Value`, if it cannot be inferred.
    +   *
    +   * Read results will never specify the encoding for `type` since the value
    +   * will already have been decoded by the server. Furthermore, the `type` will
    +   * be omitted entirely if it can be inferred from a previous response. The
    +   * exact semantics for inferring `type` will vary, and are therefore
    +   * documented separately for each read method.
    +   *
    +   * When using composite types (Struct, Array, Map) only the outermost `Value`
    +   * will specify the `type`. This top-level `type` will define the types for
    +   * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +   * If a nested `Value` provides a `type` on write, the request will be
    +   * rejected with INVALID_ARGUMENT.
    +   * 
    + * + * .google.bigtable.v2.Type type = 7; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * The verified `Type` of this `Value`, if it cannot be inferred.
    +   *
    +   * Read results will never specify the encoding for `type` since the value
    +   * will already have been decoded by the server. Furthermore, the `type` will
    +   * be omitted entirely if it can be inferred from a previous response. The
    +   * exact semantics for inferring `type` will vary, and are therefore
    +   * documented separately for each read method.
    +   *
    +   * When using composite types (Struct, Array, Map) only the outermost `Value`
    +   * will specify the `type`. This top-level `type` will define the types for
    +   * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +   * If a nested `Value` provides a `type` on write, the request will be
    +   * rejected with INVALID_ARGUMENT.
    +   * 
    + * + * .google.bigtable.v2.Type type = 7; + * + * @return The type. + */ + @java.lang.Override + public com.google.bigtable.v2.Type getType() { + return type_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : type_; + } + + /** + * + * + *
    +   * The verified `Type` of this `Value`, if it cannot be inferred.
    +   *
    +   * Read results will never specify the encoding for `type` since the value
    +   * will already have been decoded by the server. Furthermore, the `type` will
    +   * be omitted entirely if it can be inferred from a previous response. The
    +   * exact semantics for inferring `type` will vary, and are therefore
    +   * documented separately for each read method.
    +   *
    +   * When using composite types (Struct, Array, Map) only the outermost `Value`
    +   * will specify the `type`. This top-level `type` will define the types for
    +   * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +   * If a nested `Value` provides a `type` on write, the request will be
    +   * rejected with INVALID_ARGUMENT.
    +   * 
    + * + * .google.bigtable.v2.Type type = 7; + */ + @java.lang.Override + public com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder() { + return type_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : type_; + } + public static final int RAW_VALUE_FIELD_NUMBER = 8; + /** * * @@ -131,6 +241,7 @@ public KindCase getKindCase() { public boolean hasRawValue() { return kindCase_ == 8; } + /** * * @@ -152,6 +263,7 @@ public com.google.protobuf.ByteString getRawValue() { } public static final int RAW_TIMESTAMP_MICROS_FIELD_NUMBER = 9; + /** * * @@ -168,6 +280,7 @@ public com.google.protobuf.ByteString getRawValue() { public boolean hasRawTimestampMicros() { return kindCase_ == 9; } + /** * * @@ -188,13 +301,123 @@ public long getRawTimestampMicros() { return 0L; } + public static final int BYTES_VALUE_FIELD_NUMBER = 2; + + /** + * + * + *
    +   * Represents a typed value transported as a byte sequence.
    +   * 
    + * + * bytes bytes_value = 2; + * + * @return Whether the bytesValue field is set. + */ + @java.lang.Override + public boolean hasBytesValue() { + return kindCase_ == 2; + } + + /** + * + * + *
    +   * Represents a typed value transported as a byte sequence.
    +   * 
    + * + * bytes bytes_value = 2; + * + * @return The bytesValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBytesValue() { + if (kindCase_ == 2) { + return (com.google.protobuf.ByteString) kind_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + public static final int STRING_VALUE_FIELD_NUMBER = 3; + + /** + * + * + *
    +   * Represents a typed value transported as a string.
    +   * 
    + * + * string string_value = 3; + * + * @return Whether the stringValue field is set. + */ + public boolean hasStringValue() { + return kindCase_ == 3; + } + + /** + * + * + *
    +   * Represents a typed value transported as a string.
    +   * 
    + * + * string string_value = 3; + * + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (kindCase_ == 3) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 3) { + kind_ = s; + } + return s; + } + } + + /** + * + * + *
    +   * Represents a typed value transported as a string.
    +   * 
    + * + * string string_value = 3; + * + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 3) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 3) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int INT_VALUE_FIELD_NUMBER = 6; + /** * * *
        * Represents a typed value transported as an integer.
    -   * Default type for writes: `Int64`
        * 
    * * int64 int_value = 6; @@ -205,12 +428,12 @@ public long getRawTimestampMicros() { public boolean hasIntValue() { return kindCase_ == 6; } + /** * * *
        * Represents a typed value transported as an integer.
    -   * Default type for writes: `Int64`
        * 
    * * int64 int_value = 6; @@ -225,120 +448,491 @@ public long getIntValue() { return 0L; } - private byte memoizedIsInitialized = -1; + public static final int BOOL_VALUE_FIELD_NUMBER = 10; + /** + * + * + *
    +   * Represents a typed value transported as a boolean.
    +   * 
    + * + * bool bool_value = 10; + * + * @return Whether the boolValue field is set. + */ @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 boolean hasBoolValue() { + return kindCase_ == 10; } + /** + * + * + *
    +   * Represents a typed value transported as a boolean.
    +   * 
    + * + * bool bool_value = 10; + * + * @return The boolValue. + */ @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (kindCase_ == 6) { - output.writeInt64(6, (long) ((java.lang.Long) kind_)); - } - if (kindCase_ == 8) { - output.writeBytes(8, (com.google.protobuf.ByteString) kind_); + public boolean getBoolValue() { + if (kindCase_ == 10) { + return (java.lang.Boolean) kind_; } - if (kindCase_ == 9) { - output.writeInt64(9, (long) ((java.lang.Long) kind_)); - } - getUnknownFields().writeTo(output); + return false; } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static final int FLOAT_VALUE_FIELD_NUMBER = 11; - size = 0; - if (kindCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeInt64Size( - 6, (long) ((java.lang.Long) kind_)); - } - if (kindCase_ == 8) { - size += - com.google.protobuf.CodedOutputStream.computeBytesSize( - 8, (com.google.protobuf.ByteString) kind_); - } - if (kindCase_ == 9) { - size += - com.google.protobuf.CodedOutputStream.computeInt64Size( - 9, (long) ((java.lang.Long) kind_)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + /** + * + * + *
    +   * Represents a typed value transported as a floating point number.
    +   * Does not support NaN or infinities.
    +   * 
    + * + * double float_value = 11; + * + * @return Whether the floatValue field is set. + */ + @java.lang.Override + 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; + * + * @return The floatValue. + */ @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.bigtable.v2.Value)) { - return super.equals(obj); - } - com.google.bigtable.v2.Value other = (com.google.bigtable.v2.Value) obj; - - if (!getKindCase().equals(other.getKindCase())) return false; - switch (kindCase_) { - case 8: - if (!getRawValue().equals(other.getRawValue())) return false; - break; - case 9: - if (getRawTimestampMicros() != other.getRawTimestampMicros()) return false; - break; - case 6: - if (getIntValue() != other.getIntValue()) return false; - break; - case 0: - default: + public double getFloatValue() { + if (kindCase_ == 11) { + return (java.lang.Double) kind_; } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + return 0D; } + public static final int TIMESTAMP_VALUE_FIELD_NUMBER = 12; + + /** + * + * + *
    +   * Represents a typed value transported as a timestamp.
    +   * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + * + * @return Whether the timestampValue field is set. + */ @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (kindCase_) { - case 8: - hash = (37 * hash) + RAW_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getRawValue().hashCode(); - break; - case 9: - hash = (37 * hash) + RAW_TIMESTAMP_MICROS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRawTimestampMicros()); - break; - case 6: - hash = (37 * hash) + INT_VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIntValue()); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + public boolean hasTimestampValue() { + return kindCase_ == 12; } - public static com.google.bigtable.v2.Value parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + /** + * + * + *
    +   * Represents a typed value transported as a timestamp.
    +   * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + * + * @return The timestampValue. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestampValue() { + if (kindCase_ == 12) { + return (com.google.protobuf.Timestamp) kind_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } - public static com.google.bigtable.v2.Value parseFrom( + /** + * + * + *
    +   * Represents a typed value transported as a timestamp.
    +   * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { + if (kindCase_ == 12) { + return (com.google.protobuf.Timestamp) kind_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + public static final int DATE_VALUE_FIELD_NUMBER = 13; + + /** + * + * + *
    +   * Represents a typed value transported as a date.
    +   * 
    + * + * .google.type.Date date_value = 13; + * + * @return Whether the dateValue field is set. + */ + @java.lang.Override + public boolean hasDateValue() { + return kindCase_ == 13; + } + + /** + * + * + *
    +   * Represents a typed value transported as a date.
    +   * 
    + * + * .google.type.Date date_value = 13; + * + * @return The dateValue. + */ + @java.lang.Override + public com.google.type.Date getDateValue() { + if (kindCase_ == 13) { + return (com.google.type.Date) kind_; + } + return com.google.type.Date.getDefaultInstance(); + } + + /** + * + * + *
    +   * Represents a typed value transported as a date.
    +   * 
    + * + * .google.type.Date date_value = 13; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateValueOrBuilder() { + if (kindCase_ == 13) { + return (com.google.type.Date) kind_; + } + return com.google.type.Date.getDefaultInstance(); + } + + public static final int ARRAY_VALUE_FIELD_NUMBER = 4; + + /** + * + * + *
    +   * Represents a typed value transported as a sequence of values.
    +   * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +   * `Value` must provide an explicit `type` on write. This `type` will
    +   * apply recursively to the nested `Struct` fields, `Array` elements,
    +   * or `Map` key/value pairs, which *must not* supply their own `type`.
    +   * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + * + * @return Whether the arrayValue field is set. + */ + @java.lang.Override + public boolean hasArrayValue() { + return kindCase_ == 4; + } + + /** + * + * + *
    +   * Represents a typed value transported as a sequence of values.
    +   * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +   * `Value` must provide an explicit `type` on write. This `type` will
    +   * apply recursively to the nested `Struct` fields, `Array` elements,
    +   * or `Map` key/value pairs, which *must not* supply their own `type`.
    +   * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + * + * @return The arrayValue. + */ + @java.lang.Override + public com.google.bigtable.v2.ArrayValue getArrayValue() { + if (kindCase_ == 4) { + return (com.google.bigtable.v2.ArrayValue) kind_; + } + return com.google.bigtable.v2.ArrayValue.getDefaultInstance(); + } + + /** + * + * + *
    +   * Represents a typed value transported as a sequence of values.
    +   * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +   * `Value` must provide an explicit `type` on write. This `type` will
    +   * apply recursively to the nested `Struct` fields, `Array` elements,
    +   * or `Map` key/value pairs, which *must not* supply their own `type`.
    +   * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + */ + @java.lang.Override + public com.google.bigtable.v2.ArrayValueOrBuilder getArrayValueOrBuilder() { + if (kindCase_ == 4) { + return (com.google.bigtable.v2.ArrayValue) kind_; + } + return com.google.bigtable.v2.ArrayValue.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 (kindCase_ == 2) { + output.writeBytes(2, (com.google.protobuf.ByteString) kind_); + } + if (kindCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, kind_); + } + if (kindCase_ == 4) { + output.writeMessage(4, (com.google.bigtable.v2.ArrayValue) kind_); + } + if (kindCase_ == 6) { + output.writeInt64(6, (long) ((java.lang.Long) kind_)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getType()); + } + if (kindCase_ == 8) { + output.writeBytes(8, (com.google.protobuf.ByteString) kind_); + } + if (kindCase_ == 9) { + output.writeInt64(9, (long) ((java.lang.Long) kind_)); + } + if (kindCase_ == 10) { + output.writeBool(10, (boolean) ((java.lang.Boolean) kind_)); + } + if (kindCase_ == 11) { + output.writeDouble(11, (double) ((java.lang.Double) kind_)); + } + if (kindCase_ == 12) { + output.writeMessage(12, (com.google.protobuf.Timestamp) kind_); + } + if (kindCase_ == 13) { + output.writeMessage(13, (com.google.type.Date) kind_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 2, (com.google.protobuf.ByteString) kind_); + } + if (kindCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, kind_); + } + if (kindCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.bigtable.v2.ArrayValue) kind_); + } + if (kindCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 6, (long) ((java.lang.Long) kind_)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getType()); + } + if (kindCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 8, (com.google.protobuf.ByteString) kind_); + } + if (kindCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 9, (long) ((java.lang.Long) kind_)); + } + if (kindCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 10, (boolean) ((java.lang.Boolean) kind_)); + } + if (kindCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 11, (double) ((java.lang.Double) kind_)); + } + if (kindCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.protobuf.Timestamp) kind_); + } + if (kindCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.type.Date) kind_); + } + 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.Value)) { + return super.equals(obj); + } + com.google.bigtable.v2.Value other = (com.google.bigtable.v2.Value) obj; + + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (!getType().equals(other.getType())) return false; + } + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 8: + if (!getRawValue().equals(other.getRawValue())) return false; + break; + case 9: + if (getRawTimestampMicros() != other.getRawTimestampMicros()) return false; + break; + case 2: + if (!getBytesValue().equals(other.getBytesValue())) return false; + break; + case 3: + if (!getStringValue().equals(other.getStringValue())) return false; + break; + case 6: + if (getIntValue() != other.getIntValue()) return false; + break; + case 10: + if (getBoolValue() != other.getBoolValue()) return false; + break; + case 11: + if (java.lang.Double.doubleToLongBits(getFloatValue()) + != java.lang.Double.doubleToLongBits(other.getFloatValue())) return false; + break; + case 12: + if (!getTimestampValue().equals(other.getTimestampValue())) return false; + break; + case 13: + if (!getDateValue().equals(other.getDateValue())) return false; + break; + case 4: + if (!getArrayValue().equals(other.getArrayValue())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + } + switch (kindCase_) { + case 8: + hash = (37 * hash) + RAW_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getRawValue().hashCode(); + break; + case 9: + hash = (37 * hash) + RAW_TIMESTAMP_MICROS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRawTimestampMicros()); + break; + case 2: + hash = (37 * hash) + BYTES_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getBytesValue().hashCode(); + break; + case 3: + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + break; + case 6: + hash = (37 * hash) + INT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIntValue()); + break; + case 10: + hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoolValue()); + break; + case 11: + hash = (37 * hash) + FLOAT_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getFloatValue())); + break; + case 12: + hash = (37 * hash) + TIMESTAMP_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getTimestampValue().hashCode(); + break; + case 13: + hash = (37 * hash) + DATE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDateValue().hashCode(); + break; + case 4: + hash = (37 * hash) + ARRAY_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getArrayValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Value parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Value parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); @@ -427,6 +1021,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -457,16 +1052,39 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.Value.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTypeFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + if (timestampValueBuilder_ != null) { + timestampValueBuilder_.clear(); + } + if (dateValueBuilder_ != null) { + dateValueBuilder_.clear(); + } + if (arrayValueBuilder_ != null) { + arrayValueBuilder_.clear(); + } kindCase_ = 0; kind_ = null; return this; @@ -504,11 +1122,26 @@ public com.google.bigtable.v2.Value buildPartial() { private void buildPartial0(com.google.bigtable.v2.Value result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = typeBuilder_ == null ? type_ : typeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(com.google.bigtable.v2.Value result) { result.kindCase_ = kindCase_; result.kind_ = this.kind_; + if (kindCase_ == 12 && timestampValueBuilder_ != null) { + result.kind_ = timestampValueBuilder_.build(); + } + if (kindCase_ == 13 && dateValueBuilder_ != null) { + result.kind_ = dateValueBuilder_.build(); + } + if (kindCase_ == 4 && arrayValueBuilder_ != null) { + result.kind_ = arrayValueBuilder_.build(); + } } @java.lang.Override @@ -556,6 +1189,9 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.v2.Value other) { if (other == com.google.bigtable.v2.Value.getDefaultInstance()) return this; + if (other.hasType()) { + mergeType(other.getType()); + } switch (other.getKindCase()) { case RAW_VALUE: { @@ -567,16 +1203,53 @@ public Builder mergeFrom(com.google.bigtable.v2.Value other) { setRawTimestampMicros(other.getRawTimestampMicros()); break; } + case BYTES_VALUE: + { + setBytesValue(other.getBytesValue()); + break; + } + case STRING_VALUE: + { + kindCase_ = 3; + kind_ = other.kind_; + onChanged(); + break; + } case INT_VALUE: { setIntValue(other.getIntValue()); break; } - case KIND_NOT_SET: + case BOOL_VALUE: { + setBoolValue(other.getBoolValue()); break; } - } + case FLOAT_VALUE: + { + setFloatValue(other.getFloatValue()); + break; + } + case TIMESTAMP_VALUE: + { + mergeTimestampValue(other.getTimestampValue()); + break; + } + case DATE_VALUE: + { + mergeDateValue(other.getDateValue()); + break; + } + case ARRAY_VALUE: + { + mergeArrayValue(other.getArrayValue()); + break; + } + case KIND_NOT_SET: + { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -603,12 +1276,37 @@ public Builder mergeFrom( case 0: done = true; break; + case 18: + { + kind_ = input.readBytes(); + kindCase_ = 2; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 3; + kind_ = s; + break; + } // case 26 + case 34: + { + input.readMessage(getArrayValueFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 4; + break; + } // case 34 case 48: { kind_ = input.readInt64(); kindCase_ = 6; break; } // case 48 + case 58: + { + input.readMessage(getTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 58 case 66: { kind_ = input.readBytes(); @@ -621,6 +1319,30 @@ public Builder mergeFrom( kindCase_ = 9; break; } // case 72 + case 80: + { + kind_ = input.readBool(); + kindCase_ = 10; + break; + } // case 80 + case 89: + { + kind_ = input.readDouble(); + kindCase_ = 11; + break; + } // case 89 + case 98: + { + input.readMessage(getTimestampValueFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage(getDateValueFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 13; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -654,6 +1376,303 @@ public Builder clearKind() { private int bitField0_; + 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 verified `Type` of this `Value`, if it cannot be inferred.
    +     *
    +     * Read results will never specify the encoding for `type` since the value
    +     * will already have been decoded by the server. Furthermore, the `type` will
    +     * be omitted entirely if it can be inferred from a previous response. The
    +     * exact semantics for inferring `type` will vary, and are therefore
    +     * documented separately for each read method.
    +     *
    +     * When using composite types (Struct, Array, Map) only the outermost `Value`
    +     * will specify the `type`. This top-level `type` will define the types for
    +     * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +     * If a nested `Value` provides a `type` on write, the request will be
    +     * rejected with INVALID_ARGUMENT.
    +     * 
    + * + * .google.bigtable.v2.Type type = 7; + * + * @return Whether the type field is set. + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * The verified `Type` of this `Value`, if it cannot be inferred.
    +     *
    +     * Read results will never specify the encoding for `type` since the value
    +     * will already have been decoded by the server. Furthermore, the `type` will
    +     * be omitted entirely if it can be inferred from a previous response. The
    +     * exact semantics for inferring `type` will vary, and are therefore
    +     * documented separately for each read method.
    +     *
    +     * When using composite types (Struct, Array, Map) only the outermost `Value`
    +     * will specify the `type`. This top-level `type` will define the types for
    +     * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +     * If a nested `Value` provides a `type` on write, the request will be
    +     * rejected with INVALID_ARGUMENT.
    +     * 
    + * + * .google.bigtable.v2.Type type = 7; + * + * @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 verified `Type` of this `Value`, if it cannot be inferred.
    +     *
    +     * Read results will never specify the encoding for `type` since the value
    +     * will already have been decoded by the server. Furthermore, the `type` will
    +     * be omitted entirely if it can be inferred from a previous response. The
    +     * exact semantics for inferring `type` will vary, and are therefore
    +     * documented separately for each read method.
    +     *
    +     * When using composite types (Struct, Array, Map) only the outermost `Value`
    +     * will specify the `type`. This top-level `type` will define the types for
    +     * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +     * If a nested `Value` provides a `type` on write, the request will be
    +     * rejected with INVALID_ARGUMENT.
    +     * 
    + * + * .google.bigtable.v2.Type type = 7; + */ + 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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The verified `Type` of this `Value`, if it cannot be inferred.
    +     *
    +     * Read results will never specify the encoding for `type` since the value
    +     * will already have been decoded by the server. Furthermore, the `type` will
    +     * be omitted entirely if it can be inferred from a previous response. The
    +     * exact semantics for inferring `type` will vary, and are therefore
    +     * documented separately for each read method.
    +     *
    +     * When using composite types (Struct, Array, Map) only the outermost `Value`
    +     * will specify the `type`. This top-level `type` will define the types for
    +     * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +     * If a nested `Value` provides a `type` on write, the request will be
    +     * rejected with INVALID_ARGUMENT.
    +     * 
    + * + * .google.bigtable.v2.Type type = 7; + */ + public Builder setType(com.google.bigtable.v2.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + type_ = builderForValue.build(); + } else { + typeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The verified `Type` of this `Value`, if it cannot be inferred.
    +     *
    +     * Read results will never specify the encoding for `type` since the value
    +     * will already have been decoded by the server. Furthermore, the `type` will
    +     * be omitted entirely if it can be inferred from a previous response. The
    +     * exact semantics for inferring `type` will vary, and are therefore
    +     * documented separately for each read method.
    +     *
    +     * When using composite types (Struct, Array, Map) only the outermost `Value`
    +     * will specify the `type`. This top-level `type` will define the types for
    +     * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +     * If a nested `Value` provides a `type` on write, the request will be
    +     * rejected with INVALID_ARGUMENT.
    +     * 
    + * + * .google.bigtable.v2.Type type = 7; + */ + public Builder mergeType(com.google.bigtable.v2.Type value) { + if (typeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && type_ != null + && type_ != com.google.bigtable.v2.Type.getDefaultInstance()) { + getTypeBuilder().mergeFrom(value); + } else { + type_ = value; + } + } else { + typeBuilder_.mergeFrom(value); + } + if (type_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * The verified `Type` of this `Value`, if it cannot be inferred.
    +     *
    +     * Read results will never specify the encoding for `type` since the value
    +     * will already have been decoded by the server. Furthermore, the `type` will
    +     * be omitted entirely if it can be inferred from a previous response. The
    +     * exact semantics for inferring `type` will vary, and are therefore
    +     * documented separately for each read method.
    +     *
    +     * When using composite types (Struct, Array, Map) only the outermost `Value`
    +     * will specify the `type`. This top-level `type` will define the types for
    +     * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +     * If a nested `Value` provides a `type` on write, the request will be
    +     * rejected with INVALID_ARGUMENT.
    +     * 
    + * + * .google.bigtable.v2.Type type = 7; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * The verified `Type` of this `Value`, if it cannot be inferred.
    +     *
    +     * Read results will never specify the encoding for `type` since the value
    +     * will already have been decoded by the server. Furthermore, the `type` will
    +     * be omitted entirely if it can be inferred from a previous response. The
    +     * exact semantics for inferring `type` will vary, and are therefore
    +     * documented separately for each read method.
    +     *
    +     * When using composite types (Struct, Array, Map) only the outermost `Value`
    +     * will specify the `type`. This top-level `type` will define the types for
    +     * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +     * If a nested `Value` provides a `type` on write, the request will be
    +     * rejected with INVALID_ARGUMENT.
    +     * 
    + * + * .google.bigtable.v2.Type type = 7; + */ + public com.google.bigtable.v2.Type.Builder getTypeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * The verified `Type` of this `Value`, if it cannot be inferred.
    +     *
    +     * Read results will never specify the encoding for `type` since the value
    +     * will already have been decoded by the server. Furthermore, the `type` will
    +     * be omitted entirely if it can be inferred from a previous response. The
    +     * exact semantics for inferring `type` will vary, and are therefore
    +     * documented separately for each read method.
    +     *
    +     * When using composite types (Struct, Array, Map) only the outermost `Value`
    +     * will specify the `type`. This top-level `type` will define the types for
    +     * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +     * If a nested `Value` provides a `type` on write, the request will be
    +     * rejected with INVALID_ARGUMENT.
    +     * 
    + * + * .google.bigtable.v2.Type type = 7; + */ + 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 verified `Type` of this `Value`, if it cannot be inferred.
    +     *
    +     * Read results will never specify the encoding for `type` since the value
    +     * will already have been decoded by the server. Furthermore, the `type` will
    +     * be omitted entirely if it can be inferred from a previous response. The
    +     * exact semantics for inferring `type` will vary, and are therefore
    +     * documented separately for each read method.
    +     *
    +     * When using composite types (Struct, Array, Map) only the outermost `Value`
    +     * will specify the `type`. This top-level `type` will define the types for
    +     * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +     * If a nested `Value` provides a `type` on write, the request will be
    +     * rejected with INVALID_ARGUMENT.
    +     * 
    + * + * .google.bigtable.v2.Type type = 7; + */ + 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_; + } + /** * * @@ -669,6 +1688,7 @@ public Builder clearKind() { public boolean hasRawValue() { return kindCase_ == 8; } + /** * * @@ -687,6 +1707,7 @@ public com.google.protobuf.ByteString getRawValue() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -709,6 +1730,7 @@ public Builder setRawValue(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -745,6 +1767,7 @@ public Builder clearRawValue() { public boolean hasRawTimestampMicros() { return kindCase_ == 9; } + /** * * @@ -763,6 +1786,7 @@ public long getRawTimestampMicros() { } return 0L; } + /** * * @@ -783,6 +1807,7 @@ public Builder setRawTimestampMicros(long value) { onChanged(); return this; } + /** * * @@ -808,69 +1833,70 @@ public Builder clearRawTimestampMicros() { * * *
    -     * Represents a typed value transported as an integer.
    -     * Default type for writes: `Int64`
    +     * Represents a typed value transported as a byte sequence.
          * 
    * - * int64 int_value = 6; + * bytes bytes_value = 2; * - * @return Whether the intValue field is set. + * @return Whether the bytesValue field is set. */ - public boolean hasIntValue() { - return kindCase_ == 6; + public boolean hasBytesValue() { + return kindCase_ == 2; } + /** * * *
    -     * Represents a typed value transported as an integer.
    -     * Default type for writes: `Int64`
    +     * Represents a typed value transported as a byte sequence.
          * 
    * - * int64 int_value = 6; + * bytes bytes_value = 2; * - * @return The intValue. + * @return The bytesValue. */ - public long getIntValue() { - if (kindCase_ == 6) { - return (java.lang.Long) kind_; + public com.google.protobuf.ByteString getBytesValue() { + if (kindCase_ == 2) { + return (com.google.protobuf.ByteString) kind_; } - return 0L; + return com.google.protobuf.ByteString.EMPTY; } + /** * * *
    -     * Represents a typed value transported as an integer.
    -     * Default type for writes: `Int64`
    +     * Represents a typed value transported as a byte sequence.
          * 
    * - * int64 int_value = 6; + * bytes bytes_value = 2; * - * @param value The intValue to set. + * @param value The bytesValue to set. * @return This builder for chaining. */ - public Builder setIntValue(long value) { - - kindCase_ = 6; + public Builder setBytesValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 2; kind_ = value; onChanged(); return this; } + /** * * *
    -     * Represents a typed value transported as an integer.
    -     * Default type for writes: `Int64`
    +     * Represents a typed value transported as a byte sequence.
          * 
    * - * int64 int_value = 6; + * bytes bytes_value = 2; * * @return This builder for chaining. */ - public Builder clearIntValue() { - if (kindCase_ == 6) { + public Builder clearBytesValue() { + if (kindCase_ == 2) { kindCase_ = 0; kind_ = null; onChanged(); @@ -878,6 +1904,1038 @@ public Builder clearIntValue() { return this; } + /** + * + * + *
    +     * Represents a typed value transported as a string.
    +     * 
    + * + * string string_value = 3; + * + * @return Whether the stringValue field is set. + */ + @java.lang.Override + public boolean hasStringValue() { + return kindCase_ == 3; + } + + /** + * + * + *
    +     * Represents a typed value transported as a string.
    +     * 
    + * + * string string_value = 3; + * + * @return The stringValue. + */ + @java.lang.Override + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (kindCase_ == 3) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 3) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Represents a typed value transported as a string.
    +     * 
    + * + * string string_value = 3; + * + * @return The bytes for stringValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 3) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 3) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Represents a typed value transported as a string.
    +     * 
    + * + * string string_value = 3; + * + * @param value The stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 3; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a string.
    +     * 
    + * + * string string_value = 3; + * + * @return This builder for chaining. + */ + public Builder clearStringValue() { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a string.
    +     * 
    + * + * string string_value = 3; + * + * @param value The bytes for stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 3; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as an integer.
    +     * 
    + * + * int64 int_value = 6; + * + * @return Whether the intValue field is set. + */ + public boolean hasIntValue() { + return kindCase_ == 6; + } + + /** + * + * + *
    +     * Represents a typed value transported as an integer.
    +     * 
    + * + * int64 int_value = 6; + * + * @return The intValue. + */ + public long getIntValue() { + if (kindCase_ == 6) { + return (java.lang.Long) kind_; + } + return 0L; + } + + /** + * + * + *
    +     * Represents a typed value transported as an integer.
    +     * 
    + * + * int64 int_value = 6; + * + * @param value The intValue to set. + * @return This builder for chaining. + */ + public Builder setIntValue(long value) { + + kindCase_ = 6; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as an integer.
    +     * 
    + * + * int64 int_value = 6; + * + * @return This builder for chaining. + */ + public Builder clearIntValue() { + if (kindCase_ == 6) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a boolean.
    +     * 
    + * + * bool bool_value = 10; + * + * @return Whether the boolValue field is set. + */ + public boolean hasBoolValue() { + return kindCase_ == 10; + } + + /** + * + * + *
    +     * Represents a typed value transported as a boolean.
    +     * 
    + * + * bool bool_value = 10; + * + * @return The boolValue. + */ + public boolean getBoolValue() { + if (kindCase_ == 10) { + return (java.lang.Boolean) kind_; + } + return false; + } + + /** + * + * + *
    +     * Represents a typed value transported as a boolean.
    +     * 
    + * + * bool bool_value = 10; + * + * @param value The boolValue to set. + * @return This builder for chaining. + */ + public Builder setBoolValue(boolean value) { + + kindCase_ = 10; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a boolean.
    +     * 
    + * + * bool bool_value = 10; + * + * @return This builder for chaining. + */ + public Builder clearBoolValue() { + if (kindCase_ == 10) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a floating point number.
    +     * Does not support NaN or infinities.
    +     * 
    + * + * double float_value = 11; + * + * @return Whether the floatValue field is set. + */ + 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; + * + * @return The floatValue. + */ + public double getFloatValue() { + if (kindCase_ == 11) { + return (java.lang.Double) kind_; + } + return 0D; + } + + /** + * + * + *
    +     * Represents a typed value transported as a floating point number.
    +     * Does not support NaN or infinities.
    +     * 
    + * + * double float_value = 11; + * + * @param value The floatValue to set. + * @return This builder for chaining. + */ + public Builder setFloatValue(double value) { + + kindCase_ = 11; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a floating point number.
    +     * Does not support NaN or infinities.
    +     * 
    + * + * double float_value = 11; + * + * @return This builder for chaining. + */ + public Builder clearFloatValue() { + if (kindCase_ == 11) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + timestampValueBuilder_; + + /** + * + * + *
    +     * Represents a typed value transported as a timestamp.
    +     * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + * + * @return Whether the timestampValue field is set. + */ + @java.lang.Override + public boolean hasTimestampValue() { + return kindCase_ == 12; + } + + /** + * + * + *
    +     * Represents a typed value transported as a timestamp.
    +     * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + * + * @return The timestampValue. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestampValue() { + if (timestampValueBuilder_ == null) { + if (kindCase_ == 12) { + return (com.google.protobuf.Timestamp) kind_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (kindCase_ == 12) { + return timestampValueBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Represents a typed value transported as a timestamp.
    +     * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + */ + public Builder setTimestampValue(com.google.protobuf.Timestamp value) { + if (timestampValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + timestampValueBuilder_.setMessage(value); + } + kindCase_ = 12; + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a timestamp.
    +     * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + */ + public Builder setTimestampValue(com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampValueBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + timestampValueBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 12; + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a timestamp.
    +     * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + */ + public Builder mergeTimestampValue(com.google.protobuf.Timestamp value) { + if (timestampValueBuilder_ == null) { + if (kindCase_ == 12 && kind_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + kind_ = + com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 12) { + timestampValueBuilder_.mergeFrom(value); + } else { + timestampValueBuilder_.setMessage(value); + } + } + kindCase_ = 12; + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a timestamp.
    +     * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + */ + public Builder clearTimestampValue() { + if (timestampValueBuilder_ == null) { + if (kindCase_ == 12) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 12) { + kindCase_ = 0; + kind_ = null; + } + timestampValueBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a timestamp.
    +     * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + */ + public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder() { + return getTimestampValueFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Represents a typed value transported as a timestamp.
    +     * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { + if ((kindCase_ == 12) && (timestampValueBuilder_ != null)) { + return timestampValueBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 12) { + return (com.google.protobuf.Timestamp) kind_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Represents a typed value transported as a timestamp.
    +     * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getTimestampValueFieldBuilder() { + if (timestampValueBuilder_ == null) { + if (!(kindCase_ == 12)) { + kind_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + timestampValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) kind_, getParentForChildren(), isClean()); + kind_ = null; + } + kindCase_ = 12; + onChanged(); + return timestampValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + dateValueBuilder_; + + /** + * + * + *
    +     * Represents a typed value transported as a date.
    +     * 
    + * + * .google.type.Date date_value = 13; + * + * @return Whether the dateValue field is set. + */ + @java.lang.Override + public boolean hasDateValue() { + return kindCase_ == 13; + } + + /** + * + * + *
    +     * Represents a typed value transported as a date.
    +     * 
    + * + * .google.type.Date date_value = 13; + * + * @return The dateValue. + */ + @java.lang.Override + public com.google.type.Date getDateValue() { + if (dateValueBuilder_ == null) { + if (kindCase_ == 13) { + return (com.google.type.Date) kind_; + } + return com.google.type.Date.getDefaultInstance(); + } else { + if (kindCase_ == 13) { + return dateValueBuilder_.getMessage(); + } + return com.google.type.Date.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Represents a typed value transported as a date.
    +     * 
    + * + * .google.type.Date date_value = 13; + */ + public Builder setDateValue(com.google.type.Date value) { + if (dateValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + dateValueBuilder_.setMessage(value); + } + kindCase_ = 13; + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a date.
    +     * 
    + * + * .google.type.Date date_value = 13; + */ + public Builder setDateValue(com.google.type.Date.Builder builderForValue) { + if (dateValueBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + dateValueBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 13; + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a date.
    +     * 
    + * + * .google.type.Date date_value = 13; + */ + public Builder mergeDateValue(com.google.type.Date value) { + if (dateValueBuilder_ == null) { + if (kindCase_ == 13 && kind_ != com.google.type.Date.getDefaultInstance()) { + kind_ = + com.google.type.Date.newBuilder((com.google.type.Date) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 13) { + dateValueBuilder_.mergeFrom(value); + } else { + dateValueBuilder_.setMessage(value); + } + } + kindCase_ = 13; + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a date.
    +     * 
    + * + * .google.type.Date date_value = 13; + */ + public Builder clearDateValue() { + if (dateValueBuilder_ == null) { + if (kindCase_ == 13) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 13) { + kindCase_ = 0; + kind_ = null; + } + dateValueBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a date.
    +     * 
    + * + * .google.type.Date date_value = 13; + */ + public com.google.type.Date.Builder getDateValueBuilder() { + return getDateValueFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Represents a typed value transported as a date.
    +     * 
    + * + * .google.type.Date date_value = 13; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateValueOrBuilder() { + if ((kindCase_ == 13) && (dateValueBuilder_ != null)) { + return dateValueBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 13) { + return (com.google.type.Date) kind_; + } + return com.google.type.Date.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Represents a typed value transported as a date.
    +     * 
    + * + * .google.type.Date date_value = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getDateValueFieldBuilder() { + if (dateValueBuilder_ == null) { + if (!(kindCase_ == 13)) { + kind_ = com.google.type.Date.getDefaultInstance(); + } + dateValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + (com.google.type.Date) kind_, getParentForChildren(), isClean()); + kind_ = null; + } + kindCase_ = 13; + onChanged(); + return dateValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ArrayValue, + com.google.bigtable.v2.ArrayValue.Builder, + com.google.bigtable.v2.ArrayValueOrBuilder> + arrayValueBuilder_; + + /** + * + * + *
    +     * Represents a typed value transported as a sequence of values.
    +     * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +     * `Value` must provide an explicit `type` on write. This `type` will
    +     * apply recursively to the nested `Struct` fields, `Array` elements,
    +     * or `Map` key/value pairs, which *must not* supply their own `type`.
    +     * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + * + * @return Whether the arrayValue field is set. + */ + @java.lang.Override + public boolean hasArrayValue() { + return kindCase_ == 4; + } + + /** + * + * + *
    +     * Represents a typed value transported as a sequence of values.
    +     * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +     * `Value` must provide an explicit `type` on write. This `type` will
    +     * apply recursively to the nested `Struct` fields, `Array` elements,
    +     * or `Map` key/value pairs, which *must not* supply their own `type`.
    +     * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + * + * @return The arrayValue. + */ + @java.lang.Override + public com.google.bigtable.v2.ArrayValue getArrayValue() { + if (arrayValueBuilder_ == null) { + if (kindCase_ == 4) { + return (com.google.bigtable.v2.ArrayValue) kind_; + } + return com.google.bigtable.v2.ArrayValue.getDefaultInstance(); + } else { + if (kindCase_ == 4) { + return arrayValueBuilder_.getMessage(); + } + return com.google.bigtable.v2.ArrayValue.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Represents a typed value transported as a sequence of values.
    +     * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +     * `Value` must provide an explicit `type` on write. This `type` will
    +     * apply recursively to the nested `Struct` fields, `Array` elements,
    +     * or `Map` key/value pairs, which *must not* supply their own `type`.
    +     * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + */ + public Builder setArrayValue(com.google.bigtable.v2.ArrayValue value) { + if (arrayValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + arrayValueBuilder_.setMessage(value); + } + kindCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a sequence of values.
    +     * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +     * `Value` must provide an explicit `type` on write. This `type` will
    +     * apply recursively to the nested `Struct` fields, `Array` elements,
    +     * or `Map` key/value pairs, which *must not* supply their own `type`.
    +     * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + */ + public Builder setArrayValue(com.google.bigtable.v2.ArrayValue.Builder builderForValue) { + if (arrayValueBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + arrayValueBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a sequence of values.
    +     * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +     * `Value` must provide an explicit `type` on write. This `type` will
    +     * apply recursively to the nested `Struct` fields, `Array` elements,
    +     * or `Map` key/value pairs, which *must not* supply their own `type`.
    +     * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + */ + public Builder mergeArrayValue(com.google.bigtable.v2.ArrayValue value) { + if (arrayValueBuilder_ == null) { + if (kindCase_ == 4 && kind_ != com.google.bigtable.v2.ArrayValue.getDefaultInstance()) { + kind_ = + com.google.bigtable.v2.ArrayValue.newBuilder( + (com.google.bigtable.v2.ArrayValue) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 4) { + arrayValueBuilder_.mergeFrom(value); + } else { + arrayValueBuilder_.setMessage(value); + } + } + kindCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a sequence of values.
    +     * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +     * `Value` must provide an explicit `type` on write. This `type` will
    +     * apply recursively to the nested `Struct` fields, `Array` elements,
    +     * or `Map` key/value pairs, which *must not* supply their own `type`.
    +     * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + */ + public Builder clearArrayValue() { + if (arrayValueBuilder_ == null) { + if (kindCase_ == 4) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 4) { + kindCase_ = 0; + kind_ = null; + } + arrayValueBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Represents a typed value transported as a sequence of values.
    +     * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +     * `Value` must provide an explicit `type` on write. This `type` will
    +     * apply recursively to the nested `Struct` fields, `Array` elements,
    +     * or `Map` key/value pairs, which *must not* supply their own `type`.
    +     * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + */ + public com.google.bigtable.v2.ArrayValue.Builder getArrayValueBuilder() { + return getArrayValueFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Represents a typed value transported as a sequence of values.
    +     * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +     * `Value` must provide an explicit `type` on write. This `type` will
    +     * apply recursively to the nested `Struct` fields, `Array` elements,
    +     * or `Map` key/value pairs, which *must not* supply their own `type`.
    +     * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + */ + @java.lang.Override + public com.google.bigtable.v2.ArrayValueOrBuilder getArrayValueOrBuilder() { + if ((kindCase_ == 4) && (arrayValueBuilder_ != null)) { + return arrayValueBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 4) { + return (com.google.bigtable.v2.ArrayValue) kind_; + } + return com.google.bigtable.v2.ArrayValue.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Represents a typed value transported as a sequence of values.
    +     * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +     * `Value` must provide an explicit `type` on write. This `type` will
    +     * apply recursively to the nested `Struct` fields, `Array` elements,
    +     * or `Map` key/value pairs, which *must not* supply their own `type`.
    +     * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ArrayValue, + com.google.bigtable.v2.ArrayValue.Builder, + com.google.bigtable.v2.ArrayValueOrBuilder> + getArrayValueFieldBuilder() { + if (arrayValueBuilder_ == null) { + if (!(kindCase_ == 4)) { + kind_ = com.google.bigtable.v2.ArrayValue.getDefaultInstance(); + } + arrayValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ArrayValue, + com.google.bigtable.v2.ArrayValue.Builder, + com.google.bigtable.v2.ArrayValueOrBuilder>( + (com.google.bigtable.v2.ArrayValue) kind_, getParentForChildren(), isClean()); + kind_ = null; + } + kindCase_ = 4; + onChanged(); + return arrayValueBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); 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 f26118d9ef..e1678acb75 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface ValueOrBuilder @@ -24,6 +24,79 @@ public interface ValueOrBuilder // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Value) com.google.protobuf.MessageOrBuilder { + /** + * + * + *
    +   * The verified `Type` of this `Value`, if it cannot be inferred.
    +   *
    +   * Read results will never specify the encoding for `type` since the value
    +   * will already have been decoded by the server. Furthermore, the `type` will
    +   * be omitted entirely if it can be inferred from a previous response. The
    +   * exact semantics for inferring `type` will vary, and are therefore
    +   * documented separately for each read method.
    +   *
    +   * When using composite types (Struct, Array, Map) only the outermost `Value`
    +   * will specify the `type`. This top-level `type` will define the types for
    +   * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +   * If a nested `Value` provides a `type` on write, the request will be
    +   * rejected with INVALID_ARGUMENT.
    +   * 
    + * + * .google.bigtable.v2.Type type = 7; + * + * @return Whether the type field is set. + */ + boolean hasType(); + + /** + * + * + *
    +   * The verified `Type` of this `Value`, if it cannot be inferred.
    +   *
    +   * Read results will never specify the encoding for `type` since the value
    +   * will already have been decoded by the server. Furthermore, the `type` will
    +   * be omitted entirely if it can be inferred from a previous response. The
    +   * exact semantics for inferring `type` will vary, and are therefore
    +   * documented separately for each read method.
    +   *
    +   * When using composite types (Struct, Array, Map) only the outermost `Value`
    +   * will specify the `type`. This top-level `type` will define the types for
    +   * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +   * If a nested `Value` provides a `type` on write, the request will be
    +   * rejected with INVALID_ARGUMENT.
    +   * 
    + * + * .google.bigtable.v2.Type type = 7; + * + * @return The type. + */ + com.google.bigtable.v2.Type getType(); + + /** + * + * + *
    +   * The verified `Type` of this `Value`, if it cannot be inferred.
    +   *
    +   * Read results will never specify the encoding for `type` since the value
    +   * will already have been decoded by the server. Furthermore, the `type` will
    +   * be omitted entirely if it can be inferred from a previous response. The
    +   * exact semantics for inferring `type` will vary, and are therefore
    +   * documented separately for each read method.
    +   *
    +   * When using composite types (Struct, Array, Map) only the outermost `Value`
    +   * will specify the `type`. This top-level `type` will define the types for
    +   * any nested `Struct' fields, `Array` elements, or `Map` key/value pairs.
    +   * If a nested `Value` provides a `type` on write, the request will be
    +   * rejected with INVALID_ARGUMENT.
    +   * 
    + * + * .google.bigtable.v2.Type type = 7; + */ + com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder(); + /** * * @@ -37,6 +110,7 @@ public interface ValueOrBuilder * @return Whether the rawValue field is set. */ boolean hasRawValue(); + /** * * @@ -64,6 +138,7 @@ public interface ValueOrBuilder * @return Whether the rawTimestampMicros field is set. */ boolean hasRawTimestampMicros(); + /** * * @@ -78,12 +153,76 @@ public interface ValueOrBuilder */ long getRawTimestampMicros(); + /** + * + * + *
    +   * Represents a typed value transported as a byte sequence.
    +   * 
    + * + * bytes bytes_value = 2; + * + * @return Whether the bytesValue field is set. + */ + boolean hasBytesValue(); + + /** + * + * + *
    +   * Represents a typed value transported as a byte sequence.
    +   * 
    + * + * bytes bytes_value = 2; + * + * @return The bytesValue. + */ + com.google.protobuf.ByteString getBytesValue(); + + /** + * + * + *
    +   * Represents a typed value transported as a string.
    +   * 
    + * + * string string_value = 3; + * + * @return Whether the stringValue field is set. + */ + boolean hasStringValue(); + + /** + * + * + *
    +   * Represents a typed value transported as a string.
    +   * 
    + * + * string string_value = 3; + * + * @return The stringValue. + */ + java.lang.String getStringValue(); + + /** + * + * + *
    +   * Represents a typed value transported as a string.
    +   * 
    + * + * string string_value = 3; + * + * @return The bytes for stringValue. + */ + com.google.protobuf.ByteString getStringValueBytes(); + /** * * *
        * Represents a typed value transported as an integer.
    -   * Default type for writes: `Int64`
        * 
    * * int64 int_value = 6; @@ -91,12 +230,12 @@ public interface ValueOrBuilder * @return Whether the intValue field is set. */ boolean hasIntValue(); + /** * * *
        * Represents a typed value transported as an integer.
    -   * Default type for writes: `Int64`
        * 
    * * int64 int_value = 6; @@ -105,5 +244,182 @@ public interface ValueOrBuilder */ long getIntValue(); + /** + * + * + *
    +   * Represents a typed value transported as a boolean.
    +   * 
    + * + * bool bool_value = 10; + * + * @return Whether the boolValue field is set. + */ + boolean hasBoolValue(); + + /** + * + * + *
    +   * Represents a typed value transported as a boolean.
    +   * 
    + * + * bool bool_value = 10; + * + * @return The boolValue. + */ + boolean getBoolValue(); + + /** + * + * + *
    +   * Represents a typed value transported as a floating point number.
    +   * Does not support NaN or infinities.
    +   * 
    + * + * double float_value = 11; + * + * @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; + * + * @return The floatValue. + */ + double getFloatValue(); + + /** + * + * + *
    +   * Represents a typed value transported as a timestamp.
    +   * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + * + * @return Whether the timestampValue field is set. + */ + boolean hasTimestampValue(); + + /** + * + * + *
    +   * Represents a typed value transported as a timestamp.
    +   * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + * + * @return The timestampValue. + */ + com.google.protobuf.Timestamp getTimestampValue(); + + /** + * + * + *
    +   * Represents a typed value transported as a timestamp.
    +   * 
    + * + * .google.protobuf.Timestamp timestamp_value = 12; + */ + com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder(); + + /** + * + * + *
    +   * Represents a typed value transported as a date.
    +   * 
    + * + * .google.type.Date date_value = 13; + * + * @return Whether the dateValue field is set. + */ + boolean hasDateValue(); + + /** + * + * + *
    +   * Represents a typed value transported as a date.
    +   * 
    + * + * .google.type.Date date_value = 13; + * + * @return The dateValue. + */ + com.google.type.Date getDateValue(); + + /** + * + * + *
    +   * Represents a typed value transported as a date.
    +   * 
    + * + * .google.type.Date date_value = 13; + */ + com.google.type.DateOrBuilder getDateValueOrBuilder(); + + /** + * + * + *
    +   * Represents a typed value transported as a sequence of values.
    +   * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +   * `Value` must provide an explicit `type` on write. This `type` will
    +   * apply recursively to the nested `Struct` fields, `Array` elements,
    +   * or `Map` key/value pairs, which *must not* supply their own `type`.
    +   * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + * + * @return Whether the arrayValue field is set. + */ + boolean hasArrayValue(); + + /** + * + * + *
    +   * Represents a typed value transported as a sequence of values.
    +   * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +   * `Value` must provide an explicit `type` on write. This `type` will
    +   * apply recursively to the nested `Struct` fields, `Array` elements,
    +   * or `Map` key/value pairs, which *must not* supply their own `type`.
    +   * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + * + * @return The arrayValue. + */ + com.google.bigtable.v2.ArrayValue getArrayValue(); + + /** + * + * + *
    +   * Represents a typed value transported as a sequence of values.
    +   * To differentiate between `Struct`, `Array`, and `Map`, the outermost
    +   * `Value` must provide an explicit `type` on write. This `type` will
    +   * apply recursively to the nested `Struct` fields, `Array` elements,
    +   * or `Map` key/value pairs, which *must not* supply their own `type`.
    +   * 
    + * + * .google.bigtable.v2.ArrayValue array_value = 4; + */ + com.google.bigtable.v2.ArrayValueOrBuilder getArrayValueOrBuilder(); + com.google.bigtable.v2.Value.KindCase getKindCase(); } 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..7c1f675bcb 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; /** @@ -33,6 +33,7 @@ public final class ValueRange extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(message_implements:google.bigtable.v2.ValueRange) ValueRangeOrBuilder { private static final long serialVersionUID = 0L; + // Use ValueRange.newBuilder() to construct. private ValueRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -78,6 +79,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 +129,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 +163,7 @@ public EndValueCase getEndValueCase() { } public static final int START_VALUE_CLOSED_FIELD_NUMBER = 1; + /** * * @@ -175,6 +179,7 @@ public EndValueCase getEndValueCase() { public boolean hasStartValueClosed() { return startValueCase_ == 1; } + /** * * @@ -195,6 +200,7 @@ public com.google.protobuf.ByteString getStartValueClosed() { } public static final int START_VALUE_OPEN_FIELD_NUMBER = 2; + /** * * @@ -210,6 +216,7 @@ public com.google.protobuf.ByteString getStartValueClosed() { public boolean hasStartValueOpen() { return startValueCase_ == 2; } + /** * * @@ -230,6 +237,7 @@ public com.google.protobuf.ByteString getStartValueOpen() { } public static final int END_VALUE_CLOSED_FIELD_NUMBER = 3; + /** * * @@ -245,6 +253,7 @@ public com.google.protobuf.ByteString getStartValueOpen() { public boolean hasEndValueClosed() { return endValueCase_ == 3; } + /** * * @@ -265,6 +274,7 @@ public com.google.protobuf.ByteString getEndValueClosed() { } public static final int END_VALUE_OPEN_FIELD_NUMBER = 4; + /** * * @@ -280,6 +290,7 @@ public com.google.protobuf.ByteString getEndValueClosed() { public boolean hasEndValueOpen() { return endValueCase_ == 4; } + /** * * @@ -525,6 +536,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } + /** * * @@ -801,6 +813,7 @@ public Builder clearEndValue() { public boolean hasStartValueClosed() { return startValueCase_ == 1; } + /** * * @@ -818,6 +831,7 @@ public com.google.protobuf.ByteString getStartValueClosed() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -839,6 +853,7 @@ public Builder setStartValueClosed(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -873,6 +888,7 @@ public Builder clearStartValueClosed() { public boolean hasStartValueOpen() { return startValueCase_ == 2; } + /** * * @@ -890,6 +906,7 @@ public com.google.protobuf.ByteString getStartValueOpen() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -911,6 +928,7 @@ public Builder setStartValueOpen(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -945,6 +963,7 @@ public Builder clearStartValueOpen() { public boolean hasEndValueClosed() { return endValueCase_ == 3; } + /** * * @@ -962,6 +981,7 @@ public com.google.protobuf.ByteString getEndValueClosed() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -983,6 +1003,7 @@ public Builder setEndValueClosed(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1017,6 +1038,7 @@ public Builder clearEndValueClosed() { public boolean hasEndValueOpen() { return endValueCase_ == 4; } + /** * * @@ -1034,6 +1056,7 @@ public com.google.protobuf.ByteString getEndValueOpen() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1055,6 +1078,7 @@ public Builder setEndValueOpen(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * 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..6e009f6ca3 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 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. @@ -16,7 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/bigtable/v2/data.proto -// Protobuf Java Version: 3.25.3 +// Protobuf Java Version: 3.25.8 package com.google.bigtable.v2; public interface ValueRangeOrBuilder @@ -36,6 +36,7 @@ public interface ValueRangeOrBuilder * @return Whether the startValueClosed field is set. */ boolean hasStartValueClosed(); + /** * * @@ -61,6 +62,7 @@ public interface ValueRangeOrBuilder * @return Whether the startValueOpen field is set. */ boolean hasStartValueOpen(); + /** * * @@ -86,6 +88,7 @@ public interface ValueRangeOrBuilder * @return Whether the endValueClosed field is set. */ boolean hasEndValueClosed(); + /** * * @@ -111,6 +114,7 @@ public interface ValueRangeOrBuilder * @return Whether the endValueOpen field is set. */ boolean hasEndValueOpen(); + /** * * 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 4701890a38..b9b8a75fb5 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 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. @@ -23,13 +23,14 @@ 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/types.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.Bigtable.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; option java_multiple_files = true; option java_outer_classname = "BigtableProto"; option java_package = "com.google.bigtable.v2"; @@ -47,6 +48,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 { @@ -81,7 +86,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"; @@ -108,7 +113,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"; @@ -134,7 +139,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 +167,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 +193,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 +243,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 +251,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 +266,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) = { @@ -274,6 +279,40 @@ service Bigtable { option (google.api.method_signature) = "table_name"; option (google.api.method_signature) = "table_name,app_profile_id"; } + + // 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" + 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"; + } } // Request message for Bigtable.ReadRows. @@ -316,6 +355,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; @@ -428,26 +478,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; } @@ -476,6 +511,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; @@ -536,6 +582,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. @@ -552,6 +602,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 @@ -630,7 +684,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; @@ -754,7 +808,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]; } @@ -827,10 +882,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; } @@ -938,8 +993,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; } @@ -954,8 +1009,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; } @@ -966,17 +1021,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). @@ -1006,3 +1063,162 @@ message ReadChangeStreamResponse { CloseStream close_stream = 3; } } + +// Request message for Bigtable.ExecuteQuery +message ExecuteQueryRequest { + // 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 replication. If not specified, + // the `default` application profile will be used. + string app_profile_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The query string. + // + // 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; + + // 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 [deprecated = true]; + } + + // Optional. If this request is resuming a previously interrupted query + // execution, `resume_token` should be copied from the last + // PartialResultSet yielded before the interruption. Doing this + // enables the query execution to resume where the last one left + // off. + // The rest of the request parameters must exactly match the + // request that yielded this token. Otherwise the request will fail. + bytes resume_token = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Required. params contains string type keys and Bigtable type values that + // bind to placeholders in the query string. 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 + // `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. + // + // 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. + // + // 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`. + map params = 7 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for Bigtable.ExecuteQuery +message ExecuteQueryResponse { + // The first response streamed from the server is of type `ResultSetMetadata` + // and includes information about the columns and types of the result set. + // From there on, we stream `PartialResultSet` messages with no additional + // information. `PartialResultSet` will contain `resume_token` to restart the + // response if query interrupts. In case of resumption with `resume_token`, + // the server will not resend the ResultSetMetadata. + oneof response { + // Structure of rows in this response stream. The first (and only the first) + // response streamed from the server will be of this type. + ResultSetMetadata metadata = 1; + + // A partial result set with row data potentially including additional + // instructions on how recent past and future partial responses should be + // interpreted. + 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 f4e2f8a10e..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. @@ -17,9 +17,12 @@ syntax = "proto3"; package google.bigtable.v2; import "google/api/field_behavior.proto"; +import "google/bigtable/v2/types.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/date.proto"; option csharp_namespace = "Google.Cloud.Bigtable.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; option java_multiple_files = true; option java_outer_classname = "DataProto"; option java_package = "com.google.bigtable.v2"; @@ -92,6 +95,21 @@ message Cell { // value (which may be of a more complex type). See the documentation of the // `Type` message for more details. message Value { + // The verified `Type` of this `Value`, if it cannot be inferred. + // + // Read results will never specify the encoding for `type` since the value + // will already have been decoded by the server. Furthermore, the `type` will + // be omitted entirely if it can be inferred from a previous response. The + // exact semantics for inferring `type` will vary, and are therefore + // documented separately for each read method. + // + // When using composite types (Struct, Array, Map) only the outermost `Value` + // will specify the `type`. This top-level `type` will define the types for + // any nested `Struct' fields, `Array` elements, or `Map` key/value pairs. + // If a nested `Value` provides a `type` on write, the request will be + // rejected with INVALID_ARGUMENT. + Type type = 7; + // Options for transporting values within the protobuf type system. A given // `kind` may support more than one `type` and vice versa. On write, this is // roughly analogous to a GoogleSQL literal. @@ -107,12 +125,43 @@ message Value { // The `type` field must be omitted. int64 raw_timestamp_micros = 9; + // Represents a typed value transported as a byte sequence. + bytes bytes_value = 2; + + // Represents a typed value transported as a string. + string string_value = 3; + // Represents a typed value transported as an integer. - // Default type for writes: `Int64` int64 int_value = 6; + + // Represents a typed value transported as a boolean. + 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. + google.protobuf.Timestamp timestamp_value = 12; + + // Represents a typed value transported as a date. + google.type.Date date_value = 13; + + // Represents a typed value transported as a sequence of values. + // To differentiate between `Struct`, `Array`, and `Map`, the outermost + // `Value` must provide an explicit `type` on write. This `type` will + // apply recursively to the nested `Struct` fields, `Array` elements, + // or `Map` key/value pairs, which *must not* supply their own `type`. + ArrayValue array_value = 4; } } +// `ArrayValue` is an ordered list of `Value`. +message ArrayValue { + // The ordered elements in the array. + repeated Value values = 1; +} + // Specifies a contiguous range of rows. message RowRange { // The row key at which to start the range. @@ -511,6 +560,28 @@ message Mutation { Value input = 4; } + // A Mutation which merges accumulated state into a cell in an `Aggregate` + // family. + message MergeToCell { + // The name of the `Aggregate` family into which new data should be added. + // This must be a family with a `value_type` of `Aggregate`. + // Format: `[-_.a-zA-Z0-9]+` + string family_name = 1; + + // The qualifier of the column into which new data should be added. This + // must be a `raw_value`. + Value column_qualifier = 2; + + // The timestamp of the cell to which new data should be added. This must + // be a `raw_timestamp_micros` that matches the table's `granularity`. + Value timestamp = 3; + + // The input value to be merged into the specified cell. This must be + // compatible with the family's `value_type.state_type`. Merging `NULL` is + // allowed, but has no effect. + Value input = 4; + } + // A Mutation which deletes cells from the specified column, optionally // restricting the deletions to a given timestamp range. message DeleteFromColumn { @@ -544,6 +615,9 @@ message Mutation { // Incrementally updates an `Aggregate` cell. AddToCell add_to_cell = 5; + // Merges accumulated state to an `Aggregate` cell. + MergeToCell merge_to_cell = 6; + // Deletes cells from a column. DeleteFromColumn delete_from_column = 2; @@ -609,3 +683,174 @@ message StreamContinuationToken { // An encoded position in the stream to restart reading from. string token = 2; } + +// Protocol buffers format descriptor, as described by Messages ProtoSchema and +// ProtoRows +message ProtoFormat {} + +// Describes a column in a Bigtable Query Language result set. +message ColumnMetadata { + // The name of the column. + string name = 1; + + // The type of the column. + Type type = 2; +} + +// ResultSet schema in proto format +message ProtoSchema { + // The columns in the result set. + repeated ColumnMetadata columns = 1; +} + +// Describes the structure of a Bigtable result set. +message ResultSetMetadata { + // The schema of the ResultSet, contains ordered list of column names + // with types + oneof schema { + // Schema in proto format + ProtoSchema proto_schema = 1; + } +} + +// Rows represented in proto format. +// +// This should be constructed by concatenating the `batch_data` from each +// of the relevant `ProtoRowsBatch` messages and parsing the result as a +// `ProtoRows` message. +message ProtoRows { + // A proto rows message consists of a list of values. Every N complete values + // defines a row, where N is equal to the number of entries in the + // `metadata.proto_schema.columns` value received in the first response. + repeated Value values = 2; +} + +// A part of a serialized `ProtoRows` message. +message ProtoRowsBatch { + // 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. +// 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 { + // 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 + // 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. + // + // 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 + // data in `partial_rows`, then return OK. + bytes resume_token = 5; + + // 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 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 ac4506f577..3dfd360558 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 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. @@ -17,7 +17,7 @@ syntax = "proto3"; package google.bigtable.v2; option csharp_namespace = "Google.Cloud.Bigtable.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; option java_multiple_files = true; option java_outer_classname = "FeatureFlagsProto"; option java_package = "com.google.bigtable.v2"; @@ -61,4 +61,10 @@ 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; } 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 8e95c8f4ff..0049f8f73e 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 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. @@ -19,7 +19,7 @@ package google.bigtable.v2; import "google/protobuf/duration.proto"; option csharp_namespace = "Google.Cloud.Bigtable.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; option java_multiple_files = true; option java_outer_classname = "RequestStatsProto"; option java_package = "com.google.bigtable.v2"; @@ -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 5363226345..076ddbd1bd 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 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. @@ -17,7 +17,7 @@ syntax = "proto3"; package google.bigtable.v2; option csharp_namespace = "Google.Cloud.Bigtable.V2"; -option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; option java_multiple_files = true; option java_outer_classname = "ResponseParamsProto"; option java_package = "com.google.bigtable.v2"; @@ -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; 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 new file mode 100644 index 0000000000..b23e30cbaa --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/types.proto @@ -0,0 +1,322 @@ +// 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. + +syntax = "proto3"; + +package google.bigtable.v2; + +import "google/api/field_behavior.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 = "TypesProto"; +option java_package = "com.google.bigtable.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option ruby_package = "Google::Cloud::Bigtable::V2"; + +// `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? +message Type { + // Bytes + // Values of type `Bytes` are stored in `Value.bytes_value`. + message Bytes { + // Rules used to convert to/from lower level types. + message Encoding { + // Leaves the value "as-is" + // * Order-preserving? Yes + // * Self-delimiting? No + // * Compatibility? N/A + message Raw {} + + // Which encoding to use. + oneof encoding { + // Use `Raw` encoding. + Raw raw = 1; + } + } + + // The encoding to use when converting to/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. + 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 {} + + // Which encoding to use. + oneof encoding { + // Deprecated: if set, converts to an empty `utf8_bytes`. + Utf8Raw utf8_raw = 1 [deprecated = true]; + + // Use `Utf8Bytes` encoding. + Utf8Bytes utf8_bytes = 2; + } + } + + // The encoding to use when converting to/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. + 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` + message BigEndianBytes { + // Deprecated: ignored if set. + Bytes bytes_type = 1; + } + + // Which encoding to use. + oneof encoding { + // Use `BigEndianBytes` encoding. + BigEndianBytes big_endian_bytes = 1; + } + } + + // The encoding to use when converting to/from lower level types. + Encoding encoding = 1; + } + + // bool + // Values of type `Bool` are stored in `Value.bool_value`. + message Bool {} + + // Float32 + // Values of type `Float32` are stored in `Value.float_value`. + message Float32 {} + + // Float64 + // Values of type `Float64` are stored in `Value.float_value`. + message Float64 {} + + // Timestamp + // Values of type `Timestamp` are stored in `Value.timestamp_value`. + message Timestamp {} + + // Date + // Values of type `Date` are stored in `Value.date_value`. + message Date {} + + // 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`. + message Struct { + // A struct field and its type. + message Field { + // The field name (optional). Fields without a `field_name` are considered + // anonymous and cannot be referenced by name. + string field_name = 1; + + // The type of values in this field. + Type type = 2; + } + + // The names and types of the fields in this struct. + repeated Field fields = 1; + } + + // 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. + // Values of type `Array` are stored in `Value.array_value`. + message Array { + // The type of the elements in the array. This must not be `Array`. + Type element_type = 1; + } + + // A mapping of keys to values of a given type. + // Values of type `Map` are stored in a `Value.array_value` where each entry + // is another `Value.array_value` with two elements (the key and the value, + // in that order). + // Normally encoded Map values won't have repeated keys, however, clients are + // expected to handle the case in which they do. If the same key appears + // multiple times, the _last_ value takes precedence. + message Map { + // The type of a map key. + // Only `Bytes`, `String`, and `Int64` are allowed as key types. + Type key_type = 1; + + // The type of the values in a map. + Type value_type = 2; + } + + // 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` . + message Aggregate { + // Computes the sum of the input values. + // Allowed input: `Int64` + // State: same as input + message Sum {} + + // Computes the max of the input values. + // Allowed input: `Int64` + // State: same as input + message Max {} + + // Computes the min of the input values. + // Allowed input: `Int64` + // State: same as input + message Min {} + + // Computes an approximate unique count over the input values. When using + // raw data as input, be careful to use a consistent encoding. Otherwise + // the same value encoded differently could count more than once, or two + // distinct values could count as identical. + // Input: Any, or omit for Raw + // State: TBD + // 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. + // 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. + Type state_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Which aggregator function to use. The configured types must match. + oneof aggregator { + // Sum aggregator. + Sum sum = 4; + + // HyperLogLogPlusPlusUniqueCount aggregator. + HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; + + // Max aggregator. + Max max = 6; + + // Min aggregator. + Min min = 7; + } + } + + // The kind of type that this represents. + oneof kind { + // Bytes + Bytes bytes_type = 1; + + // String + String string_type = 2; + + // Int64 + Int64 int64_type = 5; + + // Float32 + Float32 float32_type = 12; + + // Float64 + Float64 float64_type = 9; + + // Bool + Bool bool_type = 8; + + // Timestamp + Timestamp timestamp_type = 10; + + // Date + Date date_type = 11; + + // Aggregate + Aggregate aggregate_type = 6; + + // Struct + Struct struct_type = 7; + + // Array + Array array_type = 3; + + // 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 b5d8c8f8e7..a4e204df0f 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-bigtable - 2.39.5 + 2.50.0 @@ -42,7 +42,7 @@ com.google.truth truth - 1.4.3 + 1.4.4 test 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 fd188c9c24..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.3 - 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..785a96f581 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -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.3 true diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index ec644ba8b9..1ff4e5226c 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-bigtable - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT @@ -41,7 +41,7 @@ com.google.truth truth - 1.4.3 + 1.4.4 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 44f3981997..acad499184 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 26.37.0 + 26.50.0 pom import @@ -52,7 +52,7 @@ com.google.truth truth - 1.4.3 + 1.4.4 test 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..106d762962 100644 --- a/samples/snippets/src/main/java/com/example/bigtable/HelloWorld.java +++ b/samples/snippets/src/main/java/com/example/bigtable/HelloWorld.java @@ -224,6 +224,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 +235,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 +247,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. */ 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/WriteAggregate.java b/samples/snippets/src/main/java/com/example/bigtable/WriteAggregate.java index 646e302cb5..b3e0b20052 100644 --- a/samples/snippets/src/main/java/com/example/bigtable/WriteAggregate.java +++ b/samples/snippets/src/main/java/com/example/bigtable/WriteAggregate.java @@ -20,6 +20,8 @@ import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.models.RowMutation; +import com.google.common.primitives.Longs; +import com.google.protobuf.ByteString; import java.time.Instant; import java.time.temporal.ChronoUnit; @@ -53,6 +55,37 @@ public static void writeAggregate(String projectId, String instanceId, String ta System.out.println("Error during WriteAggregate: \n" + e.toString()); } } + + public static void mergeAggregate(String projectId, String instanceId, String tableId) { + // String projectId = "my-project-id"; + // String instanceId = "my-instance-id"; + // String tableId = "page-view-counter"; + + try (BigtableDataClient dataClient = BigtableDataClient.create(projectId, instanceId)) { + + String rowKey = "page#index.html"; + Instant viewTimestamp = Instant.parse("2024-03-13T12:41:34.123Z"); + + // Bucket the views for an hour into a single count, giving us an hourly view count for a + // given page. + Instant hourlyBucket = viewTimestamp.truncatedTo(ChronoUnit.HOURS); + long hourlyBucketMicros = hourlyBucket.toEpochMilli() * MICROS_PER_MILLI; + + RowMutation rowMutation = + RowMutation.create(tableId, rowKey) + .mergeToCell( + COUNT_COLUMN_FAMILY_NAME, + "views", + hourlyBucketMicros, + ByteString.copyFrom(Longs.toByteArray(1L))); + + dataClient.mutateRow(rowMutation); + System.out.printf("Successfully wrote row %s", rowKey); + + } catch (Exception e) { + System.out.println("Error during mergeAggregate: \n" + e.toString()); + } + } } // [END bigtable_writes_aggregate] diff --git a/samples/snippets/src/test/java/com/example/bigtable/deletes/DeletesTest.java b/samples/snippets/src/test/java/com/example/bigtable/deletes/DeletesTest.java index a2fa31c0d6..308607c891 100644 --- a/samples/snippets/src/test/java/com/example/bigtable/deletes/DeletesTest.java +++ b/samples/snippets/src/test/java/com/example/bigtable/deletes/DeletesTest.java @@ -19,11 +19,13 @@ import com.example.bigtable.MobileTimeSeriesBaseTest; import com.google.api.gax.rpc.ServerStream; import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; +import com.google.cloud.bigtable.admin.v2.models.ColumnFamily; import com.google.cloud.bigtable.data.v2.BigtableDataClient; 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.truth.Correspondence; import com.google.common.truth.Truth; import java.io.IOException; import java.util.List; @@ -39,6 +41,8 @@ */ @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class DeletesTest extends MobileTimeSeriesBaseTest { + private static final Correspondence COLUMN_FAMILY_ID_CORRESPONDENCE = + Correspondence.transforming(ColumnFamily::getId, "ColumnFamily id"); public static BigtableDataClient bigtableDataClient; @BeforeClass @@ -164,13 +168,17 @@ public void test6_testDeleteFromColumnFamily() throws IOException { public void test7_testDeleteColumnFamily() throws IOException { try (BigtableTableAdminClient tableAdminClient = BigtableTableAdminClient.create(projectId, instanceId)) { - Truth.assertThat(tableAdminClient.getTable(TABLE_ID).getColumnFamilies().size()).isEqualTo(2); + Truth.assertThat(tableAdminClient.getTable(TABLE_ID).getColumnFamilies()) + .comparingElementsUsing(COLUMN_FAMILY_ID_CORRESPONDENCE) + .contains(COLUMN_FAMILY_NAME_STATS); DeleteColumnFamilyExample deleteColumnFamilyExample = new DeleteColumnFamilyExample(); deleteColumnFamilyExample.deleteColumnFamily( projectId, instanceId, TABLE_ID, COLUMN_FAMILY_NAME_STATS); - Truth.assertThat(tableAdminClient.getTable(TABLE_ID).getColumnFamilies().size()).isEqualTo(1); + Truth.assertThat(tableAdminClient.getTable(TABLE_ID).getColumnFamilies()) + .comparingElementsUsing(COLUMN_FAMILY_ID_CORRESPONDENCE) + .doesNotContain(COLUMN_FAMILY_NAME_STATS); } } 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 eeed52f89f..e32854a031 100644 --- a/test-proxy/pom.xml +++ b/test-proxy/pom.xml @@ -12,11 +12,11 @@ google-cloud-bigtable-parent com.google.cloud - 2.40.1-SNAPSHOT + 2.65.1-SNAPSHOT - 2.40.1-SNAPSHOT + 2.65.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..da205c3d3d 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,6 +55,7 @@ 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; @@ -57,20 +63,18 @@ 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 +96,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 +126,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 +162,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 +175,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 +185,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 +218,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); @@ -355,7 +334,13 @@ public void bulkMutateRows( .build()); } responseObserver.onNext( - resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + resultBuilder + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(e.getStatusCode().getCode().ordinal()) + .setMessage(e.getMessage()) + .build()) + .build()); responseObserver.onCompleted(); return; } catch (ApiException e) { @@ -698,6 +683,78 @@ public void readModifyWriteRow( responseObserver.onCompleted(); } + @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())); + } + PreparedStatement preparedStatement = + client.dataClient().prepareStatement(request.getRequest().getQuery(), paramTypes); + resultSet = + client + .dataClient() + .executeQuery( + BoundStatementDeserializer.toBoundStatement(preparedStatement, request)); + responseObserver.onNext(ResultSetSerializer.toExecuteQueryResult(resultSet)); + } catch (InterruptedException e) { + responseObserver.onError(e); + return; + } catch (ExecutionException e) { + responseObserver.onError(e); + return; + } catch (ApiException e) { + responseObserver.onNext( + ExecuteQueryResult.newBuilder() + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(e.getStatusCode().getCode().ordinal()) + .setMessage(e.getMessage()) + .build()) + .build()); + responseObserver.onCompleted(); + return; + } catch (StatusRuntimeException e) { + responseObserver.onNext( + ExecuteQueryResult.newBuilder() + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(e.getStatus().getCode().value()) + .setMessage(e.getStatus().getDescription()) + .build()) + .build()); + responseObserver.onCompleted(); + return; + } catch (RuntimeException e) { + // If client encounters problem, don't return any results. + responseObserver.onNext( + 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(); + } + @Override public synchronized void close() { Iterator> it = idClientMap.entrySet().iterator(); @@ -717,52 +774,60 @@ 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); + + if (sslContext != null) { + channelBuilder.sslContext(sslContext); + } + + if (!sslTarget.isEmpty()) { + channelBuilder.overrideAuthority(sslTarget); + } + return channelBuilder; } }) .build(); } - private CredentialsProvider getCredentialsProvider() throws IOException { - if (credential == null) { + private CredentialsProvider getCredentialsProvider(String accessToken) { + if (accessToken.isEmpty()) { return NoCredentialsProvider.create(); } - final GoogleCredentials creds = - GoogleCredentials.fromStream(new ByteArrayInputStream(credential.getBytes(UTF_8))); - - return FixedCredentialsProvider.create(creds); + 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..f817197d14 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,19 +32,7 @@ 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(); } 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..7400986b6e --- /dev/null +++ b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/ResultSetSerializer.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.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.Struct; +import com.google.bigtable.v2.Type.Timestamp; +import com.google.bigtable.v2.Value; +import com.google.cloud.Date; +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.ByteString; +import java.time.Instant; +import java.util.List; +import java.util.concurrent.ExecutionException; + +public class ResultSetSerializer { + public static 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 static 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 STRING: + valueBuilder.setStringValue((String) value); + break; + case INT64: + valueBuilder.setIntValue((Long) value); + 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 static 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 DATE: + return struct.getDate(fieldIndex); + case FLOAT32: + return struct.getFloat(fieldIndex); + case FLOAT64: + return struct.getDouble(fieldIndex); + case INT64: + return struct.getLong(fieldIndex); + 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(); + + 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..b82354b08e 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. @@ -38,6 +38,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 +87,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 +249,42 @@ 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; +} + +// 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 +347,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 ef58d664c1..d270ff60e7 100644 --- a/versions.txt +++ b/versions.txt @@ -1,10 +1,10 @@ # Format: # module:released-version:current-version -google-cloud-bigtable:2.40.0:2.40.1-SNAPSHOT -grpc-google-cloud-bigtable-admin-v2:2.40.0:2.40.1-SNAPSHOT -grpc-google-cloud-bigtable-v2:2.40.0:2.40.1-SNAPSHOT -proto-google-cloud-bigtable-admin-v2:2.40.0:2.40.1-SNAPSHOT -proto-google-cloud-bigtable-v2:2.40.0:2.40.1-SNAPSHOT -google-cloud-bigtable-emulator:0.177.0:0.177.1-SNAPSHOT -google-cloud-bigtable-emulator-core:0.177.0:0.177.1-SNAPSHOT +google-cloud-bigtable:2.65.0:2.65.1-SNAPSHOT +grpc-google-cloud-bigtable-admin-v2:2.65.0:2.65.1-SNAPSHOT +grpc-google-cloud-bigtable-v2:2.65.0:2.65.1-SNAPSHOT +proto-google-cloud-bigtable-admin-v2:2.65.0:2.65.1-SNAPSHOT +proto-google-cloud-bigtable-v2:2.65.0:2.65.1-SNAPSHOT +google-cloud-bigtable-emulator:0.202.0:0.202.1-SNAPSHOT +google-cloud-bigtable-emulator-core:0.202.0:0.202.1-SNAPSHOT