diff --git a/.github/.OwlBot-hermetic.yaml b/.github/.OwlBot-hermetic.yaml index 8a75909c6..1c4539892 100644 --- a/.github/.OwlBot-hermetic.yaml +++ b/.github/.OwlBot-hermetic.yaml @@ -16,7 +16,11 @@ deep-remove-regex: - "/proto-google-.*/src" - "/google-.*/src" +#Args=--initialize-at-build-time=org.junit.runners.model.FrameworkField deep-preserve-regex: +- "/.*google-.*/src/main/java/.*/stub/Version.java" +- "/google-cloud-pubsub/src/test/resources/META-INF/native-image/.*" +- "/google-cloud-pubsub/src/main/java/com/google/cloud/.*/v.*/it/IT.*Test.java" - "/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" - "/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeletedTopic.java" - "/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectSnapshotName.java" @@ -38,6 +42,7 @@ deep-preserve-regex: - "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SequentialExecutorServiceTest.java" - "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StatusUtilTest.java" - "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java" +- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberShutdownSettingsTest.java" - "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java" - "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminSmokeTest.java" - "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/WaiterTest.java" @@ -61,8 +66,10 @@ deep-preserve-regex: - "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java" - "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java" - "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriberInterface.java" +- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriberShutdownSettings.java" - "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriberStats.java" - "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Waiter.java" +- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/LoggingUtil.java" deep-copy-regex: - source: "/google/pubsub/(v.*)/.*-java/proto-google-.*/src" diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 125a152c8..3a6e0dbe4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,15 +4,26 @@ # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax -# The @googleapis/api-pubsub is the default owner for changes in this repo -* @googleapis/yoshi-java @googleapis/api-pubsub +# The @googleapis/pubsub-team is the default owner for changes in this repo +* @googleapis/cloud-sdk-java-team @googleapis/pubsub-team # for handwritten libraries, keep codeowner_team in .repo-metadata.json as owner -**/*.java @googleapis/api-pubsub +**/*.java @googleapis/pubsub-team +# For generated Java code +proto-*/ @googleapis/cloud-sdk-java-team @googleapis/pubsub-team +grpc-*/ @googleapis/cloud-sdk-java-team @googleapis/pubsub-team +# Generated code pattern in google-cloud-pubsub +**/*Client.java @googleapis/cloud-sdk-java-team @googleapis/pubsub-team +**/*Settings.java @googleapis/cloud-sdk-java-team @googleapis/pubsub-team +**/*ClientHttpJsonTest.java @googleapis/cloud-sdk-java-team @googleapis/pubsub-team +**/*ClientTest.java @googleapis/cloud-sdk-java-team @googleapis/pubsub-team +google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/** @googleapis/cloud-sdk-java-team @googleapis/pubsub-team +google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java @googleapis/cloud-sdk-java-team @googleapis/pubsub-team +google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/Mock* @googleapis/cloud-sdk-java-team @googleapis/pubsub-team # The java-samples-reviewers team is the default owner for samples changes samples/**/*.java @googleapis/java-samples-reviewers # Generated snippets should not be owned by samples reviewers -samples/snippets/generated/ @googleapis/yoshi-java +samples/snippets/generated/ @googleapis/cloud-sdk-java-team diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml index c644a24e1..e58cdcbad 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 dae3c7e8a..dd5ccf112 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -2,43 +2,32 @@ bumpMinorPreMajor: true handleGHRelease: true releaseType: java-yoshi branches: - - releaseType: java-lts - bumpMinorPreMajor: true - handleGHRelease: true - branch: 1.111.0-sp - - bumpMinorPreMajor: true - handleGHRelease: true - releaseType: java-yoshi - branch: java7 - - bumpMinorPreMajor: true - handleGHRelease: true + - branch: 1.111.0-sp + releaseType: java-lts + - branch: java7 + - branch: 1.114.x releaseType: java-backport - branch: 1.114.x - - bumpMinorPreMajor: true - handleGHRelease: true + - branch: 1.116.x releaseType: java-backport - branch: 1.116.x - - bumpMinorPreMajor: true - handleGHRelease: true + - branch: 1.117.x releaseType: java-backport - branch: 1.117.x - - bumpMinorPreMajor: true - handleGHRelease: true + - branch: 1.120.x releaseType: java-backport - branch: 1.120.x - - bumpMinorPreMajor: true - handleGHRelease: true + - branch: 1.121.x releaseType: java-backport - branch: 1.121.x - - bumpMinorPreMajor: true - handleGHRelease: true + - branch: 1.123.x releaseType: java-backport - branch: 1.123.x - - bumpMinorPreMajor: true - handleGHRelease: true + - branch: 1.125.x + releaseType: java-backport + - branch: 1.129.x + releaseType: java-backport + - branch: 1.137.x + releaseType: java-backport + - branch: 1.140.x releaseType: java-backport - branch: 1.125.x + - branch: protobuf-4.x-rc + manifest: true - bumpMinorPreMajor: true handleGHRelease: true releaseType: java-backport - branch: 1.129.x + branch: 1.147.x diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index 561a31304..f448fafd7 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -e +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 @@ -15,8 +15,27 @@ set -e function get_latest_released_version() { local group_id=$1 local artifact_id=$2 - latest=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json" | jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' | sort -V | tail -n 1) - echo "${latest}" + group_id_url_path="$(sed 's|\.|/|g' <<< "${group_id}")" + url="https://repo1.maven.org/maven2/${group_id_url_path}/${artifact_id}/maven-metadata.xml" + xml_content=$(curl -s --fail "${url}") + + # 1. Extract all version tags + # 2. Strip the XML tags to leave just the version numbers + # 3. Filter for strictly numbers.numbers.numbers (e.g., 2.54.0) + # 4. Sort by version (V) and take the last one (tail -n 1) + latest=$(echo "${xml_content}" \ + | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' \ + | sed -E 's/<[^>]+>//g' \ + | sort -V \ + | tail -n 1) + + if [[ -z "${latest}" ]]; then + echo "The latest version of ${group_id}:${artifact_id} is empty." + echo "The returned json from maven.org is invalid: ${json_content}" + exit 1 + else + echo "${latest}" + fi } # Update a key to a new value in the generation config. @@ -28,11 +47,24 @@ function update_config() { sed -i -e "s/^${key_word}.*$/${key_word}: ${new_value}/" "${file}" } +# Update an action to a new version in GitHub action. +# the second argument must have the git tag (including "v"). +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}@[^ ]*$|${key_word}@${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 @@ -48,6 +80,10 @@ case "${key}" in generation_config="$2" shift ;; + --workflow) + workflow="$2" + shift + ;; *) echo "Invalid option: [$1]" exit 1 @@ -71,21 +107,34 @@ if [ -z "${generation_config}" ]; then 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)" -# try to find a open pull request associated with the branch +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 +# 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. +# 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 @@ -94,25 +143,47 @@ 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 gapic-generator-java version to the latest +latest_gapic_generator_version=$(get_latest_released_version "com.google.api" "gapic-generator-java") +update_config "gapic_generator_version" "${latest_gapic_generator_version}" "${generation_config}" + +# Update the GitHub Actions reference to the latest. +# After the google-cloud-java monorepo migration of sdk-platform-java, +# we cannot rely on the gapic-generator-java version tag. Let's use +# the gapic-libraries-bom version +latest_gapic_libraries_bom_version=$(get_latest_released_version "com.google.cloud" "gapic-libraries-bom") +update_action "googleapis/google-cloud-java/sdk-platform-java/.github/scripts" \ + "v${latest_gapic_libraries_bom_version}" \ + "${workflow}" -# update libraries-bom version to the latest +# 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}" +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 -git commit -m "${title}" + if [ -z "${pr_num}" ]; then git remote add remote_repo https://cloud-java-bot:"${GH_TOKEN}@github.com/${repo}.git" - git fetch -q --unshallow remote_repo + 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 diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 8f2999f82..1f09ebd60 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -15,9 +15,12 @@ branchProtectionRules: - units (11) - 'Kokoro - Test: Integration' - cla/google - - '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 + - library_generation + - unmanaged_dependency_check - pattern: 1.111.0-sp isAdminEnforced: true requiredApprovingReviewCount: 1 @@ -175,10 +178,66 @@ branchProtectionRules: - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' - javadoc + - pattern: 1.137.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 + - library_generation + - unmanaged_dependency_check + - pattern: 1.140.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 + - library_generation + - unmanaged_dependency_check + - pattern: 1.147.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 + - library_generation + - unmanaged_dependency_check permissionRules: - team: yoshi-admins permission: admin - team: yoshi-java-admins permission: admin - - team: yoshi-java + - team: cloud-sdk-java-team permission: push diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 18d92e5a2..0cda6b04f 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-please') steps: - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b91fa381f..b9b8be0c3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - java: [11, 17, 21] + java: [11, 17, 21, 25] steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 @@ -104,7 +104,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: 17 - run: java -version - run: .kokoro/build.sh env: diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml index 35aa3b151..fe2fc8cff 100644 --- a/.github/workflows/hermetic_library_generation.yaml +++ b/.github/workflows/hermetic_library_generation.yaml @@ -32,14 +32,14 @@ jobs: else echo "SHOULD_RUN=true" >> $GITHUB_ENV fi - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 if: env.SHOULD_RUN == 'true' with: fetch-depth: 0 - token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - - uses: googleapis/sdk-platform-java/.github/scripts@v2.50.0 + token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }} + - uses: googleapis/google-cloud-java/sdk-platform-java/.github/scripts@v1.85.0 if: env.SHOULD_RUN == 'true' with: base_ref: ${{ github.base_ref }} head_ref: ${{ github.head_ref }} - token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }} diff --git a/.github/workflows/renovate_config_check.yaml b/.github/workflows/renovate_config_check.yaml index 7c5ec7865..8c922936b 100644 --- a/.github/workflows/renovate_config_check.yaml +++ b/.github/workflows/renovate_config_check.yaml @@ -4,10 +4,11 @@ on: pull_request: paths: - 'renovate.json' + - '.github/workflows/renovate_config_check.yaml' jobs: renovate_bot_config_validation: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout code @@ -16,10 +17,8 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '22' - - name: Install Renovate and Config Validator + - name: Run Renovate Config Validator run: | - npm install -g npm@latest - npm install --global renovate - renovate-config-validator + npx --package renovate@43.136.0 renovate-config-validator diff --git a/.github/workflows/unmanaged_dependency_check.yaml b/.github/workflows/unmanaged_dependency_check.yaml index 1834e52e1..c2f165680 100644 --- a/.github/workflows/unmanaged_dependency_check.yaml +++ b/.github/workflows/unmanaged_dependency_check.yaml @@ -5,8 +5,8 @@ jobs: unmanaged_dependency_check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - uses: actions/checkout@v6 + - uses: actions/setup-java@v5 with: distribution: temurin java-version: 11 @@ -17,6 +17,6 @@ jobs: # repository .kokoro/build.sh - name: Unmanaged dependency check - uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.40.0 + uses: googleapis/google-cloud-java/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@v1.85.0 with: bom-path: google-cloud-pubsub-bom/pom.xml diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml index f15c80785..8de9d67ea 100644 --- a/.github/workflows/update_generation_config.yaml +++ b/.github/workflows/update_generation_config.yaml @@ -28,7 +28,11 @@ jobs: steps: - uses: actions/checkout@v4 with: - token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + fetch-depth: 0 + token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }} + - name: Install Dependencies + shell: bash + run: sudo apt-get update && sudo apt-get install -y libxml2-utils - name: Update params in generation config to latest shell: bash run: | @@ -36,7 +40,8 @@ jobs: [ -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}"\ + --base_branch "${base_branch}" \ --repo ${{ github.repository }} env: - GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }} + diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 351d0d40c..41903cda1 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -52,7 +52,7 @@ test) RETURN_CODE=$? ;; lint) - mvn com.coveo:fmt-maven-plugin:check + mvn com.spotify.fmt:fmt-maven-plugin:check RETURN_CODE=$? ;; javadoc) diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native-a.cfg similarity index 77% rename from .kokoro/presubmit/graalvm-native.cfg rename to .kokoro/presubmit/graalvm-native-a.cfg index a836c97f0..7b8ea75fc 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.40.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.62.0" # {x-version-update:google-cloud-shared-dependencies:current} } env_vars: { @@ -31,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 74% rename from .kokoro/presubmit/graalvm-native-17.cfg rename to .kokoro/presubmit/graalvm-native-b.cfg index 82ed3a43e..53ecdc6d6 100644 --- a/.kokoro/presubmit/graalvm-native-17.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -3,12 +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.40.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.62.0" # {x-version-update:google-cloud-shared-dependencies:current} } env_vars: { key: "JOB_TYPE" - value: "graalvm17" + value: "graalvm" } # TODO: remove this after we've migrated all tests and scripts @@ -30,4 +30,9 @@ env_vars: { 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 000000000..f9e58f879 --- /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.62.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/.repo-metadata.json b/.repo-metadata.json index 0c8364b05..31cf00630 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -14,7 +14,7 @@ "library_type": "GAPIC_COMBO", "requires_billing": true, "api_reference": "https://cloud.google.com/pubsub/", - "codeowner_team": "@googleapis/api-pubsub", + "codeowner_team": "@googleapis/pubsub-team", "issue_tracker": "https://issuetracker.google.com/savedsearches/559741", "recommended_package": "com.google.cloud.pubsub.v1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 82d9f118d..dcd6ad089 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,624 @@ # Changelog +## [1.150.2](https://github.com/googleapis/java-pubsub/compare/v1.150.1...v1.150.2) (2026-05-07) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.72.0 ([a9b68a2](https://github.com/googleapis/java-pubsub/commit/a9b68a20208246b435739a1169d240a55c89695c)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.62.0 ([#2729](https://github.com/googleapis/java-pubsub/issues/2729)) ([77e0c65](https://github.com/googleapis/java-pubsub/commit/77e0c652c73a2fb790f01b76f2f32d95092188cb)) +* Update googleapis/google-cloud-java action to v1.86.0 ([#2727](https://github.com/googleapis/java-pubsub/issues/2727)) ([3da5b3b](https://github.com/googleapis/java-pubsub/commit/3da5b3baa1c4d97e58208b3c1de5533f2b10bf40)) + +## [1.150.1](https://github.com/googleapis/java-pubsub/compare/v1.150.0...v1.150.1) (2026-04-14) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.71.0 ([49cb97f](https://github.com/googleapis/java-pubsub/commit/49cb97ff6d8f1a12abc6689cadc04c888baab723)) +* Increase streaming pull timeout ([49cb97f](https://github.com/googleapis/java-pubsub/commit/49cb97ff6d8f1a12abc6689cadc04c888baab723)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.61.0 ([#2714](https://github.com/googleapis/java-pubsub/issues/2714)) ([7f6dbcc](https://github.com/googleapis/java-pubsub/commit/7f6dbcc11c41c682bee16818436d036a1df68512)) + + +### Documentation + +* Fix documentation URL AIInference MessageTransform service_account_email field ([49cb97f](https://github.com/googleapis/java-pubsub/commit/49cb97ff6d8f1a12abc6689cadc04c888baab723)) + +## [1.150.0](https://github.com/googleapis/java-pubsub/compare/v1.149.0...v1.150.0) (2026-03-23) + + +### Features + +* Add BigtableConfig type ([f69de7e](https://github.com/googleapis/java-pubsub/commit/f69de7ee2cb5b96adbf3fc5b11e1f8a3bbbd0bee)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.68.0 ([f69de7e](https://github.com/googleapis/java-pubsub/commit/f69de7ee2cb5b96adbf3fc5b11e1f8a3bbbd0bee)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.58.0 ([#2709](https://github.com/googleapis/java-pubsub/issues/2709)) ([e82a6ff](https://github.com/googleapis/java-pubsub/commit/e82a6ff52154f3acaaf8195a90e2966666353609)) + +## [1.149.0](https://github.com/googleapis/java-pubsub/compare/v1.148.0...v1.149.0) (2026-02-26) + + +### Features + +* Add client library debug logging ([c4e10b9](https://github.com/googleapis/java-pubsub/commit/c4e10b95880d0db61b62e89c58d269c755d9e11e)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.67.0 ([c85f4ea](https://github.com/googleapis/java-pubsub/commit/c85f4eaaf2b28e7c0c544d5a4a92a197112e7723)) +* Do not use directExecutor() for the publish callback when ordering is enabled ([#2693](https://github.com/googleapis/java-pubsub/issues/2693)) ([c7ecd2b](https://github.com/googleapis/java-pubsub/commit/c7ecd2b5aac2719ca55a93d6bd5b9afc9aeb5a9c)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.59.0 ([#2690](https://github.com/googleapis/java-pubsub/issues/2690)) ([bed9464](https://github.com/googleapis/java-pubsub/commit/bed94648ceede888a244d21082b7e403fbae0aaa)) +* Update dependency com.google.cloud:google-cloud-core to v2.65.0 ([#2681](https://github.com/googleapis/java-pubsub/issues/2681)) ([e291b0d](https://github.com/googleapis/java-pubsub/commit/e291b0d98d576f0beceb49af002fc501ad31683f)) +* Update dependency com.google.cloud:google-cloud-storage to v2.63.0 ([#2676](https://github.com/googleapis/java-pubsub/issues/2676)) ([2a1ebea](https://github.com/googleapis/java-pubsub/commit/2a1ebea9d101cc650e1276e30063f87193eb1f6e)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.57.0 ([#2696](https://github.com/googleapis/java-pubsub/issues/2696)) ([dd02393](https://github.com/googleapis/java-pubsub/commit/dd02393c586de6cfe7d91d9579a490533876c7f1)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.33.5 ([#2678](https://github.com/googleapis/java-pubsub/issues/2678)) ([70b781c](https://github.com/googleapis/java-pubsub/commit/70b781c51dc82de76ff1417c1c0ab4b012cb7cc0)) +* Update googleapis/sdk-platform-java action to v2.67.0 ([#2683](https://github.com/googleapis/java-pubsub/issues/2683)) ([9d5fa5b](https://github.com/googleapis/java-pubsub/commit/9d5fa5b04c633879567b2025bc045ef2e6b48b59)) + +## [1.148.0](https://github.com/googleapis/java-pubsub/compare/v1.147.0...v1.148.0) (2026-02-11) + + +### Features + +* Next release from main branch is 1.148.0 ([#2686](https://github.com/googleapis/java-pubsub/issues/2686)) ([6b133e8](https://github.com/googleapis/java-pubsub/commit/6b133e8277bba25ab8f91d970d8d79e8bdaaa7e7)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.56.1 ([#2682](https://github.com/googleapis/java-pubsub/issues/2682)) ([1a94be9](https://github.com/googleapis/java-pubsub/commit/1a94be982e291c8cbf1ac2ec4aa6a84a4dabd17d)) + +## [1.147.0](https://github.com/googleapis/java-pubsub/compare/v1.146.0...v1.147.0) (2026-01-27) + + +### Features + +* Enable Subscriber StreamingPull keepalives by increasing the StreamingPull protocol version ([#2672](https://github.com/googleapis/java-pubsub/issues/2672)) ([18a592d](https://github.com/googleapis/java-pubsub/commit/18a592d81971ca99fa8fac0b355b02c4c3646bf2)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.58.0 ([#2639](https://github.com/googleapis/java-pubsub/issues/2639)) ([afe27d8](https://github.com/googleapis/java-pubsub/commit/afe27d881379ad2564961b439176c61d0e9ce663)) +* Update dependency com.google.cloud:google-cloud-core to v2.64.0 ([#2641](https://github.com/googleapis/java-pubsub/issues/2641)) ([93368a3](https://github.com/googleapis/java-pubsub/commit/93368a3e9aec90e42a944d76e79559f3f35ac792)) +* Update dependency com.google.cloud:google-cloud-storage to v2.62.0 ([#2643](https://github.com/googleapis/java-pubsub/issues/2643)) ([6a4f059](https://github.com/googleapis/java-pubsub/commit/6a4f0595610e06ba1fa58fe916c7f5a1f09245ca)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.33.4 ([#2656](https://github.com/googleapis/java-pubsub/issues/2656)) ([0973b81](https://github.com/googleapis/java-pubsub/commit/0973b81b82493e7a7df1764e4f29435abe545d50)) +* Update dependency org.assertj:assertj-core to v3.27.7 [security] ([#2670](https://github.com/googleapis/java-pubsub/issues/2670)) ([32d75fd](https://github.com/googleapis/java-pubsub/commit/32d75fd9096bb56286c98636d5a8fa6a23508f60)) + +## [1.146.0](https://github.com/googleapis/java-pubsub/compare/v1.145.0...v1.146.0) (2026-01-26) + + +### Features + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.66.0 ([a7edd5b](https://github.com/googleapis/java-pubsub/commit/a7edd5b705557bcf72ca47dc8219677ba8595f8c)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.56.0 ([#2664](https://github.com/googleapis/java-pubsub/issues/2664)) ([6d44cf3](https://github.com/googleapis/java-pubsub/commit/6d44cf3b94e6fe8603e3d8bb9357643f0315fa4e)) +* Update googleapis/sdk-platform-java action to v2.66.0 ([#2665](https://github.com/googleapis/java-pubsub/issues/2665)) ([1f95f3a](https://github.com/googleapis/java-pubsub/commit/1f95f3ac56ef371b7eee05aa2d294e0e4ca6ad84)) + +## [1.145.0](https://github.com/googleapis/java-pubsub/compare/v1.144.1...v1.145.0) (2026-01-15) + + +### Features + +* Add AIInference MessageTransform type ([fe73614](https://github.com/googleapis/java-pubsub/commit/fe73614cdb6c2aca445c46e917c325cbfee3adfd)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.65.1 ([fe73614](https://github.com/googleapis/java-pubsub/commit/fe73614cdb6c2aca445c46e917c325cbfee3adfd)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.55.1 ([#2658](https://github.com/googleapis/java-pubsub/issues/2658)) ([1a11309](https://github.com/googleapis/java-pubsub/commit/1a1130914420b45d628553218a3fa4d477216143)) +* Update googleapis/sdk-platform-java action to v2.65.1 ([#2657](https://github.com/googleapis/java-pubsub/issues/2657)) ([72dd566](https://github.com/googleapis/java-pubsub/commit/72dd5668ab2e71a24bed66c55173ab9ff5093ced)) + + +### Documentation + +* Add tags documentation links to Pub/Sub resource tags fields ([fe73614](https://github.com/googleapis/java-pubsub/commit/fe73614cdb6c2aca445c46e917c325cbfee3adfd)) + +## [1.144.1](https://github.com/googleapis/java-pubsub/compare/v1.144.0...v1.144.1) (2025-12-22) + + +### Bug Fixes + +* Lower the Subscriber protocol version to disable the streaming pull keepalive feature ([#2652](https://github.com/googleapis/java-pubsub/issues/2652)) ([ca99c2a](https://github.com/googleapis/java-pubsub/commit/ca99c2a2cea8201ea6f71e7383bd6123ec32ebdc)) + +## [1.144.0](https://github.com/googleapis/java-pubsub/compare/v1.143.1...v1.144.0) (2025-12-11) + + +### Features + +* Add keepalive feature to tear down streams in their absence ([#2605](https://github.com/googleapis/java-pubsub/issues/2605)) ([99aca4f](https://github.com/googleapis/java-pubsub/commit/99aca4f3fd1792b02da78320bed39e53dc8af23c)) +* Make v1 the default protocolVersion ([#2623](https://github.com/googleapis/java-pubsub/issues/2623)) ([12f014d](https://github.com/googleapis/java-pubsub/commit/12f014d9030b2472e508fa75a71f43e671a64583)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.64.2 ([b4b7f83](https://github.com/googleapis/java-pubsub/commit/b4b7f839b2be1ce003667018a10d9c460e4b63b1)) + + +### Dependencies + +* Update actions/checkout action to v5 ([#2613](https://github.com/googleapis/java-pubsub/issues/2613)) ([a69ffdd](https://github.com/googleapis/java-pubsub/commit/a69ffdd9ecb5dae557a847ae7ec5c1a06431bef7)) +* Update actions/checkout action to v6 ([#2619](https://github.com/googleapis/java-pubsub/issues/2619)) ([6cd2bb6](https://github.com/googleapis/java-pubsub/commit/6cd2bb6e9c927dd192833efc7c3549dfa9c84f57)) +* Update dependency com.google.cloud:google-cloud-bigquery to v2.56.0 ([#2617](https://github.com/googleapis/java-pubsub/issues/2617)) ([13d5e3d](https://github.com/googleapis/java-pubsub/commit/13d5e3d8e4069a0e94db3cf825eb821d06cc9345)) +* Update dependency com.google.cloud:google-cloud-core to v2.62.1 ([#2608](https://github.com/googleapis/java-pubsub/issues/2608)) ([fee0500](https://github.com/googleapis/java-pubsub/commit/fee0500bf6a0e309ca5f162810e22a2ca4c5b7eb)) +* Update dependency com.google.cloud:google-cloud-core to v2.62.2 ([#2632](https://github.com/googleapis/java-pubsub/issues/2632)) ([2d567d1](https://github.com/googleapis/java-pubsub/commit/2d567d16f7f546586156e2e2ee17c433fbec5fc2)) +* Update dependency com.google.cloud:google-cloud-storage to v2.60.0 ([#2610](https://github.com/googleapis/java-pubsub/issues/2610)) ([1cae247](https://github.com/googleapis/java-pubsub/commit/1cae247322fff1b6588a4b523e601e41a4284c64)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.54.2 ([#2633](https://github.com/googleapis/java-pubsub/issues/2633)) ([5081aac](https://github.com/googleapis/java-pubsub/commit/5081aac1fc26fcaca004c730982d0e56ed36e32f)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.33.1 ([#2612](https://github.com/googleapis/java-pubsub/issues/2612)) ([e92debc](https://github.com/googleapis/java-pubsub/commit/e92debccf9e87971c2d9fee34baffb4b534f24a3)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.33.2 ([#2625](https://github.com/googleapis/java-pubsub/issues/2625)) ([900783f](https://github.com/googleapis/java-pubsub/commit/900783ff8b135b42088c37b48cdc1a7ee44d4e08)) + + +### Documentation + +* Add the IDENTIFIER field behavior annotation to fields of Cloud Pub/Sub methods that represent a specific identity and need to be sourced with additional care ([b4b7f83](https://github.com/googleapis/java-pubsub/commit/b4b7f839b2be1ce003667018a10d9c460e4b63b1)) + +## [1.143.1](https://github.com/googleapis/java-pubsub/compare/v1.143.0...v1.143.1) (2025-11-13) + + +### Bug Fixes + +* Deflake WaiterTest ([#2600](https://github.com/googleapis/java-pubsub/issues/2600)) ([298c8db](https://github.com/googleapis/java-pubsub/commit/298c8db04616341da040935636b1a04ce5f022a0)) +* **deps:** Update the Java code generator (gapic-generator-java) to 2.64.1 ([b210251](https://github.com/googleapis/java-pubsub/commit/b2102516bf833c2704c85cb348b67bb7cbfdb3a6)) + + +### Dependencies + +* Remove OpenTelemetry semconv dependency ([#2611](https://github.com/googleapis/java-pubsub/issues/2611)) ([240fc37](https://github.com/googleapis/java-pubsub/commit/240fc3784db3860eb2668946fbf861beed2647d7)) +* Update actions/checkout action to v5 ([#2592](https://github.com/googleapis/java-pubsub/issues/2592)) ([6ca466d](https://github.com/googleapis/java-pubsub/commit/6ca466d382ddde9780ae1c8627092d731e314f90)) +* Update dependency com.google.cloud:google-cloud-bigquery to v2.55.3 ([#2602](https://github.com/googleapis/java-pubsub/issues/2602)) ([d14106c](https://github.com/googleapis/java-pubsub/commit/d14106cc278c98d3f954f959e2dd3764ebd20fc2)) +* Update dependency com.google.cloud:google-cloud-core to v2.61.0 ([#2588](https://github.com/googleapis/java-pubsub/issues/2588)) ([244cf75](https://github.com/googleapis/java-pubsub/commit/244cf758bf46f8431a17b1d8e76d1d90c494fc76)) +* Update dependency com.google.cloud:google-cloud-storage to v2.59.0 ([#2603](https://github.com/googleapis/java-pubsub/issues/2603)) ([d9d05bf](https://github.com/googleapis/java-pubsub/commit/d9d05bfa18580cdacdfa9378d30b56ce0ae0d4d2)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.54.1 ([#2609](https://github.com/googleapis/java-pubsub/issues/2609)) ([c99373f](https://github.com/googleapis/java-pubsub/commit/c99373f2d25c6b9f1bcb6aace3c6625375310a16)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.33.0 ([#2587](https://github.com/googleapis/java-pubsub/issues/2587)) ([33724ce](https://github.com/googleapis/java-pubsub/commit/33724cef79e3f7e798c5ef222ee7dff3565555f8)) + +## [1.143.0](https://github.com/googleapis/java-pubsub/compare/v1.142.0...v1.143.0) (2025-10-20) + + +### Features + +* Annotate some resource fields with their corresponding API types ([ab60afa](https://github.com/googleapis/java-pubsub/commit/ab60afa012bd3fc81977ba24c416205ce9280943)) +* Implement SubscriberShutdownSettings ([#2569](https://github.com/googleapis/java-pubsub/issues/2569)) ([8195f6f](https://github.com/googleapis/java-pubsub/commit/8195f6fd3bbd33a178535994a94a79822ae2d4d6)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.63.0 ([ab60afa](https://github.com/googleapis/java-pubsub/commit/ab60afa012bd3fc81977ba24c416205ce9280943)) +* Update .OwlBot-hermetic.yaml to preserve SubscriberShutdownSettings files ([#2583](https://github.com/googleapis/java-pubsub/issues/2583)) ([f3cf5e7](https://github.com/googleapis/java-pubsub/commit/f3cf5e725c12173ade0275fd0526885309dc553a)) + + +### Dependencies + +* Update actions/checkout action to v5 ([#2576](https://github.com/googleapis/java-pubsub/issues/2576)) ([1375f6d](https://github.com/googleapis/java-pubsub/commit/1375f6d9a71c78d973a71f1df449640a95bc0bc7)) +* Update actions/checkout action to v5 ([#2584](https://github.com/googleapis/java-pubsub/issues/2584)) ([25059ce](https://github.com/googleapis/java-pubsub/commit/25059ce001e3273fcec9d1c40e3b09c89ddf487e)) +* Update dependency com.google.cloud:google-cloud-bigquery to v2.55.2 ([#2582](https://github.com/googleapis/java-pubsub/issues/2582)) ([d0f9673](https://github.com/googleapis/java-pubsub/commit/d0f96737a74453c3db54ee59e98d4b6636cd55d4)) +* Update dependency com.google.cloud:google-cloud-storage to v2.58.1 ([#2580](https://github.com/googleapis/java-pubsub/issues/2580)) ([d156cdb](https://github.com/googleapis/java-pubsub/commit/d156cdb27a8d68b6fa8c97f558df7088e6634320)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.53.0 ([#2589](https://github.com/googleapis/java-pubsub/issues/2589)) ([ce7cb09](https://github.com/googleapis/java-pubsub/commit/ce7cb09ac5e86953815e2ead9ae9202e9b034ba6)) + +## [1.142.0](https://github.com/googleapis/java-pubsub/compare/v1.141.5...v1.142.0) (2025-10-07) + + +### Features + +* Support the protocol version in StreamingPullRequest ([af40810](https://github.com/googleapis/java-pubsub/commit/af40810ea0668ce4e8c4d69bdbb4b281073976d0)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.62.3 ([af40810](https://github.com/googleapis/java-pubsub/commit/af40810ea0668ce4e8c4d69bdbb4b281073976d0)) + + +### Dependencies + +* Update actions/checkout action to v5 ([#2562](https://github.com/googleapis/java-pubsub/issues/2562)) ([b7fa499](https://github.com/googleapis/java-pubsub/commit/b7fa49968e85dfeba8a84ea29f8ddf9d33ef22c5)) +* Update actions/checkout action to v5 ([#2573](https://github.com/googleapis/java-pubsub/issues/2573)) ([4153dba](https://github.com/googleapis/java-pubsub/commit/4153dbacb386b130780c8d1e5596e3502af8e32b)) +* Update dependency com.google.cloud:google-cloud-bigquery to v2.55.1 ([#2566](https://github.com/googleapis/java-pubsub/issues/2566)) ([66c9ec4](https://github.com/googleapis/java-pubsub/commit/66c9ec4a26b76ca384dce71a8ab6bce8cd34b8a3)) +* Update dependency com.google.cloud:google-cloud-core to v2.60.2 ([#2557](https://github.com/googleapis/java-pubsub/issues/2557)) ([460bcd9](https://github.com/googleapis/java-pubsub/commit/460bcd9158e7058f710f43200b7b7737eb47839c)) +* Update dependency com.google.cloud:google-cloud-core to v2.60.3 ([#2571](https://github.com/googleapis/java-pubsub/issues/2571)) ([ac2c85a](https://github.com/googleapis/java-pubsub/commit/ac2c85ad62525aee236af54f6b5c9b1eacf4d22a)) +* Update dependency com.google.cloud:google-cloud-storage to v2.58.0 ([#2561](https://github.com/googleapis/java-pubsub/issues/2561)) ([0189388](https://github.com/googleapis/java-pubsub/commit/0189388edb4d618d65f33718922ca1b11f71cb15)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.52.3 ([#2572](https://github.com/googleapis/java-pubsub/issues/2572)) ([0785ee4](https://github.com/googleapis/java-pubsub/commit/0785ee490e858c104c420046e0098d81154ae273)) +* Update dependency org.assertj:assertj-core to v3.27.6 ([#2560](https://github.com/googleapis/java-pubsub/issues/2560)) ([c82766a](https://github.com/googleapis/java-pubsub/commit/c82766a9efb2bb4df01fb7fdcb35259db39e05c7)) + +## [1.141.5](https://github.com/googleapis/java-pubsub/compare/v1.141.4...v1.141.5) (2025-09-24) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.62.2 ([c02d304](https://github.com/googleapis/java-pubsub/commit/c02d304f5213410eda5f26fe98c96a5c1d4bf9d8)) + + +### Dependencies + +* Update actions/checkout action to v5 ([#2539](https://github.com/googleapis/java-pubsub/issues/2539)) ([83144e6](https://github.com/googleapis/java-pubsub/commit/83144e6d4110fbe15f4357270a292cfcbcc35dd6)) +* Update actions/github-script action to v8 ([#2542](https://github.com/googleapis/java-pubsub/issues/2542)) ([0e6f0da](https://github.com/googleapis/java-pubsub/commit/0e6f0daccfdca248b3b80ef7dfb0bd7a4baa607c)) +* Update dependency com.google.cloud:google-cloud-bigquery to v2.55.0 ([#2553](https://github.com/googleapis/java-pubsub/issues/2553)) ([15b9e66](https://github.com/googleapis/java-pubsub/commit/15b9e66f27cd6e57b808b96f3e15f08b1f0d7727)) +* Update dependency com.google.cloud:google-cloud-core to v2.60.1 ([#2543](https://github.com/googleapis/java-pubsub/issues/2543)) ([fbb45ce](https://github.com/googleapis/java-pubsub/commit/fbb45cee9e3740f8ac94b5fbaa65b97b8db09b1e)) +* Update dependency com.google.cloud:google-cloud-storage to v2.57.0 ([#2547](https://github.com/googleapis/java-pubsub/issues/2547)) ([133f8c7](https://github.com/googleapis/java-pubsub/commit/133f8c7995880c2d1e75b69d61c50254d4f9fede)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.52.2 ([#2558](https://github.com/googleapis/java-pubsub/issues/2558)) ([0623ac5](https://github.com/googleapis/java-pubsub/commit/0623ac54f735b076ccee165fc59a4a088309766a)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.32.1 ([#2551](https://github.com/googleapis/java-pubsub/issues/2551)) ([49722cb](https://github.com/googleapis/java-pubsub/commit/49722cb65e3b7cad01cf4389e1cf716a6ac1eb03)) +* Update googleapis/sdk-platform-java action to v2.62.2 ([#2559](https://github.com/googleapis/java-pubsub/issues/2559)) ([3f1d901](https://github.com/googleapis/java-pubsub/commit/3f1d90186899efe035179363408979a372e85a56)) + +## [1.141.4](https://github.com/googleapis/java-pubsub/compare/v1.141.3...v1.141.4) (2025-09-11) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.62.1 ([ac08d5f](https://github.com/googleapis/java-pubsub/commit/ac08d5f6ead8071ab0e068e32fd5ae0ae2731c34)) + + +### Dependencies + +* Update actions/checkout action to v5 ([#2531](https://github.com/googleapis/java-pubsub/issues/2531)) ([f687f11](https://github.com/googleapis/java-pubsub/commit/f687f117fc435ee8b1f15b8802ecc989f1e2747e)) +* Update actions/setup-java action to v5 ([#2535](https://github.com/googleapis/java-pubsub/issues/2535)) ([2ed87d2](https://github.com/googleapis/java-pubsub/commit/2ed87d2b7e28af99cfda00b4b69fb5cb2f448584)) +* Update dependency com.google.cloud:google-cloud-bigquery to v2.54.2 ([#2538](https://github.com/googleapis/java-pubsub/issues/2538)) ([10a8283](https://github.com/googleapis/java-pubsub/commit/10a8283292e58b0c73b9c57ff36ddd71b8b83467)) +* Update dependency com.google.cloud:google-cloud-storage to v2.56.0 ([#2536](https://github.com/googleapis/java-pubsub/issues/2536)) ([80d9ca1](https://github.com/googleapis/java-pubsub/commit/80d9ca10d3a2656852422858f032bb6629102cfb)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.52.1 ([#2544](https://github.com/googleapis/java-pubsub/issues/2544)) ([9fe7550](https://github.com/googleapis/java-pubsub/commit/9fe75506eedf42f31b95ddf2699cf332334caf0d)) +* Update googleapis/sdk-platform-java action to v2.62.1 ([#2545](https://github.com/googleapis/java-pubsub/issues/2545)) ([17f28ef](https://github.com/googleapis/java-pubsub/commit/17f28ef853a21303346a305e4d8e9b63a916edc7)) + +## [1.141.3](https://github.com/googleapis/java-pubsub/compare/v1.141.2...v1.141.3) (2025-08-19) + + +### Bug Fixes + +* Use the system executor instead of a separate thread pool for EOD ack/modack callbacks ([#2526](https://github.com/googleapis/java-pubsub/issues/2526)) ([ffeb017](https://github.com/googleapis/java-pubsub/commit/ffeb017a58ca486688105738f180d70df33a74de)) + + +### Dependencies + +* Update actions/checkout action to v5 ([#2520](https://github.com/googleapis/java-pubsub/issues/2520)) ([409398a](https://github.com/googleapis/java-pubsub/commit/409398a40f71866d5a84b4542d582777ee240a08)) +* Update dependency com.google.cloud:google-cloud-bigquery to v2.54.1 ([#2523](https://github.com/googleapis/java-pubsub/issues/2523)) ([0678a74](https://github.com/googleapis/java-pubsub/commit/0678a74dc22f73cd8ec8c4893c1a8dd60449b128)) +* Update dependency com.google.cloud:google-cloud-core to v2.60.0 ([#2527](https://github.com/googleapis/java-pubsub/issues/2527)) ([0166e21](https://github.com/googleapis/java-pubsub/commit/0166e21012f0bc2ccb2e832d6f27e60ad3382456)) +* Update dependency com.google.cloud:google-cloud-storage to v2.55.0 ([#2517](https://github.com/googleapis/java-pubsub/issues/2517)) ([b67acf1](https://github.com/googleapis/java-pubsub/commit/b67acf1294249be308568f49f287897ae55ced08)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.52.0 ([#2528](https://github.com/googleapis/java-pubsub/issues/2528)) ([e424d11](https://github.com/googleapis/java-pubsub/commit/e424d11ffe0fbe242c59dec44ac1af2f9bd80173)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.32.0 ([#2524](https://github.com/googleapis/java-pubsub/issues/2524)) ([44ff087](https://github.com/googleapis/java-pubsub/commit/44ff0873171f8fe2e7cd79b4550f8ec94ea2c99a)) +* Update dependency org.assertj:assertj-core to v3.27.4 ([#2518](https://github.com/googleapis/java-pubsub/issues/2518)) ([67695bc](https://github.com/googleapis/java-pubsub/commit/67695bc50eafc475866eb6c300b3359083ecfe00)) + +## [1.141.2](https://github.com/googleapis/java-pubsub/compare/v1.141.1...v1.141.2) (2025-08-05) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.61.0 ([42eb599](https://github.com/googleapis/java-pubsub/commit/42eb5992557457a5ae4512334267113266c220ac)) +* Use a separate cached thread pool for handling ack and modack response callback for EOD-enabled subscriptions ([#2505](https://github.com/googleapis/java-pubsub/issues/2505)) ([224c269](https://github.com/googleapis/java-pubsub/commit/224c269e3bd0ae4cfc4b24ac85495911b8e2b90c)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.54.0 ([#2506](https://github.com/googleapis/java-pubsub/issues/2506)) ([6bf8e62](https://github.com/googleapis/java-pubsub/commit/6bf8e62b1144568292e832dc8031a70a2c5b9ad7)) +* Update dependency com.google.cloud:google-cloud-core to v2.59.0 ([#2507](https://github.com/googleapis/java-pubsub/issues/2507)) ([070cf07](https://github.com/googleapis/java-pubsub/commit/070cf07b1d529c34d4f633b37ce1d35d14768325)) +* Update dependency com.google.cloud:google-cloud-storage to v2.54.0 ([#2510](https://github.com/googleapis/java-pubsub/issues/2510)) ([0fd589e](https://github.com/googleapis/java-pubsub/commit/0fd589e2ee80730b442f569b770fe16208feb4ba)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.51.0 ([#2508](https://github.com/googleapis/java-pubsub/issues/2508)) ([a7be2a7](https://github.com/googleapis/java-pubsub/commit/a7be2a74327499b1acb2fe159e6f7465d6c8f798)) +* Update googleapis/sdk-platform-java action to v2.61.0 ([#2509](https://github.com/googleapis/java-pubsub/issues/2509)) ([32df6b6](https://github.com/googleapis/java-pubsub/commit/32df6b694f9aee2cf7132c2d817f9736d69060f3)) + +## [1.141.1](https://github.com/googleapis/java-pubsub/compare/v1.141.0...v1.141.1) (2025-07-28) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.60.2 ([7afae21](https://github.com/googleapis/java-pubsub/commit/7afae21e5e3df16742646363ca199ec14c42bc21)) +* Remove element_count_limit and request_byte_limit from pubsub_gapic.yaml ([7afae21](https://github.com/googleapis/java-pubsub/commit/7afae21e5e3df16742646363ca199ec14c42bc21)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.53.0 ([#2489](https://github.com/googleapis/java-pubsub/issues/2489)) ([5a454b9](https://github.com/googleapis/java-pubsub/commit/5a454b9c36419dcfaf79edb1ec1d066b20836f87)) +* Update dependency com.google.cloud:google-cloud-core to v2.58.2 ([#2493](https://github.com/googleapis/java-pubsub/issues/2493)) ([9a1c17e](https://github.com/googleapis/java-pubsub/commit/9a1c17e50e5fc9a807532d289a7f6e8b5d412f59)) +* Update dependency com.google.cloud:google-cloud-storage to v2.53.3 ([#2486](https://github.com/googleapis/java-pubsub/issues/2486)) ([9416cc9](https://github.com/googleapis/java-pubsub/commit/9416cc99f826b80412b0e5eba0068a35b82390c6)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.50.2 ([#2494](https://github.com/googleapis/java-pubsub/issues/2494)) ([9f73ef0](https://github.com/googleapis/java-pubsub/commit/9f73ef0dcaabb4a536741336eb6cfc6601b75f65)) +* Update dependency org.xerial.snappy:snappy-java to v1.1.10.8 ([#2492](https://github.com/googleapis/java-pubsub/issues/2492)) ([a55e214](https://github.com/googleapis/java-pubsub/commit/a55e214ffad8371eb82a1d49b8b1eadcacf15392)) + +## [1.141.0](https://github.com/googleapis/java-pubsub/compare/v1.140.2...v1.141.0) (2025-07-11) + + +### Features + +* Add MessageTransformationFailureReason to IngestionFailureEvent ([8271399](https://github.com/googleapis/java-pubsub/commit/8271399cc6348f69ba034b676cce2aa7592122a4)) +* Next release from main branch is 1.141.0 ([#2481](https://github.com/googleapis/java-pubsub/issues/2481)) ([bd9f385](https://github.com/googleapis/java-pubsub/commit/bd9f3850efa77ce759b4f281aecd9645666cb0f7)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.60.1 ([c9ef2cd](https://github.com/googleapis/java-pubsub/commit/c9ef2cda2c6ad20d5e57fe3ccf69f845f7ef36b7)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.52.0 ([#2467](https://github.com/googleapis/java-pubsub/issues/2467)) ([fe08a6f](https://github.com/googleapis/java-pubsub/commit/fe08a6f1f6ee18e97c752f82786016999f6ab12c)) +* Update dependency com.google.cloud:google-cloud-core to v2.58.1 ([#2476](https://github.com/googleapis/java-pubsub/issues/2476)) ([96a2354](https://github.com/googleapis/java-pubsub/commit/96a23544fce609c7b19a00638a767926c304d3f8)) +* Update dependency com.google.cloud:google-cloud-storage to v2.53.2 ([#2469](https://github.com/googleapis/java-pubsub/issues/2469)) ([fa51a01](https://github.com/googleapis/java-pubsub/commit/fa51a01ed39393b7cad25fb39a1c87099def830a)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.50.1 ([#2477](https://github.com/googleapis/java-pubsub/issues/2477)) ([e1657cb](https://github.com/googleapis/java-pubsub/commit/e1657cbeae5f2c3c9680ef6b5ff2b1ea5549f4ba)) +* Update googleapis/sdk-platform-java action to v2.60.0 ([#2471](https://github.com/googleapis/java-pubsub/issues/2471)) ([2b0e8e0](https://github.com/googleapis/java-pubsub/commit/2b0e8e0b58432f0975c15d0d01f185dc81de6caf)) +* Update googleapis/sdk-platform-java action to v2.60.1 ([#2475](https://github.com/googleapis/java-pubsub/issues/2475)) ([e7c0b5d](https://github.com/googleapis/java-pubsub/commit/e7c0b5d44f0ad53adfac6ec26572baad54d04dee)) + +## [1.140.2](https://github.com/googleapis/java-pubsub/compare/v1.140.1...v1.140.2) (2025-06-25) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.51.0 ([#2457](https://github.com/googleapis/java-pubsub/issues/2457)) ([d74215a](https://github.com/googleapis/java-pubsub/commit/d74215a6f1e641ba75997e2e43bef348fb9c4a3c)) +* Update dependency com.google.cloud:google-cloud-core to v2.58.0 ([#2443](https://github.com/googleapis/java-pubsub/issues/2443)) ([d4599d9](https://github.com/googleapis/java-pubsub/commit/d4599d93b780b6ef20ad44582aeb8c1cd35f99d4)) +* Update dependency com.google.cloud:google-cloud-storage to v2.53.1 ([#2452](https://github.com/googleapis/java-pubsub/issues/2452)) ([b4af237](https://github.com/googleapis/java-pubsub/commit/b4af2370bb875ee8d0047f67a72e8c6d62547a12)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.50.0 ([#2461](https://github.com/googleapis/java-pubsub/issues/2461)) ([715916a](https://github.com/googleapis/java-pubsub/commit/715916aeedbe696b9c4b922e4fb2bbf76f8b201a)) +* Update dependency com.google.cloud.opentelemetry:exporter-trace to v0.36.0 ([#2440](https://github.com/googleapis/java-pubsub/issues/2440)) ([50a3eb9](https://github.com/googleapis/java-pubsub/commit/50a3eb9276b4711b8161a021d055238abc0e20de)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.31.1 ([#2442](https://github.com/googleapis/java-pubsub/issues/2442)) ([a0be1bb](https://github.com/googleapis/java-pubsub/commit/a0be1bbe601575f05fb00f6d616b51de8f23238d)) +* Update dependency org.easymock:easymock to v5.6.0 ([#2069](https://github.com/googleapis/java-pubsub/issues/2069)) ([5f144a4](https://github.com/googleapis/java-pubsub/commit/5f144a461c6749ec7e2cf900399f386094451244)) +* Update googleapis/sdk-platform-java action to v2.60.0 ([#2462](https://github.com/googleapis/java-pubsub/issues/2462)) ([ee8e5c7](https://github.com/googleapis/java-pubsub/commit/ee8e5c7166f2ac4eb706241e42f4ce84afcc2668)) +* Update googleapis/sdk-platform-java action to v2.60.0 ([#2464](https://github.com/googleapis/java-pubsub/issues/2464)) ([7a0af37](https://github.com/googleapis/java-pubsub/commit/7a0af37c01e747d8f40145b7b4438eaadab9e01a)) + +## [1.140.1](https://github.com/googleapis/java-pubsub/compare/v1.140.0...v1.140.1) (2025-06-05) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.59.0 ([0eece50](https://github.com/googleapis/java-pubsub/commit/0eece5012fbaf887a5c062beba433dbb30edbf43)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.49.0 ([#2448](https://github.com/googleapis/java-pubsub/issues/2448)) ([d89a14d](https://github.com/googleapis/java-pubsub/commit/d89a14d6569fc914d877cc24d66c42684a812eba)) + +## [1.140.0](https://github.com/googleapis/java-pubsub/compare/v1.139.4...v1.140.0) (2025-06-03) + + +### Features + +* Add SchemaViolationReason to IngestionFailureEvent ([21cc376](https://github.com/googleapis/java-pubsub/commit/21cc3764aaa6fc05eb4a5078a72dae30694fba91)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.50.1 ([#2435](https://github.com/googleapis/java-pubsub/issues/2435)) ([b37c557](https://github.com/googleapis/java-pubsub/commit/b37c5573e1d0d7eada4ce4ec6a052521ea11cff1)) +* Update dependency com.google.cloud:google-cloud-storage to v2.52.3 ([#2436](https://github.com/googleapis/java-pubsub/issues/2436)) ([4f309d1](https://github.com/googleapis/java-pubsub/commit/4f309d151d4bd584a33a0bb8882d0614a1b9d533)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.49.0 ([#2444](https://github.com/googleapis/java-pubsub/issues/2444)) ([a59135c](https://github.com/googleapis/java-pubsub/commit/a59135c6859d0aa5c247a6a1f60872c959123cc7)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.49.0 ([#2446](https://github.com/googleapis/java-pubsub/issues/2446)) ([6434be1](https://github.com/googleapis/java-pubsub/commit/6434be16560fdc8797b7c930b06df38c0972c96c)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.31.0 ([#2430](https://github.com/googleapis/java-pubsub/issues/2430)) ([232fac1](https://github.com/googleapis/java-pubsub/commit/232fac1c47e0d3680dcc8d56b69d65ed0d379dde)) +* Update googleapis/sdk-platform-java action to v2.59.0 ([#2445](https://github.com/googleapis/java-pubsub/issues/2445)) ([12d4cfb](https://github.com/googleapis/java-pubsub/commit/12d4cfb7d67dbb163b3a545ea2ebae450e88283d)) + + +### Documentation + +* **sample:** Update the subscribe with error listener and subscribe with exactly-once samples ([#2437](https://github.com/googleapis/java-pubsub/issues/2437)) ([17c142b](https://github.com/googleapis/java-pubsub/commit/17c142b20efb79f9c71fc6306cb3ee4e15c5e06f)) + +## [1.139.4](https://github.com/googleapis/java-pubsub/compare/v1.139.3...v1.139.4) (2025-05-15) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.57.0 ([017eb0f](https://github.com/googleapis/java-pubsub/commit/017eb0f78423fde3edd42a07677df49512085633)) +* **deps:** Update the Java code generator (gapic-generator-java) to 2.58.0 ([3713edb](https://github.com/googleapis/java-pubsub/commit/3713edb9420f792b7c7ad4e430ca05b5942656ff)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.50.0 ([#2422](https://github.com/googleapis/java-pubsub/issues/2422)) ([993b2d0](https://github.com/googleapis/java-pubsub/commit/993b2d06ce6b45bb72faa9d6959cddc14a9cf60e)) +* Update dependency com.google.cloud:google-cloud-core to v2.55.0 ([#2413](https://github.com/googleapis/java-pubsub/issues/2413)) ([3e181e7](https://github.com/googleapis/java-pubsub/commit/3e181e7c4469eadcf6f148ee0a30aae1cfa825f3)) +* Update dependency com.google.cloud:google-cloud-core to v2.56.0 ([#2427](https://github.com/googleapis/java-pubsub/issues/2427)) ([b2a3e35](https://github.com/googleapis/java-pubsub/commit/b2a3e35ced2d1715c37207f98740889635326dc1)) +* Update dependency com.google.cloud:google-cloud-storage to v2.52.2 ([#2421](https://github.com/googleapis/java-pubsub/issues/2421)) ([1224ee5](https://github.com/googleapis/java-pubsub/commit/1224ee51da27e447560076b0d51ba90515566bd9)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.47.0 ([#2418](https://github.com/googleapis/java-pubsub/issues/2418)) ([5f87661](https://github.com/googleapis/java-pubsub/commit/5f876612eb4a54faec3af2c9043aec0adf51e2ec)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.48.0 ([#2428](https://github.com/googleapis/java-pubsub/issues/2428)) ([cfa91fa](https://github.com/googleapis/java-pubsub/commit/cfa91fa0e85f3f1e517627da3e5befcd46f0803a)) +* Update dependency com.google.cloud.opentelemetry:exporter-trace to v0.34.0 ([#2376](https://github.com/googleapis/java-pubsub/issues/2376)) ([06768cd](https://github.com/googleapis/java-pubsub/commit/06768cd1ac86ae7ae7b91b020cc174b4423e1b9a)) + + +### Documentation + +* **sample:** Add samples for topic and subscription SMTs ([#2388](https://github.com/googleapis/java-pubsub/issues/2388)) ([f35de28](https://github.com/googleapis/java-pubsub/commit/f35de28396fda595e6ea68c1755a4253d6b097d6)) + +## [1.139.3](https://github.com/googleapis/java-pubsub/compare/v1.139.2...v1.139.3) (2025-05-06) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.47.0 ([#2414](https://github.com/googleapis/java-pubsub/issues/2414)) ([d78823f](https://github.com/googleapis/java-pubsub/commit/d78823ffc93307c14f44e992cf13e926880fbe94)) +* Update googleapis/sdk-platform-java action to v2.57.0 ([#2415](https://github.com/googleapis/java-pubsub/issues/2415)) ([1ddf9b8](https://github.com/googleapis/java-pubsub/commit/1ddf9b81e432aeb9af9e6b8bb2d2e9786159faba)) + +## [1.139.2](https://github.com/googleapis/java-pubsub/compare/v1.139.1...v1.139.2) (2025-05-05) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.56.3 ([2b928a8](https://github.com/googleapis/java-pubsub/commit/2b928a8a946ebf84470bd2e2bb064b52c4f11ea2)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.49.2 ([#2399](https://github.com/googleapis/java-pubsub/issues/2399)) ([ff48708](https://github.com/googleapis/java-pubsub/commit/ff4870815864a6216a1ce4b606fcec3df7f58fd4)) +* Update dependency com.google.cloud:google-cloud-core to v2.54.3 ([#2393](https://github.com/googleapis/java-pubsub/issues/2393)) ([0ffa26a](https://github.com/googleapis/java-pubsub/commit/0ffa26ac3abceabcfba5d57cdb36f27f5a164ce3)) +* Update dependency com.google.cloud:google-cloud-storage to v2.52.1 ([#2396](https://github.com/googleapis/java-pubsub/issues/2396)) ([283a6e1](https://github.com/googleapis/java-pubsub/commit/283a6e14f61764c210ed23f4ada23ad21bbdb306)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.46.3 ([#2406](https://github.com/googleapis/java-pubsub/issues/2406)) ([8963ed0](https://github.com/googleapis/java-pubsub/commit/8963ed0acbe8bf3a110a05ced27979f102cd3035)) + +## [1.139.1](https://github.com/googleapis/java-pubsub/compare/v1.139.0...v1.139.1) (2025-04-25) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.46.2 ([#2394](https://github.com/googleapis/java-pubsub/issues/2394)) ([17f7fd7](https://github.com/googleapis/java-pubsub/commit/17f7fd77553a7ccd55029edb74829f1fe86a680c)) + +## [1.139.0](https://github.com/googleapis/java-pubsub/compare/v1.138.0...v1.139.0) (2025-04-25) + + +### Features + +* Generate renamed go pubsub admin clients ([4472d7b](https://github.com/googleapis/java-pubsub/commit/4472d7baff4894a7c5cf0efc7eadd83ec8801d7a)) + + +### Bug Fixes + +* Add retries for ack and modack operations that don't return with a metadata map ([#2385](https://github.com/googleapis/java-pubsub/issues/2385)) ([00070b7](https://github.com/googleapis/java-pubsub/commit/00070b74e54fcb62b91a4d72a88d3b20b2425a94)) +* **deps:** Update the Java code generator (gapic-generator-java) to 2.56.2 ([4472d7b](https://github.com/googleapis/java-pubsub/commit/4472d7baff4894a7c5cf0efc7eadd83ec8801d7a)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.49.0 ([#2380](https://github.com/googleapis/java-pubsub/issues/2380)) ([405e485](https://github.com/googleapis/java-pubsub/commit/405e485bbe503357a0616ec72de8fea00cb91c9c)) +* Update dependency com.google.cloud:google-cloud-core to v2.53.1 ([#2365](https://github.com/googleapis/java-pubsub/issues/2365)) ([748058f](https://github.com/googleapis/java-pubsub/commit/748058fc018e3a36dedd576404037bf8c016c794)) +* Update dependency com.google.cloud:google-cloud-storage to v2.50.0 ([#2372](https://github.com/googleapis/java-pubsub/issues/2372)) ([b81164a](https://github.com/googleapis/java-pubsub/commit/b81164aa5682c8046ebfa44e1e47579e4c3fcd28)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.30.1 ([#2364](https://github.com/googleapis/java-pubsub/issues/2364)) ([05eb9c0](https://github.com/googleapis/java-pubsub/commit/05eb9c0ce5179ff9e8656544258adc02a59336e5)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.30.2 ([#2383](https://github.com/googleapis/java-pubsub/issues/2383)) ([4119cc0](https://github.com/googleapis/java-pubsub/commit/4119cc03895873f94ddef10850753fb59384a8fc)) + + +### Documentation + +* Update documentation for JavaScriptUDF to indicate that the `message_id` metadata field is optional instead of required ([f904786](https://github.com/googleapis/java-pubsub/commit/f904786f87e80cdc09bba947cd53e42dffb7132e)) + +## [1.138.0](https://github.com/googleapis/java-pubsub/compare/v1.137.1...v1.138.0) (2025-03-14) + + +### Features + +* Deprecate `enabled` field for message transforms and add `disabled` field ([76b2a3d](https://github.com/googleapis/java-pubsub/commit/76b2a3dc1f001dfeb3f8974a4cc4de843b7383bc)) +* Next release from main branch is 1.138.0 ([#2361](https://github.com/googleapis/java-pubsub/issues/2361)) ([b6ba56c](https://github.com/googleapis/java-pubsub/commit/b6ba56c04619660d2660a660eaacbda7de9f8608)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.55.1 ([76b2a3d](https://github.com/googleapis/java-pubsub/commit/76b2a3dc1f001dfeb3f8974a4cc4de843b7383bc)) +* Prevent excessive string parsing when publishing and receiving messages to improve performance ([#2317](https://github.com/googleapis/java-pubsub/issues/2317)) ([07b1350](https://github.com/googleapis/java-pubsub/commit/07b135001b4726c9bafafe90c80d369f25f04956)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.48.1 ([#2356](https://github.com/googleapis/java-pubsub/issues/2356)) ([7d3d2e4](https://github.com/googleapis/java-pubsub/commit/7d3d2e4690539ebbe7ab521c2c345b06cba766ea)) +* Update dependency com.google.cloud:google-cloud-storage to v2.49.0 ([#2358](https://github.com/googleapis/java-pubsub/issues/2358)) ([81d3435](https://github.com/googleapis/java-pubsub/commit/81d34352d332ee9c4935e7908b6b9a2383d3a8ba)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.45.1 ([#2366](https://github.com/googleapis/java-pubsub/issues/2366)) ([15899d1](https://github.com/googleapis/java-pubsub/commit/15899d127131747c51c71c94d66ff581f70278f3)) +* Update googleapis/sdk-platform-java action to v2.55.1 ([#2367](https://github.com/googleapis/java-pubsub/issues/2367)) ([de6f84a](https://github.com/googleapis/java-pubsub/commit/de6f84a43a27e954c0dc635158c43c5db4d07dfa)) + +## [1.137.1](https://github.com/googleapis/java-pubsub/compare/v1.137.0...v1.137.1) (2025-02-26) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.54.0 ([ccf670f](https://github.com/googleapis/java-pubsub/commit/ccf670f9dc755770d40b9d1bf2c870c0452aa39e)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.48.0 ([#2343](https://github.com/googleapis/java-pubsub/issues/2343)) ([3bbd7e1](https://github.com/googleapis/java-pubsub/commit/3bbd7e1e812a7a00cfff36a0c1d8a5212d4e134a)) +* Update dependency com.google.cloud:google-cloud-core to v2.52.0 ([#2348](https://github.com/googleapis/java-pubsub/issues/2348)) ([f0977b4](https://github.com/googleapis/java-pubsub/commit/f0977b40479823ce5b7e90f864261f11115610ca)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.44.0 ([#2349](https://github.com/googleapis/java-pubsub/issues/2349)) ([90ed10b](https://github.com/googleapis/java-pubsub/commit/90ed10b474f7a59286365d8a6ad676d9a4f4113b)) +* Update googleapis/sdk-platform-java action to v2.54.0 ([#2347](https://github.com/googleapis/java-pubsub/issues/2347)) ([ac8db2d](https://github.com/googleapis/java-pubsub/commit/ac8db2dda6cd5f0bdf689052bb37cb2eaab08c46)) + +## [1.137.0](https://github.com/googleapis/java-pubsub/compare/v1.136.1...v1.137.0) (2025-02-12) + + +### Features + +* Add support for message transforms to Topic and Subscription ([3889a05](https://github.com/googleapis/java-pubsub/commit/3889a05a5c5d7479d3cc6b6dc0b0c425d41efd5d)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.53.0 ([b952e58](https://github.com/googleapis/java-pubsub/commit/b952e5826748bc680936a79b14d75f5873e6db06)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.47.0 ([#2331](https://github.com/googleapis/java-pubsub/issues/2331)) ([216feef](https://github.com/googleapis/java-pubsub/commit/216feef976595cd03e282f8d8effa2ac8430c419)) +* Update dependency com.google.cloud:google-cloud-core to v2.51.0 ([#2338](https://github.com/googleapis/java-pubsub/issues/2338)) ([ac2403e](https://github.com/googleapis/java-pubsub/commit/ac2403ecd21aad0d44c5b06fce2853f9a433adbd)) +* Update dependency com.google.cloud:google-cloud-storage to v2.48.1 ([#2332](https://github.com/googleapis/java-pubsub/issues/2332)) ([23fd7a8](https://github.com/googleapis/java-pubsub/commit/23fd7a8f4ab2438b72f3a6da5613f5deb0ac307e)) +* Update dependency com.google.cloud:google-cloud-storage to v2.48.2 ([#2341](https://github.com/googleapis/java-pubsub/issues/2341)) ([eeb99a9](https://github.com/googleapis/java-pubsub/commit/eeb99a997fa2e7154dcc228b964ff47867738122)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.43.0 ([#2336](https://github.com/googleapis/java-pubsub/issues/2336)) ([996f4eb](https://github.com/googleapis/java-pubsub/commit/996f4ebdfa6b5cb38dbe37d4be981ca7d941bc0d)) + + +### Documentation + +* A comment for field `code` in message `.google.pubsub.v1.JavaScriptUDF` is changed ([3889a05](https://github.com/googleapis/java-pubsub/commit/3889a05a5c5d7479d3cc6b6dc0b0c425d41efd5d)) + +## [1.136.1](https://github.com/googleapis/java-pubsub/compare/v1.136.0...v1.136.1) (2025-01-28) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.52.0 ([0d8c8bf](https://github.com/googleapis/java-pubsub/commit/0d8c8bffc85804d5a64ec0d35893ad9e0062807e)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.46.0 ([#2309](https://github.com/googleapis/java-pubsub/issues/2309)) ([97bd44e](https://github.com/googleapis/java-pubsub/commit/97bd44e04c440320e45c2b4336677d8d266a39a2)) +* Update dependency com.google.cloud:google-cloud-core to v2.49.1 ([#2300](https://github.com/googleapis/java-pubsub/issues/2300)) ([cf2822b](https://github.com/googleapis/java-pubsub/commit/cf2822b7363e13e4730753cbb5ca3510c77f5f55)) +* Update dependency com.google.cloud:google-cloud-core to v2.50.0 ([#2321](https://github.com/googleapis/java-pubsub/issues/2321)) ([5c40bcd](https://github.com/googleapis/java-pubsub/commit/5c40bcd4d401d919b990e6a7d3151660ead76eb0)) +* Update dependency com.google.cloud:google-cloud-storage to v2.47.0 ([#2303](https://github.com/googleapis/java-pubsub/issues/2303)) ([707f842](https://github.com/googleapis/java-pubsub/commit/707f84271559dfe96fa11edffb307df145ceea47)) +* Update dependency com.google.cloud:google-cloud-storage to v2.48.0 ([#2322](https://github.com/googleapis/java-pubsub/issues/2322)) ([93b9419](https://github.com/googleapis/java-pubsub/commit/93b9419d210cedeab03f408dab4c74c9fcf18b59)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.42.0 ([#2324](https://github.com/googleapis/java-pubsub/issues/2324)) ([84e8562](https://github.com/googleapis/java-pubsub/commit/84e856250867b2441cceed2315c312bd661c353c)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.29.3 ([#2302](https://github.com/googleapis/java-pubsub/issues/2302)) ([9e90e2c](https://github.com/googleapis/java-pubsub/commit/9e90e2ca26b2aea48563859358dde84640eb40d0)) +* Update dependency org.assertj:assertj-core to v3.27.3 ([#2313](https://github.com/googleapis/java-pubsub/issues/2313)) ([5e80b57](https://github.com/googleapis/java-pubsub/commit/5e80b57d2ffd58e6a0bb9f5e0e78bb46d6fe2530)) +* Update googleapis/sdk-platform-java action to v2.52.0 ([#2320](https://github.com/googleapis/java-pubsub/issues/2320)) ([01dd3de](https://github.com/googleapis/java-pubsub/commit/01dd3deaef392aa51c60d28c1f3cbb81bff2a5cb)) + + +### Documentation + +* Add samples and tests for ingestion from Kafka sources ([#2315](https://github.com/googleapis/java-pubsub/issues/2315)) ([eea603b](https://github.com/googleapis/java-pubsub/commit/eea603ba3f05be85d58a69cd5c3469e2088a7446)) + +## [1.136.0](https://github.com/googleapis/java-pubsub/compare/v1.135.0...v1.136.0) (2025-01-10) + + +### Features + +* Add Kafka-based sources to IngestionDataSourceSettings proto and IngestionFailureEvent proto ([2947169](https://github.com/googleapis/java-pubsub/commit/2947169c009fa553202bc1e44276cf5a7954cd96)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.51.1 ([9c166f7](https://github.com/googleapis/java-pubsub/commit/9c166f76db78b0c6b2e0218460d5c0336102717a)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.45.0 ([#2292](https://github.com/googleapis/java-pubsub/issues/2292)) ([79a8982](https://github.com/googleapis/java-pubsub/commit/79a89823c6cbcc9a718f44856040b1525863cab6)) +* Update dependency com.google.cloud:google-cloud-storage to v2.46.0 ([#2291](https://github.com/googleapis/java-pubsub/issues/2291)) ([7b60884](https://github.com/googleapis/java-pubsub/commit/7b60884cc4e17df616155f7530a056c4c5e3af29)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.41.1 ([#2301](https://github.com/googleapis/java-pubsub/issues/2301)) ([53c1a8a](https://github.com/googleapis/java-pubsub/commit/53c1a8abdd3114e0f432b3b6618133fb93e44636)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.29.2 ([#2294](https://github.com/googleapis/java-pubsub/issues/2294)) ([48d4ac1](https://github.com/googleapis/java-pubsub/commit/48d4ac1ab2f0b9f9005292977c288f55322dd16a)) +* Update dependency org.assertj:assertj-core to v3.27.2 ([#2296](https://github.com/googleapis/java-pubsub/issues/2296)) ([e5b68a5](https://github.com/googleapis/java-pubsub/commit/e5b68a563aa6ebb2bd69665624fc7fc6aef50b64)) +* Update googleapis/sdk-platform-java action to v2.51.1 ([#2298](https://github.com/googleapis/java-pubsub/issues/2298)) ([16e0144](https://github.com/googleapis/java-pubsub/commit/16e0144d83c149b60e7b8fca6c4e61546d93462f)) + +## [1.135.0](https://github.com/googleapis/java-pubsub/compare/v1.134.2...v1.135.0) (2024-12-12) + + +### Features + +* Introduce `java.time` variables and methods ([#2271](https://github.com/googleapis/java-pubsub/issues/2271)) ([7edfd9c](https://github.com/googleapis/java-pubsub/commit/7edfd9c315405c7703509fb9b7bc4f0d2686d870)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.51.0 ([0b0d52c](https://github.com/googleapis/java-pubsub/commit/0b0d52c8fca179a913a8b04d76b44748f1886f45)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.44.0 ([#2270](https://github.com/googleapis/java-pubsub/issues/2270)) ([a5f70a9](https://github.com/googleapis/java-pubsub/commit/a5f70a9c2397a2c8f4642729922b742a3df01ed6)) +* Update dependency com.google.cloud:google-cloud-core to v2.48.0 ([#2263](https://github.com/googleapis/java-pubsub/issues/2263)) ([d7e5588](https://github.com/googleapis/java-pubsub/commit/d7e55886b62826f54f0bb12a6bfa4ef67dee6521)) +* Update dependency com.google.cloud:google-cloud-core to v2.49.0 ([#2285](https://github.com/googleapis/java-pubsub/issues/2285)) ([cd94a19](https://github.com/googleapis/java-pubsub/commit/cd94a1987271eea4d7744286a7daeb071bb9456a)) +* Update dependency com.google.cloud:google-cloud-storage to v2.45.0 ([#2268](https://github.com/googleapis/java-pubsub/issues/2268)) ([80a09e6](https://github.com/googleapis/java-pubsub/commit/80a09e69111229080c413eff8426bd0b3d50458d)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.41.0 ([#2286](https://github.com/googleapis/java-pubsub/issues/2286)) ([0c0a1b9](https://github.com/googleapis/java-pubsub/commit/0c0a1b9231953e5c9878e0dfcf5a55d01794f6c4)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.29.0 ([#2276](https://github.com/googleapis/java-pubsub/issues/2276)) ([54ef88d](https://github.com/googleapis/java-pubsub/commit/54ef88d7f822d8130717e3be9bcf7fe9901d6cb0)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.29.1 ([#2279](https://github.com/googleapis/java-pubsub/issues/2279)) ([de3c9e1](https://github.com/googleapis/java-pubsub/commit/de3c9e1c7f2fe6413d0ae7a18955f16611df95c6)) +* Update googleapis/sdk-platform-java action to v2.51.0 ([#2284](https://github.com/googleapis/java-pubsub/issues/2284)) ([0be820e](https://github.com/googleapis/java-pubsub/commit/0be820e2044253bf484d88d703ce2dfade7aa137)) + + +### Documentation + +* Fix repository URL in samples README ([#2280](https://github.com/googleapis/java-pubsub/issues/2280)) ([8aeff1a](https://github.com/googleapis/java-pubsub/commit/8aeff1a375f3aa989d2c4bde0ed3dd2f329601fc)) + ## [1.134.2](https://github.com/googleapis/java-pubsub/compare/v1.134.1...v1.134.2) (2024-11-18) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b65dd279c..ff092b68e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -84,7 +84,7 @@ Code in this repo is formatted with [google-java-format](https://github.com/google/google-java-format). To run formatting on your project, you can run: ``` -mvn com.coveo:fmt-maven-plugin:format +mvn com.spotify.fmt:fmt-maven-plugin:format ``` [1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account diff --git a/README.md b/README.md index fc05a067d..1a8adf4e3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +**_THIS REPOSITORY IS DEPRECATED. ALL OF ITS CONTENT AND HISTORY HAS BEEN MOVED TO [GOOGLE-CLOUD-JAVA](https://github.com/googleapis/google-cloud-java/tree/main/java-pubsub)_** + + # Google Cloud Pub/Sub Client for Java Java idiomatic client for [Cloud Pub/Sub][product-docs]. @@ -19,7 +22,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.50.0 + 26.76.0 pom import @@ -43,7 +46,7 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-pubsub - 1.134.1 + 1.148.0 ``` @@ -51,20 +54,20 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.50.0') +implementation platform('com.google.cloud:libraries-bom:26.80.0') implementation 'com.google.cloud:google-cloud-pubsub' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-pubsub:1.134.2' +implementation 'com.google.cloud:google-cloud-pubsub:1.150.2' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.134.2" +libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.150.2" ``` ## Authentication @@ -252,11 +255,16 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-pubsub/tree/m | Create Subscription With Exactly Once Delivery | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithExactlyOnceDelivery.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateSubscriptionWithExactlyOnceDelivery.java) | | Create Subscription With Filtering | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithFiltering.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateSubscriptionWithFiltering.java) | | Create Subscription With Ordering | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithOrdering.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateSubscriptionWithOrdering.java) | +| Create Subscription With Smt Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithSmtExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateSubscriptionWithSmtExample.java) | | Create Topic Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicExample.java) | +| Create Topic With Aws Msk Ingestion Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicWithAwsMskIngestionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicWithAwsMskIngestionExample.java) | +| Create Topic With Azure Event Hubs Ingestion Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicWithAzureEventHubsIngestionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicWithAzureEventHubsIngestionExample.java) | | Create Topic With Cloud Storage Ingestion Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicWithCloudStorageIngestionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicWithCloudStorageIngestionExample.java) | +| Create Topic With Confluent Cloud Ingestion Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicWithConfluentCloudIngestionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicWithConfluentCloudIngestionExample.java) | | Create Topic With Kinesis Ingestion Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicWithKinesisIngestionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicWithKinesisIngestionExample.java) | | Create Topic With Schema Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicWithSchemaExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicWithSchemaExample.java) | | Create Topic With Schema Revisions Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicWithSchemaRevisionsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicWithSchemaRevisionsExample.java) | +| Create Topic With Smt Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateTopicWithSmtExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateTopicWithSmtExample.java) | | Create Unwrapped Push Subscription Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateUnwrappedPushSubscriptionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateUnwrappedPushSubscriptionExample.java) | | Delete Schema Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/DeleteSchemaExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/DeleteSchemaExample.java) | | Delete Schema Revision Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/DeleteSchemaRevisionExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/DeleteSchemaRevisionExample.java) | @@ -390,32 +398,13 @@ information. Apache 2.0 - See [LICENSE][license] for more information. -## CI Status - -Java Version | Status ------------- | ------ -Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] -Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] -Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] -Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] - Java is a registered trademark of Oracle and/or its affiliates. [product-docs]: https://cloud.google.com/pubsub/docs/ [javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-pubsub/latest/history -[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java7.svg -[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java7.html -[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java8.svg -[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java8.html -[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java8-osx.svg -[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java8-osx.html -[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java8-win.svg -[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java8-win.html -[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java11.svg -[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/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-pubsub.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.134.2 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.150.2 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/generation_config.yaml b/generation_config.yaml index 1cd5e6971..e6044361b 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ -gapic_generator_version: 2.50.0 -googleapis_commitish: 0b5613ee74c9558dd284aa2b01a585ce297c0045 -libraries_bom_version: 26.50.0 +gapic_generator_version: 2.72.0 +googleapis_commitish: c2648728afb6deff882cfc4167a21abd382870fa +libraries_bom_version: 26.80.0 libraries: - api_shortname: pubsub name_pretty: Cloud Pub/Sub @@ -14,7 +14,7 @@ libraries: repo: googleapis/java-pubsub repo_short: java-pubsub distribution_name: com.google.cloud:google-cloud-pubsub - codeowner_team: '@googleapis/api-pubsub' + codeowner_team: '@googleapis/pubsub-team' api_id: pubsub.googleapis.com library_type: GAPIC_COMBO requires_billing: true diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index fd4ab205c..6da6aad59 100644 --- a/google-cloud-pubsub-bom/pom.xml +++ b/google-cloud-pubsub-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-pubsub-bom - 1.134.2 + 1.150.3-SNAPSHOT pom com.google.cloud sdk-platform-java-config - 3.40.0 + 3.62.0 Google Cloud pubsub BOM @@ -52,17 +52,17 @@ com.google.cloud google-cloud-pubsub - 1.134.2 + 1.150.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.116.2 + 1.132.3-SNAPSHOT com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.116.2 + 1.132.3-SNAPSHOT diff --git a/google-cloud-pubsub/clirr-ignored-differences.xml b/google-cloud-pubsub/clirr-ignored-differences.xml index 866962660..e4629e32e 100644 --- a/google-cloud-pubsub/clirr-ignored-differences.xml +++ b/google-cloud-pubsub/clirr-ignored-differences.xml @@ -15,4 +15,10 @@ *(org.threeten.bp.Duration) *(java.time.Duration) + + 7002 + + com/google/cloud/pubsub/v1/StreamingSubscriberConnection$Builder + * setEodAckCallbackExecutor(*) + diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index 34ccd6268..a0d5f9483 100644 --- a/google-cloud-pubsub/pom.xml +++ b/google-cloud-pubsub/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-pubsub - 1.134.2 + 1.150.3-SNAPSHOT jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.134.2 + 1.150.3-SNAPSHOT google-cloud-pubsub @@ -108,17 +108,8 @@ io.opentelemetry opentelemetry-context - - io.opentelemetry - opentelemetry-semconv - - - org.mockito - mockito-core - test - junit junit @@ -133,6 +124,13 @@ org.easymock easymock test + + + + org.mockito + mockito-core + test com.google.cloud diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/AckReplyConsumerWithResponse.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/AckReplyConsumerWithResponse.java index 59ea25ae7..445ba7287 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/AckReplyConsumerWithResponse.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/AckReplyConsumerWithResponse.java @@ -34,7 +34,8 @@ * processing code is idempotent, as you may receive any given message more than once. */ @BetaApi( - "This is a preview feature. For more details, see https://cloud.google.com/pubsub/docs/exactly-once-delivery.") + "This is a preview feature. For more details, see" + + " https://cloud.google.com/pubsub/docs/exactly-once-delivery.") public interface AckReplyConsumerWithResponse { /** * Acknowledges that the message has been successfully processed. The service will not send the diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/LoggingUtil.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/LoggingUtil.java new file mode 100644 index 000000000..dbc3a5d86 --- /dev/null +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/LoggingUtil.java @@ -0,0 +1,146 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.pubsub.v1; + +import com.google.pubsub.v1.PubsubMessage; +import java.util.logging.Level; +import java.util.logging.Logger; + +public final class LoggingUtil { + // Instantiate all loggers as static final fields to maintain strong references + + private static final Logger slowAckLogger = Logger.getLogger("slow-ack"); + private static final Logger callbackDeliveryLogger = Logger.getLogger("callback-delivery"); + private static final Logger expiryLogger = Logger.getLogger("expiry"); + private static final Logger callbackExceptionsLogger = Logger.getLogger("callback-exceptions"); + private static final Logger ackBatchLogger = Logger.getLogger("ack-batch"); + private static final Logger subscriberFlowControlLogger = + Logger.getLogger("subscriber-flow-control"); + private static final Logger ackNackLogger = Logger.getLogger("ack-nack"); + private static final Logger publishBatchLogger = Logger.getLogger("publish-batch"); + private static final Logger subscriberStreamsLogger = Logger.getLogger("subscriber-streams"); + + public enum SubSystem { + SLOW_ACK(slowAckLogger), + CALLBACK_DELIVERY(callbackDeliveryLogger), + EXPIRY(expiryLogger), + CALLBACK_EXCEPTIONS(callbackExceptionsLogger), + ACK_BATCH(ackBatchLogger), + SUBSCRIBER_FLOW_CONTROL(subscriberFlowControlLogger), + ACK_NACK(ackNackLogger), + PUBLISH_BATCH(publishBatchLogger), + SUBSCRIBER_STREAMS(subscriberStreamsLogger); + + private final Logger logger; + + SubSystem(Logger logger) { + this.logger = logger; + } + + public Logger getLogger() { + return logger; + } + } + + public LoggingUtil() {} + + private String getSubscriptionLogPrefix( + PubsubMessageWrapper messageWrapper, String ackId, boolean exactlyOnceDeliveryEnabled) { + if (messageWrapper == null || messageWrapper.getPubsubMessage() == null) { + return " Ack ID: " + + ackId + + ", Exactly Once Delivery: " + + exactlyOnceDeliveryEnabled + + " (Message details not available)"; + } + + PubsubMessage message = messageWrapper.getPubsubMessage(); + String messageId = message.getMessageId(); + String orderingKey = message.getOrderingKey(); + + StringBuilder sb = new StringBuilder(); + sb.append("Message ID: ").append(messageId); + sb.append(", Ack ID: ").append(ackId); + if (orderingKey != null && !orderingKey.isEmpty()) { + sb.append(", Ordering Key: ").append(orderingKey); + } + sb.append(", Exactly Once Delivery: ").append(exactlyOnceDeliveryEnabled); + return sb.toString(); + } + + private String getPublisherLogPrefix(PubsubMessageWrapper messageWrapper) { + if (messageWrapper == null || messageWrapper.getPubsubMessage() == null) { + return " (Message details not available)"; + } + + PubsubMessage message = messageWrapper.getPubsubMessage(); + String messageId = message.getMessageId(); + String orderingKey = message.getOrderingKey(); + + StringBuilder sb = new StringBuilder(); + sb.append("Message ID: ").append(messageId); + if (orderingKey != null && !orderingKey.isEmpty()) { + sb.append(", Ordering Key: ").append(orderingKey); + } + return sb.toString(); + } + + public void logSubscriber( + SubSystem subSystem, + Level level, + String msg, + PubsubMessageWrapper messageWrapper, + String ackId, + boolean exactlyOnceDeliveryEnabled) { + Logger logger = subSystem.getLogger(); + if (logger.isLoggable(level)) { + String prefix = getSubscriptionLogPrefix(messageWrapper, ackId, exactlyOnceDeliveryEnabled); + logger.log(level, prefix + " - " + msg); + } + } + + public void logSubscriberWithThrowable( + SubSystem subSystem, + Level level, + String msg, + PubsubMessageWrapper messageWrapper, + String ackId, + boolean exactlyOnceDeliveryEnabled, + Throwable throwable) { + Logger logger = subSystem.getLogger(); + if (logger.isLoggable(level)) { + String prefix = getSubscriptionLogPrefix(messageWrapper, ackId, exactlyOnceDeliveryEnabled); + logger.log(level, prefix + " - " + msg, throwable); + } + } + + public void logPublisher( + SubSystem subSystem, Level level, String msg, PubsubMessageWrapper messageWrapper) { + Logger logger = subSystem.getLogger(); + if (logger.isLoggable(level)) { + String prefix = getPublisherLogPrefix(messageWrapper); + logger.log(level, prefix + " - " + msg); + } + } + + public void logEvent(SubSystem subSystem, Level level, String msg, Object... params) { + Logger logger = subSystem.getLogger(); + if (logger.isLoggable(level)) { + logger.log(level, msg, params); + } + } +} diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java index 7112d4c02..f2f7cd2e7 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java @@ -28,6 +28,7 @@ import com.google.common.util.concurrent.MoreExecutors; import com.google.pubsub.v1.PubsubMessage; import com.google.pubsub.v1.ReceivedMessage; +import com.google.pubsub.v1.SubscriptionName; import java.time.Duration; import java.time.Instant; import java.time.temporal.ChronoUnit; @@ -58,9 +59,11 @@ */ class MessageDispatcher { private static final Logger logger = Logger.getLogger(MessageDispatcher.class.getName()); + private LoggingUtil loggingUtil = new LoggingUtil(); @InternalApi static final double PERCENTILE_FOR_ACK_DEADLINE_UPDATES = 99.9; @InternalApi static final Duration PENDING_ACKS_SEND_DELAY = Duration.ofMillis(100); + @InternalApi static final long FINAL_NACK_TIMEOUT = Duration.ofSeconds(1).toMillis(); private final Executor executor; private final SequentialExecutorService.AutoExecutor sequentialExecutor; @@ -104,9 +107,13 @@ class MessageDispatcher { // To keep track of number of seconds the receiver takes to process messages. private final Distribution ackLatencyDistribution; - private final String subscriptionName; + private final SubscriptionName subscriptionNameObject; private final boolean enableOpenTelemetryTracing; private OpenTelemetryPubsubTracer tracer = new OpenTelemetryPubsubTracer(null, false); + private final SubscriberShutdownSettings subscriberShutdownSettings; + private final AtomicBoolean nackImmediatelyShutdownInProgress = new AtomicBoolean(false); + + private final double slowAckPercentile = 99.0; /** Internal representation of a reply to a Pubsub message, to be sent back to the service. */ public enum AckReply { @@ -153,11 +160,13 @@ private void forget() { @Override public void onFailure(Throwable t) { - logger.log( + loggingUtil.logSubscriberWithThrowable( + LoggingUtil.SubSystem.CALLBACK_EXCEPTIONS, Level.WARNING, - "MessageReceiver failed to process ack ID: " - + this.ackRequestData.getAckId() - + ", the message will be nacked.", + "MessageReceiver exception.", + this.ackRequestData.getMessageWrapper(), + this.ackRequestData.getAckId(), + exactlyOnceDeliveryEnabled.get(), t); this.ackRequestData.setResponse(AckResponse.OTHER, false); pendingNacks.add(this.ackRequestData); @@ -167,18 +176,49 @@ public void onFailure(Throwable t) { @Override public void onSuccess(AckReply reply) { + int ackLatency = + Ints.saturatedCast((long) Math.ceil((clock.millisTime() - receivedTimeMillis) / 1000D)); + if (ackLatency >= ackLatencyDistribution.getPercentile(slowAckPercentile)) { + loggingUtil.logSubscriber( + LoggingUtil.SubSystem.SLOW_ACK, + Level.FINE, + String.format( + "Message ack duration of %d is higher than the p99 ack duration", ackLatency), + this.ackRequestData.getMessageWrapper(), + this.ackRequestData.getAckId(), + exactlyOnceDeliveryEnabled.get()); + } + switch (reply) { case ACK: - pendingAcks.add(this.ackRequestData); - // Record the latency rounded to the next closest integer. - ackLatencyDistribution.record( - Ints.saturatedCast( - (long) Math.ceil((clock.millisTime() - receivedTimeMillis) / 1000D))); - tracer.endSubscribeProcessSpan(this.ackRequestData.getMessageWrapper(), "ack"); + if (nackImmediatelyShutdownInProgress.get() && exactlyOnceDeliveryEnabled.get()) { + this.ackRequestData.setResponse(AckResponse.OTHER, true); + tracer.endSubscribeProcessSpan( + this.ackRequestData.getMessageWrapper(), "ack failed_with_nack_immediately"); + } else { + pendingAcks.add(this.ackRequestData); + // Record the latency rounded to the next closest integer. + ackLatencyDistribution.record(ackLatency); + tracer.endSubscribeProcessSpan(this.ackRequestData.getMessageWrapper(), "ack"); + } + loggingUtil.logSubscriber( + LoggingUtil.SubSystem.ACK_NACK, + Level.FINE, + "Ack called on message.", + this.ackRequestData.getMessageWrapper(), + this.ackRequestData.getAckId(), + exactlyOnceDeliveryEnabled.get()); break; case NACK: pendingNacks.add(this.ackRequestData); tracer.endSubscribeProcessSpan(this.ackRequestData.getMessageWrapper(), "nack"); + loggingUtil.logSubscriber( + LoggingUtil.SubSystem.ACK_NACK, + Level.FINE, + "Nack called on message.", + this.ackRequestData.getMessageWrapper(), + this.ackRequestData.getAckId(), + exactlyOnceDeliveryEnabled.get()); break; default: throw new IllegalArgumentException(String.format("AckReply: %s not supported", reply)); @@ -225,11 +265,12 @@ private MessageDispatcher(Builder builder) { messagesWaiter = new Waiter(); sequentialExecutor = new SequentialExecutorService.AutoExecutor(builder.executor); - subscriptionName = builder.subscriptionName; + subscriptionNameObject = SubscriptionName.parse(builder.subscriptionName); enableOpenTelemetryTracing = builder.enableOpenTelemetryTracing; if (builder.tracer != null) { tracer = builder.tracer; } + this.subscriberShutdownSettings = builder.subscriberShutdownSettings; } private boolean shouldSetMessageFuture() { @@ -293,8 +334,62 @@ public void run() { } } + private void nackAllOutstandingMessages() { + nackImmediatelyShutdownInProgress.set(true); + List handlersToNack = new ArrayList<>(pendingMessages.values()); + for (AckHandler ackHandler : handlersToNack) { + pendingNacks.add(ackHandler.getAckRequestData()); + ackHandler.forget(); // This removes from pendingMessages, releases flow control, etc. + } + } + void stop() { - messagesWaiter.waitComplete(); + switch (subscriberShutdownSettings.getMode()) { + case WAIT_FOR_PROCESSING: + logger.log( + Level.FINE, + "WAIT_FOR_PROCESSING shutdown mode: Waiting for outstanding messages to complete" + + " processing."); + java.time.Duration timeout = subscriberShutdownSettings.getTimeout(); + if (timeout.isNegative()) { + // Indefinite wait use existing blocking wait + messagesWaiter.waitComplete(); + } else { + // Wait for (timeout - 1 second) for messages to complete + long gracePeriodMillis = Math.max(0, timeout.toMillis() - FINAL_NACK_TIMEOUT); + boolean completedWait = messagesWaiter.tryWait(gracePeriodMillis, clock); + if (!completedWait) { + logger.log( + Level.WARNING, + "Grace period expired for WAIT_FOR_PROCESSING shutdown. Nacking remaining" + + " messages."); + // Switch to NACK_IMMEDIATELY behavior for remaining messages + nackAllOutstandingMessages(); + } + } + cancelBackgroundJob(); + processOutstandingOperations(); // Send any remaining acks/nacks. + break; + + case NACK_IMMEDIATELY: + logger.log(Level.FINE, "NACK_IMMEDIATELY shutdown mode: Nacking all outstanding messages."); + // Stop extending deadlines immediately. + cancelBackgroundJob(); + nackAllOutstandingMessages(); + processOutstandingOperations(); // Send all pending nacks. + break; + + default: + logger.log(Level.WARNING, "Unknown shutdown mode: " + subscriberShutdownSettings.getMode()); + // Default to WAIT_FOR_PROCESSING behavior + messagesWaiter.waitComplete(); + cancelBackgroundJob(); + processOutstandingOperations(); + break; + } + } + + private void cancelBackgroundJob() { jobLock.lock(); try { if (backgroundJob != null) { @@ -308,7 +403,6 @@ void stop() { } finally { jobLock.unlock(); } - processOutstandingOperations(); } @InternalApi @@ -363,6 +457,11 @@ void setMessageOrderingEnabled(boolean messageOrderingEnabled) { this.messageOrderingEnabled.set(messageOrderingEnabled); } + @InternalApi + boolean getNackImmediatelyShutdownInProgress() { + return nackImmediatelyShutdownInProgress.get(); + } + private static class OutstandingMessage { private final AckHandler ackHandler; @@ -408,7 +507,7 @@ void processReceivedMessages(List messages) { PubsubMessageWrapper messageWrapper = PubsubMessageWrapper.newBuilder( message.getMessage(), - subscriptionName, + subscriptionNameObject, message.getAckId(), message.getDeliveryAttempt()) .build(); @@ -475,6 +574,21 @@ void notifyAckFailed(AckRequestData ackRequestData) { synchronized (outstandingReceipts) { outstandingReceipts.remove(ackRequestData.getAckId()); } + + // When notifying that an ack/modack has failed, due to a non-retryable error, + // we attempt to remove the message from the pending messages and release it from the flow + // controller so that we no longer attempt to extend the message's ack deadline. + if (pendingMessages.remove(ackRequestData.getAckId()) == null) { + /* + * We're forgetting the message for the second time. This may occur on modacks because the message passed + * its total expiration and was forgotten and then the user finishes working on the message + * which forgets the message again. Additionally, when a failed ack occurs, we will have already forgotten + * the message, so we don't need to here. Turns the second forget into a no-op so we don't free twice. + */ + return; + } + flowController.release(1, ackRequestData.getMessageWrapper().getSerializedSize()); + messagesWaiter.incrementPendingCount(-1); } private void processBatch(List batch) { @@ -484,10 +598,32 @@ private void processBatch(List batch) { // shutdown will block on processing of all these messages anyway. tracer.startSubscribeConcurrencyControlSpan(message.messageWrapper()); try { + loggingUtil.logSubscriber( + LoggingUtil.SubSystem.SUBSCRIBER_FLOW_CONTROL, + Level.FINE, + "Flow controller is blocking.", + message.messageWrapper(), + message.messageWrapper().getAckId(), + exactlyOnceDeliveryEnabled.get()); flowController.reserve(1, message.messageWrapper().getPubsubMessage().getSerializedSize()); + loggingUtil.logSubscriber( + LoggingUtil.SubSystem.SUBSCRIBER_FLOW_CONTROL, + Level.FINE, + "Flow controller is done blocking.", + message.messageWrapper(), + message.messageWrapper().getAckId(), + exactlyOnceDeliveryEnabled.get()); tracer.endSubscribeConcurrencyControlSpan(message.messageWrapper()); } catch (FlowControlException unexpectedException) { // This should be a blocking flow controller and never throw an exception. + loggingUtil.logSubscriberWithThrowable( + LoggingUtil.SubSystem.SUBSCRIBER_FLOW_CONTROL, + Level.FINE, + "Flow controller unexpected exception.", + message.messageWrapper(), + message.messageWrapper().getAckId(), + exactlyOnceDeliveryEnabled.get(), + unexpectedException); tracer.setSubscribeConcurrencyControlSpanException( message.messageWrapper(), unexpectedException); throw new IllegalStateException("Flow control unexpected exception", unexpectedException); @@ -535,9 +671,23 @@ public void run() { // Don't nack it either, because we'd be nacking someone else's message. ackHandler.forget(); tracer.setSubscriberSpanExpirationResult(messageWrapper); + loggingUtil.logSubscriber( + LoggingUtil.SubSystem.EXPIRY, + Level.FINE, + "Message expired.", + messageWrapper, + ackHandler.ackRequestData.getAckId(), + exactlyOnceDeliveryEnabled.get()); return; } tracer.startSubscribeProcessSpan(messageWrapper); + loggingUtil.logSubscriber( + LoggingUtil.SubSystem.CALLBACK_DELIVERY, + Level.FINE, + "Message delivered.", + messageWrapper, + ackHandler.ackRequestData.getAckId(), + exactlyOnceDeliveryEnabled.get()); if (shouldSetMessageFuture()) { // This is the message future that is propagated to the user SettableApiFuture messageFuture = @@ -641,23 +791,30 @@ void processOutstandingOperations() { if (!nackRequestDataList.isEmpty()) { modackRequestData.add(new ModackRequestData(0, nackRequestDataList)); } - logger.log(Level.FINER, "Sending {0} nacks", nackRequestDataList.size()); List ackRequestDataReceipts = new ArrayList(); pendingReceipts.drainTo(ackRequestDataReceipts); - if (!ackRequestDataReceipts.isEmpty()) { + if (!ackRequestDataReceipts.isEmpty() && !getNackImmediatelyShutdownInProgress()) { ModackRequestData receiptModack = new ModackRequestData(this.getMessageDeadlineSeconds(), ackRequestDataReceipts); receiptModack.setIsReceiptModack(true); modackRequestData.add(receiptModack); } - logger.log(Level.FINER, "Sending {0} receipts", ackRequestDataReceipts.size()); ackProcessor.sendModackOperations(modackRequestData); List ackRequestDataList = new ArrayList(); pendingAcks.drainTo(ackRequestDataList); - logger.log(Level.FINER, "Sending {0} acks", ackRequestDataList.size()); + loggingUtil.logEvent( + LoggingUtil.SubSystem.ACK_BATCH, + Level.FINE, + "Sending {0} ACKs, {1} NACKs, {2} receipts. Exactly Once Delivery: {3}", + new Object[] { + ackRequestDataList.size(), + nackRequestDataList.size(), + ackRequestDataReceipts.size(), + exactlyOnceDeliveryEnabled.get() + }); ackProcessor.sendAckOperations(ackRequestDataList); } @@ -689,6 +846,7 @@ public static final class Builder { private String subscriptionName; private boolean enableOpenTelemetryTracing; private OpenTelemetryPubsubTracer tracer; + private SubscriberShutdownSettings subscriberShutdownSettings; protected Builder(MessageReceiver receiver) { this.receiver = receiver; @@ -775,6 +933,12 @@ public Builder setTracer(OpenTelemetryPubsubTracer tracer) { return this; } + public Builder setSubscriberShutdownSettings( + SubscriberShutdownSettings subscriberShutdownSettings) { + this.subscriberShutdownSettings = subscriberShutdownSettings; + return this; + } + public MessageDispatcher build() { return new MessageDispatcher(this); } diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/OpenTelemetryPubsubTracer.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/OpenTelemetryPubsubTracer.java index b946f44bf..3de448458 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/OpenTelemetryPubsubTracer.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/OpenTelemetryPubsubTracer.java @@ -27,7 +27,6 @@ import io.opentelemetry.api.trace.StatusCode; import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.context.Context; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.util.List; public class OpenTelemetryPubsubTracer { @@ -40,6 +39,13 @@ public class OpenTelemetryPubsubTracer { "subscriber concurrency control"; private static final String SUBSCRIBE_SCHEDULER_SPAN_NAME = "subscriber scheduler"; + private static final String MESSAGING_SYSTEM_ATTR_KEY = "messaging.system"; + private static final String MESSAGING_DESTINATION_NAME_ATTR_KEY = "messaging.destination.name"; + private static final String CODE_FUNCTION_ATTR_KEY = "code.function"; + private static final String MESSAGING_OPERATION_ATTR_KEY = "messaging.operation"; + private static final String MESSAGING_BATCH_MESSAGE_COUNT_ATTR_KEY = + "messaging.batch.message_count"; + private static final String MESSAGING_MESSAGE_ID_ATTR_KEY = "messaging.message.id"; private static final String MESSAGE_SIZE_ATTR_KEY = "messaging.message.body.size"; private static final String ORDERING_KEY_ATTR_KEY = "messaging.gcp_pubsub.message.ordering_key"; private static final String MESSAGE_ACK_ID_ATTR_KEY = "messaging.gcp_pubsub.message.ack_id"; @@ -66,12 +72,12 @@ private static final AttributesBuilder createCommonSpanAttributesBuilder( String destinationName, String projectName, String codeFunction, String operation) { AttributesBuilder attributesBuilder = Attributes.builder() - .put(SemanticAttributes.MESSAGING_SYSTEM, MESSAGING_SYSTEM_VALUE) - .put(SemanticAttributes.MESSAGING_DESTINATION_NAME, destinationName) + .put(MESSAGING_SYSTEM_ATTR_KEY, MESSAGING_SYSTEM_VALUE) + .put(MESSAGING_DESTINATION_NAME_ATTR_KEY, destinationName) .put(PROJECT_ATTR_KEY, projectName) - .put(SemanticAttributes.CODE_FUNCTION, codeFunction); + .put(CODE_FUNCTION_ATTR_KEY, codeFunction); if (operation != null) { - attributesBuilder.put(SemanticAttributes.MESSAGING_OPERATION, operation); + attributesBuilder.put(MESSAGING_OPERATION_ATTR_KEY, operation); } return attributesBuilder; @@ -172,15 +178,14 @@ void endPublishBatchingSpan(PubsubMessageWrapper message) { * Creates, starts, and returns a publish RPC span for the given message batch. Bi-directional * links with the publisher parent span are created for sampled messages in the batch. */ - Span startPublishRpcSpan(String topic, List messages) { + Span startPublishRpcSpan(TopicName topicName, List messages) { if (!enabled) { return null; } - TopicName topicName = TopicName.parse(topic); Attributes attributes = createCommonSpanAttributesBuilder( topicName.getTopic(), topicName.getProject(), "publishCall", "publish") - .put(SemanticAttributes.MESSAGING_BATCH_MESSAGE_COUNT, messages.size()) + .put(MESSAGING_BATCH_MESSAGE_COUNT_ATTR_KEY, messages.size()) .build(); SpanBuilder publishRpcSpanBuilder = tracer @@ -188,7 +193,7 @@ Span startPublishRpcSpan(String topic, List messages) { .setSpanKind(SpanKind.CLIENT) .setAllAttributes(attributes); Attributes linkAttributes = - Attributes.builder().put(SemanticAttributes.MESSAGING_OPERATION, "publish").build(); + Attributes.builder().put(MESSAGING_OPERATION_ATTR_KEY, "publish").build(); for (PubsubMessageWrapper message : messages) { if (message.getPublisherSpan().getSpanContext().isSampled()) publishRpcSpanBuilder.addLink(message.getPublisherSpan().getSpanContext(), linkAttributes); @@ -238,7 +243,7 @@ void startSubscriberSpan(PubsubMessageWrapper message, boolean exactlyOnceDelive message.getSubscriptionName(), message.getSubscriptionProject(), "onResponse", null); attributesBuilder - .put(SemanticAttributes.MESSAGING_MESSAGE_ID, message.getMessageId()) + .put(MESSAGING_MESSAGE_ID_ATTR_KEY, message.getMessageId()) .put(MESSAGE_SIZE_ATTR_KEY, message.getDataSize()) .put(MESSAGE_ACK_ID_ATTR_KEY, message.getAckId()) .put(MESSAGE_EXACTLY_ONCE_ATTR_KEY, exactlyOnceDeliveryEnabled); @@ -337,8 +342,7 @@ void startSubscribeProcessSpan(PubsubMessageWrapper message) { if (subscriberSpan != null) { Span subscribeProcessSpan = startChildSpan(message.getSubscriptionName() + " process", subscriberSpan); - subscribeProcessSpan.setAttribute( - SemanticAttributes.MESSAGING_SYSTEM, MESSAGING_SYSTEM_VALUE); + subscribeProcessSpan.setAttribute(MESSAGING_SYSTEM_ATTR_KEY, MESSAGING_SYSTEM_VALUE); Span publisherSpan = message.getPublisherSpan(); if (publisherSpan != null) { subscribeProcessSpan.addLink(publisherSpan.getSpanContext()); @@ -359,7 +363,7 @@ void endSubscribeProcessSpan(PubsubMessageWrapper message, String action) { * to parent subscribe span for sampled messages are added. */ Span startSubscribeRpcSpan( - String subscription, + SubscriptionName subscriptionName, String rpcOperation, List messages, int ackDeadline, @@ -368,14 +372,13 @@ Span startSubscribeRpcSpan( return null; } String codeFunction = rpcOperation == "ack" ? "sendAckOperations" : "sendModAckOperations"; - SubscriptionName subscriptionName = SubscriptionName.parse(subscription); AttributesBuilder attributesBuilder = createCommonSpanAttributesBuilder( subscriptionName.getSubscription(), subscriptionName.getProject(), codeFunction, rpcOperation) - .put(SemanticAttributes.MESSAGING_BATCH_MESSAGE_COUNT, messages.size()); + .put(MESSAGING_BATCH_MESSAGE_COUNT_ATTR_KEY, messages.size()); // Ack deadline and receipt modack are specific to the modack operation if (rpcOperation == "modack") { @@ -390,7 +393,7 @@ Span startSubscribeRpcSpan( .setSpanKind(SpanKind.CLIENT) .setAllAttributes(attributesBuilder.build()); Attributes linkAttributes = - Attributes.builder().put(SemanticAttributes.MESSAGING_OPERATION, rpcOperation).build(); + Attributes.builder().put(MESSAGING_OPERATION_ATTR_KEY, rpcOperation).build(); for (PubsubMessageWrapper message : messages) { if (message.getSubscriberSpan().getSpanContext().isSampled()) { rpcSpanBuilder.addLink(message.getSubscriberSpan().getSpanContext(), linkAttributes); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java index af7a57471..56c920bcf 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java @@ -66,6 +66,7 @@ import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Executor; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; @@ -94,6 +95,7 @@ */ public class Publisher implements PublisherInterface { private static final Logger logger = Logger.getLogger(Publisher.class.getName()); + private LoggingUtil loggingUtil = new LoggingUtil(); private static final String GZIP_COMPRESSION = "gzip"; @@ -101,6 +103,7 @@ public class Publisher implements PublisherInterface { private final String topicName; private final int topicNameSize; + private final TopicName topicNameObject; private final BatchingSettings batchingSettings; private final boolean enableMessageOrdering; @@ -149,6 +152,7 @@ private Publisher(Builder builder) throws IOException { topicName = builder.topicName; topicNameSize = CodedOutputStream.computeStringSize(PublishRequest.TOPIC_FIELD_NUMBER, this.topicName); + topicNameObject = TopicName.parse(this.topicName); this.batchingSettings = builder.batchingSettings; FlowControlSettings flowControl = this.batchingSettings.getFlowControlSettings(); @@ -282,7 +286,7 @@ public ApiFuture publish(PubsubMessage message) { + "setEnableMessageOrdering(true) in the builder."); PubsubMessageWrapper messageWrapper = - PubsubMessageWrapper.newBuilder(messageTransform.apply(message), topicName).build(); + PubsubMessageWrapper.newBuilder(messageTransform.apply(message), topicNameObject).build(); tracer.startPublisherSpan(messageWrapper); final OutstandingPublish outstandingPublish = new OutstandingPublish(messageWrapper); @@ -490,7 +494,7 @@ private ApiFuture publishCall(OutstandingBatch outstandingBatch pubsubMessagesList.add(messageWrapper.getPubsubMessage()); } - outstandingBatch.publishRpcSpan = tracer.startPublishRpcSpan(topicName, messageWrappers); + outstandingBatch.publishRpcSpan = tracer.startPublishRpcSpan(topicNameObject, messageWrappers); return publisherStub .publishCallable() @@ -507,6 +511,13 @@ private void publishOutstandingBatch(final OutstandingBatch outstandingBatch) { logger.log(Level.WARNING, "Attempted to publish batch with zero messages."); return; } + + loggingUtil.logPublisher( + LoggingUtil.SubSystem.PUBLISH_BATCH, + Level.FINE, + String.format("Attempting to batch publish %d messages", outstandingBatch.size()), + outstandingBatch.getMessageWrappers().get(0)); + final ApiFutureCallback futureCallback = new ApiFutureCallback() { @Override @@ -559,6 +570,7 @@ public void onFailure(Throwable t) { }; ApiFuture future; + Executor callbackExecutor = directExecutor(); if (outstandingBatch.orderingKey == null || outstandingBatch.orderingKey.isEmpty()) { future = publishCall(outstandingBatch); } else { @@ -571,8 +583,9 @@ public ApiFuture call() { return publishCall(outstandingBatch); } }); + callbackExecutor = this.executor; } - ApiFutures.addCallback(future, futureCallback, directExecutor()); + ApiFutures.addCallback(future, futureCallback, callbackExecutor); } private final class OutstandingBatch { diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/PubsubMessageWrapper.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/PubsubMessageWrapper.java index 94fd13085..19864a26f 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/PubsubMessageWrapper.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/PubsubMessageWrapper.java @@ -26,7 +26,6 @@ import io.opentelemetry.context.Context; import io.opentelemetry.context.propagation.TextMapGetter; import io.opentelemetry.context.propagation.TextMapSetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; /** * A wrapper class for a {@link PubsubMessage} object that handles creation and tracking of @@ -54,6 +53,7 @@ public class PubsubMessageWrapper { private static final String GOOGCLIENT_PREFIX = "googclient_"; + private static final String MESSAGING_MESSAGE_ID_ATTR_KEY = "messaging.message.id"; private static final String MESSAGE_RESULT_ATTR_KEY = "messaging.gcp_pubsub.result"; private Span publisherSpan; @@ -73,12 +73,12 @@ private PubsubMessageWrapper(Builder builder) { this.deliveryAttempt = builder.deliveryAttempt; } - static Builder newBuilder(PubsubMessage message, String topicName) { + static Builder newBuilder(PubsubMessage message, TopicName topicName) { return new Builder(message, topicName); } static Builder newBuilder( - PubsubMessage message, String subscriptionName, String ackId, int deliveryAttempt) { + PubsubMessage message, SubscriptionName subscriptionName, String ackId, int deliveryAttempt) { return new Builder(message, subscriptionName, ackId, deliveryAttempt); } @@ -133,6 +133,10 @@ int getDataSize() { return message.getData().size(); } + int getSerializedSize() { + return message.getSerializedSize(); + } + String getOrderingKey() { return message.getOrderingKey(); } @@ -190,7 +194,7 @@ void addPublishStartEvent() { */ void setPublisherMessageIdSpanAttribute(String messageId) { if (publisherSpan != null) { - publisherSpan.setAttribute(SemanticAttributes.MESSAGING_MESSAGE_ID, messageId); + publisherSpan.setAttribute(MESSAGING_MESSAGE_ID_ATTR_KEY, messageId); } } @@ -395,21 +399,9 @@ static final class Builder { private String ackId = null; private int deliveryAttempt = 0; - public Builder(PubsubMessage message, String topicName) { - this.message = message; - if (topicName != null) { - this.topicName = TopicName.parse(topicName); - } - } - - public Builder( - PubsubMessage message, String subscriptionName, String ackId, int deliveryAttempt) { + public Builder(PubsubMessage message, TopicName topicName) { this.message = message; - if (subscriptionName != null) { - this.subscriptionName = SubscriptionName.parse(subscriptionName); - } - this.ackId = ackId; - this.deliveryAttempt = deliveryAttempt; + this.topicName = topicName; } public Builder( diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceClient.java index ae7ee1af2..74f1e9f1f 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceSettings.java index 103dee29d..44585d85c 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SchemaServiceSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -103,8 +103,8 @@ * } * * Please refer to the [Client Side Retry - * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for - * additional support in setting retries. + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. */ @Generated("by gapic-generator-java") public class SchemaServiceSettings extends ClientSettings { diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StatusUtil.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StatusUtil.java index a7b8e1faa..56c19306d 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StatusUtil.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StatusUtil.java @@ -25,6 +25,26 @@ private StatusUtil() { // Static class, not instantiable. } + static AckResponse getFailedAckResponse(Throwable t) { + if (!(t instanceof ApiException)) { + return AckResponse.OTHER; + } + + ApiException apiException = (ApiException) t; + AckResponse failedAckResponse; + switch (apiException.getStatusCode().getCode()) { + case FAILED_PRECONDITION: + failedAckResponse = AckResponse.FAILED_PRECONDITION; + break; + case PERMISSION_DENIED: + failedAckResponse = AckResponse.PERMISSION_DENIED; + break; + default: + failedAckResponse = AckResponse.OTHER; + } + return failedAckResponse; + } + static boolean isRetryable(Throwable error) { if (!(error instanceof ApiException)) { return true; diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java index 3ad124f80..24c580b6c 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java @@ -47,6 +47,7 @@ import com.google.pubsub.v1.ModifyAckDeadlineRequest; import com.google.pubsub.v1.StreamingPullRequest; import com.google.pubsub.v1.StreamingPullResponse; +import com.google.pubsub.v1.SubscriptionName; import com.google.rpc.ErrorInfo; import io.grpc.Status; import io.grpc.protobuf.StatusProto; @@ -60,7 +61,9 @@ import java.util.Set; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executor; import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; @@ -74,6 +77,7 @@ final class StreamingSubscriberConnection extends AbstractApiService implements AckProcessor { private static final Logger logger = Logger.getLogger(StreamingSubscriberConnection.class.getName()); + private LoggingUtil loggingUtil = new LoggingUtil(); private static final Duration INITIAL_CHANNEL_RECONNECT_BACKOFF = Duration.ofMillis(100); private static final Duration MAX_CHANNEL_RECONNECT_BACKOFF = Duration.ofSeconds(10); @@ -93,8 +97,11 @@ final class StreamingSubscriberConnection extends AbstractApiService implements private final SubscriberStub subscriberStub; private final int channelAffinity; + private final long protocolVersion; private final String subscription; + private final SubscriptionName subscriptionNameObject; private final ScheduledExecutorService systemExecutor; + private final ApiClock clock; private final MessageDispatcher messageDispatcher; private final FlowControlSettings flowControlSettings; @@ -121,10 +128,24 @@ final class StreamingSubscriberConnection extends AbstractApiService implements private final boolean enableOpenTelemetryTracing; private OpenTelemetryPubsubTracer tracer = new OpenTelemetryPubsubTracer(null, false); + private final SubscriberShutdownSettings subscriberShutdownSettings; + + private final boolean enableKeepalive; + private static final long KEEP_ALIVE_SUPPORT_VERSION = 1; + private static final Duration CLIENT_PING_INTERVAL = Duration.ofSeconds(30); + private ScheduledFuture pingSchedulerHandle; + + private static final Duration SERVER_MONITOR_INTERVAL = Duration.ofSeconds(10); + private static final Duration SERVER_PING_TIMEOUT_DURATION = Duration.ofSeconds(15); + private final AtomicLong lastServerResponseTime; + private final AtomicLong lastClientPingTime; + private ScheduledFuture serverMonitorHandle; private StreamingSubscriberConnection(Builder builder) { subscription = builder.subscription; + subscriptionNameObject = SubscriptionName.parse(builder.subscription); systemExecutor = builder.systemExecutor; + clock = builder.clock; // We need to set the default stream ack deadline on the initial request, this will be // updated by modack requests in the message dispatcher @@ -147,6 +168,7 @@ private StreamingSubscriberConnection(Builder builder) { subscriberStub = builder.subscriberStub; channelAffinity = builder.channelAffinity; + protocolVersion = builder.protocolVersion; MessageDispatcher.Builder messageDispatcherBuilder; if (builder.receiver != null) { @@ -159,6 +181,7 @@ private StreamingSubscriberConnection(Builder builder) { if (builder.tracer != null) { tracer = builder.tracer; } + this.subscriberShutdownSettings = builder.subscriberShutdownSettings; messageDispatcher = messageDispatcherBuilder @@ -177,10 +200,14 @@ private StreamingSubscriberConnection(Builder builder) { .setSubscriptionName(subscription) .setEnableOpenTelemetryTracing(enableOpenTelemetryTracing) .setTracer(tracer) + .setSubscriberShutdownSettings(subscriberShutdownSettings) .build(); flowControlSettings = builder.flowControlSettings; useLegacyFlowControl = builder.useLegacyFlowControl; + enableKeepalive = protocolVersion >= KEEP_ALIVE_SUPPORT_VERSION; + lastServerResponseTime = new AtomicLong(clock.nanoTime()); + lastClientPingTime = new AtomicLong(-1L); } public StreamingSubscriberConnection setExactlyOnceDeliveryEnabled( @@ -196,6 +223,8 @@ public boolean getExactlyOnceDeliveryEnabled() { @Override protected void doStart() { logger.config("Starting subscriber."); + loggingUtil.logEvent( + LoggingUtil.SubSystem.SUBSCRIBER_STREAMS, Level.FINE, "Opening stream.", ""); messageDispatcher.start(); initialize(); notifyStarted(); @@ -203,19 +232,40 @@ protected void doStart() { @Override protected void doStop() { + loggingUtil.logEvent( + LoggingUtil.SubSystem.SUBSCRIBER_STREAMS, Level.FINE, "Closing stream.", ""); lock.lock(); try { clientStream.closeSendWithError(Status.CANCELLED.asException()); } finally { lock.unlock(); } + + if (enableKeepalive) { + stopClientPinger(); + stopServerMonitor(); + } + runShutdown(); notifyStopped(); } private void runShutdown() { + java.time.Duration timeout = subscriberShutdownSettings.getTimeout(); + if (timeout.isZero()) { + return; + } + messageDispatcher.stop(); - ackOperationsWaiter.waitComplete(); + if (timeout.isNegative()) { + ackOperationsWaiter.waitComplete(); + } else { + boolean completedWait = ackOperationsWaiter.tryWait(timeout.toMillis(), clock); + if (!completedWait) { + logger.log( + Level.WARNING, "Timeout exceeded while waiting for ACK/NACK operations to complete."); + } + } } private class StreamingPullResponseObserver implements ResponseObserver { @@ -244,6 +294,10 @@ public void onStart(StreamController controller) { @Override public void onResponse(StreamingPullResponse response) { + if (enableKeepalive) { + lastServerResponseTime.set(clock.nanoTime()); + } + channelReconnectBackoffMillis.set(INITIAL_CHANNEL_RECONNECT_BACKOFF.toMillis()); boolean exactlyOnceDeliveryEnabledResponse = @@ -273,11 +327,19 @@ public void onResponse(StreamingPullResponse response) { @Override public void onError(Throwable t) { + if (enableKeepalive) { + stopClientPinger(); + stopServerMonitor(); + } errorFuture.setException(t); } @Override public void onComplete() { + if (enableKeepalive) { + stopClientPinger(); + stopServerMonitor(); + } logger.fine("Streaming pull terminated successfully!"); errorFuture.set(null); } @@ -314,6 +376,7 @@ private void initialize() { this.useLegacyFlowControl ? 0 : valueOrZero(flowControlSettings.getMaxOutstandingRequestBytes())) + .setProtocolVersion(protocolVersion) .build()); /** @@ -328,6 +391,13 @@ private void initialize() { lock.unlock(); } + if (enableKeepalive) { + lastServerResponseTime.set(clock.nanoTime()); + lastClientPingTime.set(-1L); + startClientPinger(); + startServerMonitor(); + } + ApiFutures.addCallback( errorFuture, new ApiFutureCallback() { @@ -344,6 +414,10 @@ public void onSuccess(@Nullable Void result) { @Override public void onFailure(Throwable cause) { + if (enableKeepalive) { + stopClientPinger(); + stopServerMonitor(); + } if (!isAlive()) { // we don't care about subscription failures when we're no longer running. logger.log(Level.FINE, "pull failure after service no longer running", cause); @@ -388,6 +462,100 @@ private boolean isAlive() { return state == State.RUNNING || state == State.STARTING; } + private void startClientPinger() { + if (pingSchedulerHandle != null) { + pingSchedulerHandle.cancel(false); + } + + pingSchedulerHandle = + systemExecutor.scheduleAtFixedRate( + () -> { + try { + lock.lock(); + try { + if (clientStream != null && isAlive()) { + clientStream.send(StreamingPullRequest.newBuilder().build()); + lastClientPingTime.set(clock.nanoTime()); + logger.log(Level.FINEST, "Sent client keepalive ping"); + } + } finally { + lock.unlock(); + } + } catch (Exception e) { + logger.log(Level.FINE, "Error sending client keepalive ping", e); + } + }, + 0, + CLIENT_PING_INTERVAL.getSeconds(), + TimeUnit.SECONDS); + } + + private void stopClientPinger() { + if (pingSchedulerHandle != null) { + pingSchedulerHandle.cancel(false); + pingSchedulerHandle = null; + } + } + + private void startServerMonitor() { + if (serverMonitorHandle != null) { + serverMonitorHandle.cancel(false); + } + + serverMonitorHandle = + systemExecutor.scheduleAtFixedRate( + () -> { + try { + if (!isAlive()) { + return; + } + + long now = clock.nanoTime(); + long lastResponse = lastServerResponseTime.get(); + long lastPing = lastClientPingTime.get(); + + if (lastPing <= lastResponse) { + return; + } + + Duration elapsedSincePing = Duration.ofNanos(now - lastPing); + if (elapsedSincePing.compareTo(SERVER_PING_TIMEOUT_DURATION) < 0) { + return; + } + + logger.log( + Level.INFO, + "No response from server for {0} seconds since last ping. Closing stream.", + elapsedSincePing.getSeconds()); + + lock.lock(); + try { + if (clientStream != null) { + clientStream.closeSendWithError( + Status.UNAVAILABLE + .withDescription("Keepalive timeout with server") + .asException()); + } + } finally { + lock.unlock(); + } + stopServerMonitor(); + } catch (Exception e) { + logger.log(Level.FINE, "Error in server keepalive monitor", e); + } + }, + SERVER_MONITOR_INTERVAL.getSeconds(), + SERVER_MONITOR_INTERVAL.getSeconds(), + TimeUnit.SECONDS); + } + + private void stopServerMonitor() { + if (serverMonitorHandle != null) { + serverMonitorHandle.cancel(false); + serverMonitorHandle = null; + } + } + public void setResponseOutstandingMessages(AckResponse ackResponse) { // We will close the futures with ackResponse - if there are multiple references to the same // future they will be handled appropriately @@ -405,21 +573,7 @@ private void setFailureFutureOutstandingMessages(Throwable t) { AckResponse ackResponse; if (getExactlyOnceDeliveryEnabled()) { - if (!(t instanceof ApiException)) { - ackResponse = AckResponse.OTHER; - } - - ApiException apiException = (ApiException) t; - switch (apiException.getStatusCode().getCode()) { - case FAILED_PRECONDITION: - ackResponse = AckResponse.FAILED_PRECONDITION; - break; - case PERMISSION_DENIED: - ackResponse = AckResponse.PERMISSION_DENIED; - break; - default: - ackResponse = AckResponse.OTHER; - } + ackResponse = StatusUtil.getFailedAckResponse(t); } else { // We should set success regardless if ExactlyOnceDelivery is not enabled ackResponse = AckResponse.SUCCESSFUL; @@ -454,7 +608,8 @@ private void sendAckOperations( } } // Creates an Ack span to be passed to the callback - Span rpcSpan = tracer.startSubscribeRpcSpan(subscription, "ack", messagesInRequest, 0, false); + Span rpcSpan = + tracer.startSubscribeRpcSpan(subscriptionNameObject, "ack", messagesInRequest, 0, false); ApiFutureCallback callback = getCallback(ackRequestDataInRequestList, 0, false, currentBackoffMillis, rpcSpan); ApiFuture ackFuture = @@ -465,7 +620,7 @@ private void sendAckOperations( .setSubscription(subscription) .addAllAckIds(ackIdsInRequest) .build()); - ApiFutures.addCallback(ackFuture, callback, directExecutor()); + ApiFutures.addCallback(ackFuture, callback, getCallbackExecutor()); pendingOperations++; } ackOperationsWaiter.incrementPendingCount(pendingOperations); @@ -493,14 +648,14 @@ private void sendModackOperations( // Creates either a ModAck span or a Nack span depending on the given ack deadline Span rpcSpan = tracer.startSubscribeRpcSpan( - subscription, + subscriptionNameObject, rpcOperation, messagesInRequest, deadlineExtensionSeconds, modackRequestData.getIsReceiptModack()); ApiFutureCallback callback = getCallback( - modackRequestData.getAckRequestData(), + ackRequestDataInRequestList, deadlineExtensionSeconds, true, currentBackoffMillis, @@ -514,7 +669,7 @@ private void sendModackOperations( .addAllAckIds(ackIdsInRequest) .setAckDeadlineSeconds(modackRequestData.getDeadlineExtensionSeconds()) .build()); - ApiFutures.addCallback(modackFuture, callback, directExecutor()); + ApiFutures.addCallback(modackFuture, callback, getCallbackExecutor()); pendingOperations++; } } @@ -563,9 +718,18 @@ public void onSuccess(Empty empty) { tracer.endSubscribeRpcSpan(rpcSpan); for (AckRequestData ackRequestData : ackRequestDataList) { - // This will check if a response is needed, and if it has already been set - ackRequestData.setResponse(AckResponse.SUCCESSFUL, setResponseOnSuccess); - messageDispatcher.notifyAckSuccess(ackRequestData); + // If we are in NACK_IMMEDIATELY shutdown mode, we will set failures on acks/nack so that + // an error is surfaced if the user + // manually acks or nacks in their callback. + if (setResponseOnSuccess + && getExactlyOnceDeliveryEnabled() + && messageDispatcher.getNackImmediatelyShutdownInProgress()) { + ackRequestData.setResponse(AckResponse.OTHER, setResponseOnSuccess); + messageDispatcher.notifyAckFailed(ackRequestData); + } else { + ackRequestData.setResponse(AckResponse.SUCCESSFUL, setResponseOnSuccess); + messageDispatcher.notifyAckSuccess(ackRequestData); + } // Remove from our pending operations pendingRequests.remove(ackRequestData); tracer.addEndRpcEvent( @@ -607,23 +771,14 @@ public void onFailure(Throwable t) { List ackRequestDataArrayRetryList = new ArrayList<>(); try { Map metadataMap = getMetadataMapFromThrowable(t); - ackRequestDataList.forEach( - ackRequestData -> { - String ackId = ackRequestData.getAckId(); - if (metadataMap.containsKey(ackId)) { - // An error occured - String errorMessage = metadataMap.get(ackId); - if (errorMessage.startsWith(TRANSIENT_FAILURE_METADATA_PREFIX)) { - // Retry all "TRANSIENT_*" error messages - do not set message future - logger.log(Level.INFO, "Transient error message, will resend", errorMessage); - ackRequestDataArrayRetryList.add(ackRequestData); - } else if (errorMessage.equals(PERMANENT_FAILURE_INVALID_ACK_ID_METADATA)) { - // Permanent failure, send - logger.log( - Level.INFO, - "Permanent error invalid ack id message, will not resend", - errorMessage); - ackRequestData.setResponse(AckResponse.INVALID, setResponseOnSuccess); + if (metadataMap.isEmpty()) { + String operation = isModack ? "ModifyAckDeadline" : "Acknowledge"; + if (!StatusUtil.isRetryable(t)) { + logger.log(Level.WARNING, "Un-retryable error on " + operation, t); + ackRequestDataList.forEach( + ackRequestData -> { + AckResponse failedAckResponse = StatusUtil.getFailedAckResponse(t); + ackRequestData.setResponse(failedAckResponse, setResponseOnSuccess); messageDispatcher.notifyAckFailed(ackRequestData); tracer.addEndRpcEvent( ackRequestData.getMessageWrapper(), @@ -631,35 +786,76 @@ public void onFailure(Throwable t) { isModack, deadlineExtensionSeconds); tracer.setSubscriberSpanException( - ackRequestData.getMessageWrapper(), t, "Invalid ack ID"); + ackRequestData.getMessageWrapper(), t, "Error with no metadata map"); + ackRequestData + .getMessageWrapper() + .setSubscriberSpanException(t, "Error with no metadata map"); + pendingRequests.remove(ackRequestData); + }); + } else { + logger.log(Level.INFO, "Retryable error on " + operation + ", will resend", t); + ackRequestDataArrayRetryList.addAll(ackRequestDataList); + ackRequestDataList.forEach( + ackRequestData -> { + pendingRequests.remove(ackRequestData); + }); + } + } else { + ackRequestDataList.forEach( + ackRequestData -> { + String ackId = ackRequestData.getAckId(); + if (metadataMap.containsKey(ackId)) { + // An error occured + String errorMessage = metadataMap.get(ackId); + if (errorMessage.startsWith(TRANSIENT_FAILURE_METADATA_PREFIX)) { + // Retry all "TRANSIENT_*" error messages - do not set message future + logger.log(Level.INFO, "Transient error message, will resend", errorMessage); + ackRequestDataArrayRetryList.add(ackRequestData); + } else if (errorMessage.equals(PERMANENT_FAILURE_INVALID_ACK_ID_METADATA)) { + // Permanent failure + logger.log( + Level.INFO, + "Permanent error invalid ack id message, will not resend", + errorMessage); + ackRequestData.setResponse(AckResponse.INVALID, setResponseOnSuccess); + messageDispatcher.notifyAckFailed(ackRequestData); + tracer.addEndRpcEvent( + ackRequestData.getMessageWrapper(), + rpcSpanSampled, + isModack, + deadlineExtensionSeconds); + tracer.setSubscriberSpanException( + ackRequestData.getMessageWrapper(), t, "Invalid ack ID"); + } else { + logger.log( + Level.INFO, "Unknown error message, will not resend", errorMessage); + ackRequestData.setResponse(AckResponse.OTHER, setResponseOnSuccess); + messageDispatcher.notifyAckFailed(ackRequestData); + tracer.addEndRpcEvent( + ackRequestData.getMessageWrapper(), + rpcSpanSampled, + isModack, + deadlineExtensionSeconds); + tracer.setSubscriberSpanException( + ackRequestData.getMessageWrapper(), t, "Unknown error message"); + ackRequestData + .getMessageWrapper() + .setSubscriberSpanException(t, "Unknown error message"); + } } else { - logger.log(Level.INFO, "Unknown error message, will not resend", errorMessage); - ackRequestData.setResponse(AckResponse.OTHER, setResponseOnSuccess); - messageDispatcher.notifyAckFailed(ackRequestData); + ackRequestData.setResponse(AckResponse.SUCCESSFUL, setResponseOnSuccess); + messageDispatcher.notifyAckSuccess(ackRequestData); + tracer.endSubscriberSpan(ackRequestData.getMessageWrapper()); tracer.addEndRpcEvent( ackRequestData.getMessageWrapper(), rpcSpanSampled, isModack, deadlineExtensionSeconds); - tracer.setSubscriberSpanException( - ackRequestData.getMessageWrapper(), t, "Unknown error message"); - ackRequestData - .getMessageWrapper() - .setSubscriberSpanException(t, "Unknown error message"); } - } else { - ackRequestData.setResponse(AckResponse.SUCCESSFUL, setResponseOnSuccess); - messageDispatcher.notifyAckSuccess(ackRequestData); - tracer.endSubscriberSpan(ackRequestData.getMessageWrapper()); - tracer.addEndRpcEvent( - ackRequestData.getMessageWrapper(), - rpcSpanSampled, - isModack, - deadlineExtensionSeconds); - } - // Remove from our pending - pendingRequests.remove(ackRequestData); - }); + // Remove from our pending + pendingRequests.remove(ackRequestData); + }); + } } catch (InvalidProtocolBufferException e) { // If we fail to parse out the errorInfo, we should retry all logger.log( @@ -694,6 +890,16 @@ public void run() { }; } + // If exactly-once is enabled, we hold a lock for the ack/modack response callback, so we want to + // avoid using the directExecutor() which runs the callback on the invoking thread. Instead, we + // want to schedule the callback to be run on a different thread. + private Executor getCallbackExecutor() { + if (!getExactlyOnceDeliveryEnabled()) { + return directExecutor(); + } + return systemExecutor; + } + /** Builder of {@link StreamingSubscriberConnection StreamingSubscriberConnections}. */ public static final class Builder { private MessageReceiver receiver; @@ -709,6 +915,7 @@ public static final class Builder { private Distribution ackLatencyDistribution; private SubscriberStub subscriberStub; private int channelAffinity; + private long protocolVersion; private FlowController flowController; private FlowControlSettings flowControlSettings; private boolean useLegacyFlowControl; @@ -718,6 +925,7 @@ public static final class Builder { private boolean enableOpenTelemetryTracing; private OpenTelemetryPubsubTracer tracer; + private SubscriberShutdownSettings subscriberShutdownSettings; protected Builder(MessageReceiver receiver) { this.receiver = receiver; @@ -779,6 +987,11 @@ public Builder setChannelAffinity(int channelAffinity) { return this; } + public Builder setProtocolVersion(long protocolVersion) { + this.protocolVersion = protocolVersion; + return this; + } + public Builder setFlowController(FlowController flowController) { this.flowController = flowController; return this; @@ -819,6 +1032,12 @@ public Builder setTracer(OpenTelemetryPubsubTracer tracer) { return this; } + public Builder setSubscriberShutdownSettings( + SubscriberShutdownSettings subscriberShutdownSettings) { + this.subscriberShutdownSettings = subscriberShutdownSettings; + return this; + } + public StreamingSubscriberConnection build() { return new StreamingSubscriberConnection(this); } diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java index 4b9ea3825..a2d4f3b38 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java @@ -144,12 +144,14 @@ public class Subscriber extends AbstractApiService implements SubscriberInterfac private final boolean maxDurationPerAckExtensionDefaultUsed; private final java.time.Duration minDurationPerAckExtension; private final boolean minDurationPerAckExtensionDefaultUsed; + private final long protocolVersion = 1L; // The ExecutorProvider used to generate executors for processing messages. private final ExecutorProvider executorProvider; // An instantiation of the SystemExecutorProvider used for processing acks // and other system actions. @Nullable private final ScheduledExecutorService alarmsExecutor; + private final Distribution ackLatencyDistribution = new Distribution(Math.toIntExact(MAX_STREAM_ACK_DEADLINE.getSeconds()) + 1); @@ -167,6 +169,7 @@ public class Subscriber extends AbstractApiService implements SubscriberInterfac private final boolean enableOpenTelemetryTracing; private final OpenTelemetry openTelemetry; private OpenTelemetryPubsubTracer tracer = new OpenTelemetryPubsubTracer(null, false); + private final SubscriberShutdownSettings subscriberShutdownSettings; private Subscriber(Builder builder) { receiver = builder.receiver; @@ -185,9 +188,7 @@ private Subscriber(Builder builder) { flowController = new FlowController( - builder - .flowControlSettings - .toBuilder() + builder.flowControlSettings.toBuilder() .setLimitExceededBehavior(LimitExceededBehavior.Block) .build()); @@ -224,6 +225,7 @@ private Subscriber(Builder builder) { this.enableOpenTelemetryTracing = builder.enableOpenTelemetryTracing; this.openTelemetry = builder.openTelemetry; + this.subscriberShutdownSettings = builder.subscriberShutdownSettings; if (this.openTelemetry != null && this.enableOpenTelemetryTracing) { Tracer openTelemetryTracer = builder.openTelemetry.getTracer(OPEN_TELEMETRY_TRACER_NAME); if (openTelemetryTracer != null) { @@ -367,7 +369,6 @@ protected void doStop() { @Override public void run() { try { - // stop connection is no-op if connections haven't been started. runShutdown(); notifyStopped(); } catch (Exception e) { @@ -379,7 +380,13 @@ public void run() { } private void runShutdown() { - stopAllStreamingConnections(); + java.time.Duration timeout = subscriberShutdownSettings.getTimeout(); + long deadlineMillis = -1; + if (!timeout.isNegative()) { + deadlineMillis = clock.millisTime() + timeout.toMillis(); + } + + stopAllStreamingConnections(deadlineMillis); shutdownBackgroundResources(); subscriberStub.shutdownNow(); } @@ -421,6 +428,8 @@ private void startStreamingConnections() { .setClock(clock) .setEnableOpenTelemetryTracing(enableOpenTelemetryTracing) .setTracer(tracer) + .setSubscriberShutdownSettings(subscriberShutdownSettings) + .setProtocolVersion(protocolVersion) .build(); streamingSubscriberConnections.add(streamingSubscriberConnection); @@ -446,8 +455,8 @@ public void failed(State from, Throwable failure) { } } - private void stopAllStreamingConnections() { - stopConnections(streamingSubscriberConnections); + private void stopAllStreamingConnections(long deadlineMillis) { + stopConnections(streamingSubscriberConnections, deadlineMillis); } private void shutdownBackgroundResources() { @@ -467,7 +476,7 @@ private void startConnections( } } - private void stopConnections(List connections) { + private void stopConnections(List connections, long deadlineMillis) { ArrayList liveConnections; synchronized (connections) { liveConnections = new ArrayList(connections); @@ -478,11 +487,19 @@ private void stopConnections(List connections) { } for (ApiService subscriber : liveConnections) { try { - subscriber.awaitTerminated(); - } catch (IllegalStateException e) { - // If the service fails, awaitTerminated will throw an exception. - // However, we could be stopping services because at least one - // has already failed, so we just ignore this exception. + if (deadlineMillis < 0) { + // Wait indefinitely + subscriber.awaitTerminated(); + } else { + long remaining = deadlineMillis - clock.millisTime(); + if (remaining < 0) { + remaining = 0; + } + subscriber.awaitTerminated(remaining, java.util.concurrent.TimeUnit.MILLISECONDS); + } + } catch (Exception e) { + logger.log(Level.FINE, "Exception while waiting for a connection to terminate", e); + break; // Stop waiting for other connections. } } } @@ -533,6 +550,9 @@ public static final class Builder { private boolean enableOpenTelemetryTracing = false; private OpenTelemetry openTelemetry = null; + private SubscriberShutdownSettings subscriberShutdownSettings = + SubscriberShutdownSettings.newBuilder().build(); + Builder(String subscription, MessageReceiver receiver) { this.subscription = subscription; this.receiver = receiver; @@ -773,6 +793,19 @@ public Builder setOpenTelemetry(OpenTelemetry openTelemetry) { return this; } + /** + * Sets the shutdown settings for the subscriber. Defaults to {@link + * SubscriberShutdownSettings#newBuilder() default settings}. + */ + @BetaApi( + "The surface for SubscriberShutdownSettings is not stable yet and may be changed in the" + + " future.") + public Builder setSubscriberShutdownSettings( + SubscriberShutdownSettings subscriberShutdownSettings) { + this.subscriberShutdownSettings = Preconditions.checkNotNull(subscriberShutdownSettings); + return this; + } + /** Returns the default FlowControlSettings used by the client if settings are not provided. */ public static FlowControlSettings getDefaultFlowControlSettings() { return DEFAULT_FLOW_CONTROL_SETTINGS; diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriberShutdownSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriberShutdownSettings.java new file mode 100644 index 000000000..efd8e10db --- /dev/null +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriberShutdownSettings.java @@ -0,0 +1,102 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.pubsub.v1; + +import com.google.common.base.Preconditions; +import java.time.Duration; + +/** + * Settings for configuring the shutdown behavior of a {@link Subscriber}. + * + *

This class allows customization of how the subscriber handles outstanding messages during + * shutdown, including whether to wait for processing to complete or to immediately nack messages, + * and an optional timeout for the shutdown process. + */ +public final class SubscriberShutdownSettings { + + /** Defines the behavior for handling outstanding messages during subscriber shutdown. */ + public enum ShutdownMode { + /** + * The subscriber will wait for all outstanding messages to be processed (acked or nacked by the + * user's message receiver) before completing the shutdown. + */ + WAIT_FOR_PROCESSING, + /** + * The subscriber will immediately nack all outstanding messages and attempt to shut down as + * quickly as possible. Messages delivered to the user callback but not yet acked/nacked will + * also be nacked. + */ + NACK_IMMEDIATELY + } + + private static final Duration DEFAULT_TIMEOUT = Duration.ofSeconds(-1); // Indicates no timeout + private static final ShutdownMode DEFAULT_MODE = ShutdownMode.WAIT_FOR_PROCESSING; + + private final ShutdownMode mode; + private final Duration timeout; + + private SubscriberShutdownSettings(Builder builder) { + this.mode = builder.mode; + this.timeout = builder.timeout; + } + + /** Returns the configured shutdown mode. */ + public ShutdownMode getMode() { + return mode; + } + + /** Returns the configured shutdown timeout. A negative duration indicates no timeout. */ + public Duration getTimeout() { + return timeout; + } + + /** Returns a new builder for {@code SubscriberShutdownSettings}. */ + public static Builder newBuilder() { + return new Builder(); + } + + /** Builder for {@code SubscriberShutdownSettings}. */ + public static final class Builder { + private ShutdownMode mode = DEFAULT_MODE; + private Duration timeout = DEFAULT_TIMEOUT; + + private Builder() {} + + /** Sets the shutdown mode. Defaults to {@link ShutdownMode#WAIT_FOR_PROCESSING}. */ + public Builder setMode(ShutdownMode mode) { + this.mode = Preconditions.checkNotNull(mode); + return this; + } + + /** + * Sets the shutdown timeout. Defaults to a negative duration, indicating no timeout. + * + *

A positive duration specifies the maximum time to wait for shutdown to complete. A + * duration of zero indicates an immediate, forceful shutdown. A negative duration indicates an + * indefinite wait. + */ + public Builder setTimeout(Duration timeout) { + this.timeout = Preconditions.checkNotNull(timeout); + return this; + } + + /** Builds an instance of {@code SubscriberShutdownSettings}. */ + public SubscriberShutdownSettings build() { + return new SubscriberShutdownSettings(this); + } + } +} diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java index 97d94c0e9..26a764dab 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -266,7 +266,7 @@ * * *

StreamingPull - *

Establishes a stream with the server, which sends messages down to the client. The client streams acknowledgements and ack deadline modifications back to the server. The server will close the stream and return the status on any error. The server may close the stream with status `UNAVAILABLE` to reassign server-side resources, in which case, the client should re-establish the stream. Flow control can be achieved by configuring the underlying RPC channel. + *

Establishes a stream with the server, which sends messages down to the client. The client streams acknowledgments and ack deadline modifications back to the server. The server will close the stream and return the status on any error. The server may close the stream with status `UNAVAILABLE` to reassign server-side resources, in which case, the client should re-establish the stream. Flow control can be achieved by configuring the underlying RPC channel. * *

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

*
    @@ -588,7 +588,7 @@ public SubscriberStub getStub() { * } * } * - * @param name Required. The name of the subscription. It must have the format + * @param name Required. Identifier. The name of the subscription. It must have the format * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a * letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores * (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 @@ -658,7 +658,7 @@ public final Subscription createSubscription( * } * } * - * @param name Required. The name of the subscription. It must have the format + * @param name Required. Identifier. The name of the subscription. It must have the format * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a * letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores * (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 @@ -728,7 +728,7 @@ public final Subscription createSubscription( * } * } * - * @param name Required. The name of the subscription. It must have the format + * @param name Required. Identifier. The name of the subscription. It must have the format * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a * letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores * (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 @@ -798,7 +798,7 @@ public final Subscription createSubscription( * } * } * - * @param name Required. The name of the subscription. It must have the format + * @param name Required. Identifier. The name of the subscription. It must have the format * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a * letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores * (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 @@ -866,6 +866,7 @@ public final Subscription createSubscription( * .setPushConfig(PushConfig.newBuilder().build()) * .setBigqueryConfig(BigQueryConfig.newBuilder().build()) * .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + * .setBigtableConfig(BigtableConfig.newBuilder().build()) * .setAckDeadlineSeconds(2135351438) * .setRetainAckedMessages(true) * .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -880,6 +881,8 @@ public final Subscription createSubscription( * .setTopicMessageRetentionDuration(Duration.newBuilder().build()) * .setAnalyticsHubSubscriptionInfo( * Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + * .addAllMessageTransforms(new ArrayList()) + * .putAllTags(new HashMap()) * .build(); * Subscription response = subscriptionAdminClient.createSubscription(request); * } @@ -1131,6 +1134,7 @@ public final Subscription createSubscription( * .setPushConfig(PushConfig.newBuilder().build()) * .setBigqueryConfig(BigQueryConfig.newBuilder().build()) * .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + * .setBigtableConfig(BigtableConfig.newBuilder().build()) * .setAckDeadlineSeconds(2135351438) * .setRetainAckedMessages(true) * .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -1145,6 +1149,8 @@ public final Subscription createSubscription( * .setTopicMessageRetentionDuration(Duration.newBuilder().build()) * .setAnalyticsHubSubscriptionInfo( * Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + * .addAllMessageTransforms(new ArrayList()) + * .putAllTags(new HashMap()) * .build(); * ApiFuture future = * subscriptionAdminClient.createSubscriptionCallable().futureCall(request); @@ -2377,7 +2383,7 @@ public final UnaryCallable pullCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Establishes a stream with the server, which sends messages down to the client. The client - * streams acknowledgements and ack deadline modifications back to the server. The server will + * streams acknowledgments and ack deadline modifications back to the server. The server will * close the stream and return the status on any error. The server may close the stream with * status `UNAVAILABLE` to reassign server-side resources, in which case, the client should * re-establish the stream. Flow control can be achieved by configuring the underlying RPC @@ -2404,6 +2410,7 @@ public final UnaryCallable pullCallable() { * .setClientId("clientId908408390") * .setMaxOutstandingMessages(-1315266996) * .setMaxOutstandingBytes(-2103098517) + * .setProtocolVersion(-1161610703) * .build(); * bidiStream.send(request); * for (StreamingPullResponse response : bidiStream) { @@ -3178,6 +3185,7 @@ public final Snapshot createSnapshot(String name, String subscription) { * .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .putAllLabels(new HashMap()) + * .putAllTags(new HashMap()) * .build(); * Snapshot response = subscriptionAdminClient.createSnapshot(request); * } @@ -3370,6 +3378,7 @@ public final Snapshot createSnapshot(ProjectSnapshotName name, String subscripti * .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .putAllLabels(new HashMap()) + * .putAllTags(new HashMap()) * .build(); * ApiFuture future = * subscriptionAdminClient.createSnapshotCallable().futureCall(request); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java index c2c8d217d..8fe62a63f 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -112,8 +112,8 @@ * } * * Please refer to the [Client Side Retry - * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for - * additional support in setting retries. + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. */ @Generated("by gapic-generator-java") public class SubscriptionAdminSettings extends ClientSettings { diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java index 6449c2f8c..91dfd103e 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -420,7 +420,7 @@ public PublisherStub getStub() { * } * } * - * @param name Required. The name of the topic. It must have the format + * @param name Required. Identifier. The name of the topic. It must have the format * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only * letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), * tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in @@ -451,7 +451,7 @@ public final Topic createTopic(TopicName name) { * } * } * - * @param name Required. The name of the topic. It must have the format + * @param name Required. Identifier. The name of the topic. It must have the format * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only * letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), * tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in @@ -511,11 +511,15 @@ public final Topic createTopic(ProjectTopicName name) { * .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) * .putAllLabels(new HashMap()) * .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - * .setKmsKeyName("kmsKeyName412586233") + * .setKmsKeyName( + * CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + * .toString()) * .setSchemaSettings(SchemaSettings.newBuilder().build()) * .setSatisfiesPzs(true) * .setMessageRetentionDuration(Duration.newBuilder().build()) * .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + * .addAllMessageTransforms(new ArrayList()) + * .putAllTags(new HashMap()) * .build(); * Topic response = topicAdminClient.createTopic(request); * } @@ -547,11 +551,15 @@ public final Topic createTopic(Topic request) { * .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) * .putAllLabels(new HashMap()) * .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - * .setKmsKeyName("kmsKeyName412586233") + * .setKmsKeyName( + * CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + * .toString()) * .setSchemaSettings(SchemaSettings.newBuilder().build()) * .setSatisfiesPzs(true) * .setMessageRetentionDuration(Duration.newBuilder().build()) * .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + * .addAllMessageTransforms(new ArrayList()) + * .putAllTags(new HashMap()) * .build(); * ApiFuture future = topicAdminClient.createTopicCallable().futureCall(request); * // Do something. diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java index 08c00b2d1..4928dd762 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -104,8 +104,8 @@ * } * * Please refer to the [Client Side Retry - * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for - * additional support in setting retries. + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. */ @Generated("by gapic-generator-java") public class TopicAdminSettings extends ClientSettings { diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Waiter.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Waiter.java index e22125fee..7221d5144 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Waiter.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Waiter.java @@ -16,6 +16,7 @@ package com.google.cloud.pubsub.v1; +import com.google.api.core.ApiClock; import com.google.api.core.InternalApi; /** @@ -54,6 +55,32 @@ public synchronized void waitComplete() { } } + public synchronized boolean tryWait(long timeoutMilliseconds, ApiClock clock) { + long startTime = clock.millisTime(); + long remainingMilliseconds = timeoutMilliseconds; + boolean interrupted = false; + boolean completedWait = true; + try { + while (pendingCount > 0) { + if (remainingMilliseconds <= 0) { + completedWait = false; + break; + } + try { + wait(remainingMilliseconds); + } catch (InterruptedException e) { + interrupted = true; + } + remainingMilliseconds = timeoutMilliseconds - (clock.millisTime() - startTime); + } + } finally { + if (interrupted) { + Thread.currentThread().interrupt(); + } + } + return completedWait; + } + @InternalApi public int pendingCount() { return pendingCount; diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java index 70eed8c36..a85a38b2b 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherCallableFactory.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherCallableFactory.java index 0ca66bdc8..92adc0c86 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherCallableFactory.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java index 3ea32264e..137efe471 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,6 +68,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/CreateTopic") .setRequestMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateTopicMethodDescriptor = @@ -76,6 +77,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/UpdateTopic") .setRequestMarshaller(ProtoUtils.marshaller(UpdateTopicRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor publishMethodDescriptor = @@ -84,6 +86,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/Publish") .setRequestMarshaller(ProtoUtils.marshaller(PublishRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(PublishResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getTopicMethodDescriptor = @@ -92,6 +95,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/GetTopic") .setRequestMarshaller(ProtoUtils.marshaller(GetTopicRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -101,6 +105,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/ListTopics") .setRequestMarshaller(ProtoUtils.marshaller(ListTopicsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListTopicsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor< @@ -114,6 +119,7 @@ public class GrpcPublisherStub extends PublisherStub { ProtoUtils.marshaller(ListTopicSubscriptionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListTopicSubscriptionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -125,6 +131,7 @@ public class GrpcPublisherStub extends PublisherStub { ProtoUtils.marshaller(ListTopicSnapshotsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListTopicSnapshotsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteTopicMethodDescriptor = @@ -133,6 +140,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/DeleteTopic") .setRequestMarshaller(ProtoUtils.marshaller(DeleteTopicRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -144,6 +152,7 @@ public class GrpcPublisherStub extends PublisherStub { ProtoUtils.marshaller(DetachSubscriptionRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(DetachSubscriptionResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -152,6 +161,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -160,6 +170,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -171,6 +182,7 @@ public class GrpcPublisherStub extends PublisherStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createTopicCallable; @@ -245,6 +257,7 @@ protected GrpcPublisherStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings updateTopicTransportSettings = GrpcCallSettings.newBuilder() @@ -265,6 +278,7 @@ protected GrpcPublisherStub( builder.add("topic", String.valueOf(request.getTopic())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTopic()) .build(); GrpcCallSettings getTopicTransportSettings = GrpcCallSettings.newBuilder() @@ -275,6 +289,7 @@ protected GrpcPublisherStub( builder.add("topic", String.valueOf(request.getTopic())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTopic()) .build(); GrpcCallSettings listTopicsTransportSettings = GrpcCallSettings.newBuilder() @@ -285,6 +300,7 @@ protected GrpcPublisherStub( builder.add("project", String.valueOf(request.getProject())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getProject()) .build(); GrpcCallSettings listTopicSubscriptionsTransportSettings = @@ -297,6 +313,7 @@ protected GrpcPublisherStub( builder.add("topic", String.valueOf(request.getTopic())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTopic()) .build(); GrpcCallSettings listTopicSnapshotsTransportSettings = @@ -308,6 +325,7 @@ protected GrpcPublisherStub( builder.add("topic", String.valueOf(request.getTopic())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTopic()) .build(); GrpcCallSettings deleteTopicTransportSettings = GrpcCallSettings.newBuilder() @@ -318,6 +336,7 @@ protected GrpcPublisherStub( builder.add("topic", String.valueOf(request.getTopic())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTopic()) .build(); GrpcCallSettings detachSubscriptionTransportSettings = @@ -329,6 +348,7 @@ protected GrpcPublisherStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() @@ -339,6 +359,7 @@ protected GrpcPublisherStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); GrpcCallSettings getIamPolicyTransportSettings = GrpcCallSettings.newBuilder() @@ -349,6 +370,7 @@ protected GrpcPublisherStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); GrpcCallSettings testIamPermissionsTransportSettings = @@ -360,6 +382,7 @@ protected GrpcPublisherStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); this.createTopicCallable = diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceCallableFactory.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceCallableFactory.java index e2728094e..16236bc4b 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceCallableFactory.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceStub.java index d3fbc1d67..a13604e4b 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,6 +68,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setFullMethodName("google.pubsub.v1.SchemaService/CreateSchema") .setRequestMarshaller(ProtoUtils.marshaller(CreateSchemaRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getSchemaMethodDescriptor = @@ -76,6 +77,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setFullMethodName("google.pubsub.v1.SchemaService/GetSchema") .setRequestMarshaller(ProtoUtils.marshaller(GetSchemaRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -86,6 +88,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(ListSchemasRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListSchemasResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -97,6 +100,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { ProtoUtils.marshaller(ListSchemaRevisionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListSchemaRevisionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor commitSchemaMethodDescriptor = @@ -105,6 +109,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setFullMethodName("google.pubsub.v1.SchemaService/CommitSchema") .setRequestMarshaller(ProtoUtils.marshaller(CommitSchemaRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -115,6 +120,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(RollbackSchemaRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -125,6 +131,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteSchemaRevisionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteSchemaMethodDescriptor = @@ -133,6 +140,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setFullMethodName("google.pubsub.v1.SchemaService/DeleteSchema") .setRequestMarshaller(ProtoUtils.marshaller(DeleteSchemaRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -144,6 +152,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { ProtoUtils.marshaller(ValidateSchemaRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ValidateSchemaResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -155,6 +164,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { ProtoUtils.marshaller(ValidateMessageRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ValidateMessageResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -163,6 +173,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -171,6 +182,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -182,6 +194,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createSchemaCallable; @@ -256,6 +269,7 @@ protected GrpcSchemaServiceStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings getSchemaTransportSettings = GrpcCallSettings.newBuilder() @@ -266,6 +280,7 @@ protected GrpcSchemaServiceStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings listSchemasTransportSettings = GrpcCallSettings.newBuilder() @@ -276,6 +291,7 @@ protected GrpcSchemaServiceStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings listSchemaRevisionsTransportSettings = @@ -287,6 +303,7 @@ protected GrpcSchemaServiceStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings commitSchemaTransportSettings = GrpcCallSettings.newBuilder() @@ -297,6 +314,7 @@ protected GrpcSchemaServiceStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings rollbackSchemaTransportSettings = GrpcCallSettings.newBuilder() @@ -307,6 +325,7 @@ protected GrpcSchemaServiceStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings deleteSchemaRevisionTransportSettings = GrpcCallSettings.newBuilder() @@ -317,6 +336,7 @@ protected GrpcSchemaServiceStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings deleteSchemaTransportSettings = GrpcCallSettings.newBuilder() @@ -327,6 +347,7 @@ protected GrpcSchemaServiceStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings validateSchemaTransportSettings = @@ -338,6 +359,7 @@ protected GrpcSchemaServiceStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings validateMessageTransportSettings = @@ -349,6 +371,7 @@ protected GrpcSchemaServiceStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() @@ -359,6 +382,7 @@ protected GrpcSchemaServiceStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); GrpcCallSettings getIamPolicyTransportSettings = GrpcCallSettings.newBuilder() @@ -369,6 +393,7 @@ protected GrpcSchemaServiceStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); GrpcCallSettings testIamPermissionsTransportSettings = @@ -380,6 +405,7 @@ protected GrpcSchemaServiceStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); this.createSchemaCallable = diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberCallableFactory.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberCallableFactory.java index 8b12c81c0..8249a7219 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberCallableFactory.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java index b3c3e671b..6c51332e6 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -77,6 +77,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setFullMethodName("google.pubsub.v1.Subscriber/CreateSubscription") .setRequestMarshaller(ProtoUtils.marshaller(Subscription.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Subscription.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -87,6 +88,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(GetSubscriptionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Subscription.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -97,6 +99,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateSubscriptionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Subscription.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -108,6 +111,7 @@ public class GrpcSubscriberStub extends SubscriberStub { ProtoUtils.marshaller(ListSubscriptionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListSubscriptionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -118,6 +122,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteSubscriptionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -128,6 +133,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(ModifyAckDeadlineRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor acknowledgeMethodDescriptor = @@ -136,6 +142,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setFullMethodName("google.pubsub.v1.Subscriber/Acknowledge") .setRequestMarshaller(ProtoUtils.marshaller(AcknowledgeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor pullMethodDescriptor = @@ -144,6 +151,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setFullMethodName("google.pubsub.v1.Subscriber/Pull") .setRequestMarshaller(ProtoUtils.marshaller(PullRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(PullResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -155,6 +163,7 @@ public class GrpcSubscriberStub extends SubscriberStub { ProtoUtils.marshaller(StreamingPullRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(StreamingPullResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -165,6 +174,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(ModifyPushConfigRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getSnapshotMethodDescriptor = @@ -173,6 +183,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setFullMethodName("google.pubsub.v1.Subscriber/GetSnapshot") .setRequestMarshaller(ProtoUtils.marshaller(GetSnapshotRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Snapshot.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -184,6 +195,7 @@ public class GrpcSubscriberStub extends SubscriberStub { ProtoUtils.marshaller(ListSnapshotsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListSnapshotsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -194,6 +206,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateSnapshotRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Snapshot.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -204,6 +217,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateSnapshotRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Snapshot.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -214,6 +228,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteSnapshotRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor seekMethodDescriptor = @@ -222,6 +237,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setFullMethodName("google.pubsub.v1.Subscriber/Seek") .setRequestMarshaller(ProtoUtils.marshaller(SeekRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(SeekResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -230,6 +246,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -238,6 +255,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -249,6 +267,7 @@ public class GrpcSubscriberStub extends SubscriberStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createSubscriptionCallable; @@ -329,6 +348,7 @@ protected GrpcSubscriberStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings getSubscriptionTransportSettings = GrpcCallSettings.newBuilder() @@ -339,6 +359,7 @@ protected GrpcSubscriberStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); GrpcCallSettings updateSubscriptionTransportSettings = GrpcCallSettings.newBuilder() @@ -361,6 +382,7 @@ protected GrpcSubscriberStub( builder.add("project", String.valueOf(request.getProject())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getProject()) .build(); GrpcCallSettings deleteSubscriptionTransportSettings = GrpcCallSettings.newBuilder() @@ -371,6 +393,7 @@ protected GrpcSubscriberStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); GrpcCallSettings modifyAckDeadlineTransportSettings = GrpcCallSettings.newBuilder() @@ -381,6 +404,7 @@ protected GrpcSubscriberStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); GrpcCallSettings acknowledgeTransportSettings = GrpcCallSettings.newBuilder() @@ -391,6 +415,7 @@ protected GrpcSubscriberStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); GrpcCallSettings pullTransportSettings = GrpcCallSettings.newBuilder() @@ -401,10 +426,12 @@ protected GrpcSubscriberStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); GrpcCallSettings streamingPullTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(streamingPullMethodDescriptor) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); GrpcCallSettings modifyPushConfigTransportSettings = GrpcCallSettings.newBuilder() @@ -415,6 +442,7 @@ protected GrpcSubscriberStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); GrpcCallSettings getSnapshotTransportSettings = GrpcCallSettings.newBuilder() @@ -425,6 +453,7 @@ protected GrpcSubscriberStub( builder.add("snapshot", String.valueOf(request.getSnapshot())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSnapshot()) .build(); GrpcCallSettings listSnapshotsTransportSettings = GrpcCallSettings.newBuilder() @@ -435,6 +464,7 @@ protected GrpcSubscriberStub( builder.add("project", String.valueOf(request.getProject())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getProject()) .build(); GrpcCallSettings createSnapshotTransportSettings = GrpcCallSettings.newBuilder() @@ -445,6 +475,7 @@ protected GrpcSubscriberStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings updateSnapshotTransportSettings = GrpcCallSettings.newBuilder() @@ -465,6 +496,7 @@ protected GrpcSubscriberStub( builder.add("snapshot", String.valueOf(request.getSnapshot())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSnapshot()) .build(); GrpcCallSettings seekTransportSettings = GrpcCallSettings.newBuilder() @@ -475,6 +507,7 @@ protected GrpcSubscriberStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() @@ -485,6 +518,7 @@ protected GrpcSubscriberStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); GrpcCallSettings getIamPolicyTransportSettings = GrpcCallSettings.newBuilder() @@ -495,6 +529,7 @@ protected GrpcSubscriberStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); GrpcCallSettings testIamPermissionsTransportSettings = @@ -506,6 +541,7 @@ protected GrpcSubscriberStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); this.createSubscriptionCallable = diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonPublisherCallableFactory.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonPublisherCallableFactory.java index 3d2309c69..f9da3ee7f 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonPublisherCallableFactory.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonPublisherCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonPublisherStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonPublisherStub.java index 3c129b6ed..011a019de 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonPublisherStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonPublisherStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -582,6 +582,7 @@ protected HttpJsonPublisherStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); HttpJsonCallSettings updateTopicTransportSettings = HttpJsonCallSettings.newBuilder() @@ -604,6 +605,7 @@ protected HttpJsonPublisherStub( builder.add("topic", String.valueOf(request.getTopic())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTopic()) .build(); HttpJsonCallSettings getTopicTransportSettings = HttpJsonCallSettings.newBuilder() @@ -615,6 +617,7 @@ protected HttpJsonPublisherStub( builder.add("topic", String.valueOf(request.getTopic())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTopic()) .build(); HttpJsonCallSettings listTopicsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -626,6 +629,7 @@ protected HttpJsonPublisherStub( builder.add("project", String.valueOf(request.getProject())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getProject()) .build(); HttpJsonCallSettings listTopicSubscriptionsTransportSettings = @@ -639,6 +643,7 @@ protected HttpJsonPublisherStub( builder.add("topic", String.valueOf(request.getTopic())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTopic()) .build(); HttpJsonCallSettings listTopicSnapshotsTransportSettings = @@ -651,6 +656,7 @@ protected HttpJsonPublisherStub( builder.add("topic", String.valueOf(request.getTopic())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTopic()) .build(); HttpJsonCallSettings deleteTopicTransportSettings = HttpJsonCallSettings.newBuilder() @@ -662,6 +668,7 @@ protected HttpJsonPublisherStub( builder.add("topic", String.valueOf(request.getTopic())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTopic()) .build(); HttpJsonCallSettings detachSubscriptionTransportSettings = @@ -674,6 +681,7 @@ protected HttpJsonPublisherStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); HttpJsonCallSettings setIamPolicyTransportSettings = HttpJsonCallSettings.newBuilder() @@ -685,6 +693,7 @@ protected HttpJsonPublisherStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); HttpJsonCallSettings getIamPolicyTransportSettings = HttpJsonCallSettings.newBuilder() @@ -696,6 +705,7 @@ protected HttpJsonPublisherStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); HttpJsonCallSettings testIamPermissionsTransportSettings = @@ -708,6 +718,7 @@ protected HttpJsonPublisherStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); this.createTopicCallable = diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSchemaServiceCallableFactory.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSchemaServiceCallableFactory.java index c4dedadb0..b725059aa 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSchemaServiceCallableFactory.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSchemaServiceCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSchemaServiceStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSchemaServiceStub.java index 1d797dc71..d8f726b6f 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSchemaServiceStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSchemaServiceStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -627,6 +627,7 @@ protected HttpJsonSchemaServiceStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); HttpJsonCallSettings getSchemaTransportSettings = HttpJsonCallSettings.newBuilder() @@ -638,6 +639,7 @@ protected HttpJsonSchemaServiceStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); HttpJsonCallSettings listSchemasTransportSettings = HttpJsonCallSettings.newBuilder() @@ -649,6 +651,7 @@ protected HttpJsonSchemaServiceStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); HttpJsonCallSettings listSchemaRevisionsTransportSettings = @@ -662,6 +665,7 @@ protected HttpJsonSchemaServiceStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); HttpJsonCallSettings commitSchemaTransportSettings = HttpJsonCallSettings.newBuilder() @@ -673,6 +677,7 @@ protected HttpJsonSchemaServiceStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); HttpJsonCallSettings rollbackSchemaTransportSettings = HttpJsonCallSettings.newBuilder() @@ -684,6 +689,7 @@ protected HttpJsonSchemaServiceStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); HttpJsonCallSettings deleteSchemaRevisionTransportSettings = @@ -696,6 +702,7 @@ protected HttpJsonSchemaServiceStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); HttpJsonCallSettings deleteSchemaTransportSettings = HttpJsonCallSettings.newBuilder() @@ -707,6 +714,7 @@ protected HttpJsonSchemaServiceStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); HttpJsonCallSettings validateSchemaTransportSettings = @@ -719,6 +727,7 @@ protected HttpJsonSchemaServiceStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); HttpJsonCallSettings validateMessageTransportSettings = @@ -731,6 +740,7 @@ protected HttpJsonSchemaServiceStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); HttpJsonCallSettings setIamPolicyTransportSettings = HttpJsonCallSettings.newBuilder() @@ -742,6 +752,7 @@ protected HttpJsonSchemaServiceStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); HttpJsonCallSettings getIamPolicyTransportSettings = HttpJsonCallSettings.newBuilder() @@ -753,6 +764,7 @@ protected HttpJsonSchemaServiceStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); HttpJsonCallSettings testIamPermissionsTransportSettings = @@ -765,6 +777,7 @@ protected HttpJsonSchemaServiceStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); this.createSchemaCallable = diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSubscriberCallableFactory.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSubscriberCallableFactory.java index ec35b3dfe..a719f85ef 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSubscriberCallableFactory.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSubscriberCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSubscriberStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSubscriberStub.java index 53559f580..ce9647bd2 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSubscriberStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/HttpJsonSubscriberStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -818,6 +818,7 @@ protected HttpJsonSubscriberStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); HttpJsonCallSettings getSubscriptionTransportSettings = HttpJsonCallSettings.newBuilder() @@ -829,6 +830,7 @@ protected HttpJsonSubscriberStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); HttpJsonCallSettings updateSubscriptionTransportSettings = @@ -854,6 +856,7 @@ protected HttpJsonSubscriberStub( builder.add("project", String.valueOf(request.getProject())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getProject()) .build(); HttpJsonCallSettings deleteSubscriptionTransportSettings = HttpJsonCallSettings.newBuilder() @@ -865,6 +868,7 @@ protected HttpJsonSubscriberStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); HttpJsonCallSettings modifyAckDeadlineTransportSettings = HttpJsonCallSettings.newBuilder() @@ -876,6 +880,7 @@ protected HttpJsonSubscriberStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); HttpJsonCallSettings acknowledgeTransportSettings = HttpJsonCallSettings.newBuilder() @@ -887,6 +892,7 @@ protected HttpJsonSubscriberStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); HttpJsonCallSettings pullTransportSettings = HttpJsonCallSettings.newBuilder() @@ -898,6 +904,7 @@ protected HttpJsonSubscriberStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); HttpJsonCallSettings modifyPushConfigTransportSettings = HttpJsonCallSettings.newBuilder() @@ -909,6 +916,7 @@ protected HttpJsonSubscriberStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); HttpJsonCallSettings getSnapshotTransportSettings = HttpJsonCallSettings.newBuilder() @@ -920,6 +928,7 @@ protected HttpJsonSubscriberStub( builder.add("snapshot", String.valueOf(request.getSnapshot())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSnapshot()) .build(); HttpJsonCallSettings listSnapshotsTransportSettings = @@ -932,6 +941,7 @@ protected HttpJsonSubscriberStub( builder.add("project", String.valueOf(request.getProject())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getProject()) .build(); HttpJsonCallSettings createSnapshotTransportSettings = HttpJsonCallSettings.newBuilder() @@ -943,6 +953,7 @@ protected HttpJsonSubscriberStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); HttpJsonCallSettings updateSnapshotTransportSettings = HttpJsonCallSettings.newBuilder() @@ -965,6 +976,7 @@ protected HttpJsonSubscriberStub( builder.add("snapshot", String.valueOf(request.getSnapshot())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSnapshot()) .build(); HttpJsonCallSettings seekTransportSettings = HttpJsonCallSettings.newBuilder() @@ -976,6 +988,7 @@ protected HttpJsonSubscriberStub( builder.add("subscription", String.valueOf(request.getSubscription())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getSubscription()) .build(); HttpJsonCallSettings setIamPolicyTransportSettings = HttpJsonCallSettings.newBuilder() @@ -987,6 +1000,7 @@ protected HttpJsonSubscriberStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); HttpJsonCallSettings getIamPolicyTransportSettings = HttpJsonCallSettings.newBuilder() @@ -998,6 +1012,7 @@ protected HttpJsonSubscriberStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); HttpJsonCallSettings testIamPermissionsTransportSettings = @@ -1010,6 +1025,7 @@ protected HttpJsonSubscriberStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); this.createSubscriptionCallable = @@ -1223,7 +1239,8 @@ public UnaryCallable getIamPolicyCallable() { public BidiStreamingCallable streamingPullCallable() { throw new UnsupportedOperationException( - "Not implemented: streamingPullCallable(). REST transport is not implemented for this method yet."); + "Not implemented: streamingPullCallable(). REST transport is not implemented for this" + + " method yet."); } @Override diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java index 011ad51e2..5c7f9d6a8 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java index d1640b7aa..a0c47d70d 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,6 +45,7 @@ import com.google.api.gax.rpc.BatchingCallSettings; import com.google.api.gax.rpc.BatchingDescriptor; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.PagedListDescriptor; @@ -131,10 +132,11 @@ * } * * Please refer to the [Client Side Retry - * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for - * additional support in setting retries. + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. */ @Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") public class PublisherStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -595,6 +597,15 @@ protected PublisherStubSettings(Builder settingsBuilder) throws IOException { testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); } + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-pubsub") + .setRepository("googleapis/java-pubsub") + .setVersion(Version.VERSION) + .build(); + } + /** Builder for PublisherStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStub.java index b36f779af..a0335a4b1 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStubSettings.java index 9a1ed164b..2e879a074 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStubSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,6 +36,7 @@ import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.PagedListDescriptor; @@ -122,10 +123,11 @@ * } * * Please refer to the [Client Side Retry - * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for - * additional support in setting retries. + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. */ @Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") public class SchemaServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -460,6 +462,15 @@ protected SchemaServiceStubSettings(Builder settingsBuilder) throws IOException testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); } + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-pubsub") + .setRepository("googleapis/java-pubsub") + .setVersion(Version.VERSION) + .build(); + } + /** Builder for SchemaServiceStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStub.java index 94b56c5a1..115a2f2c8 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStub.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java index 81a585537..5f03d7b03 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,6 +36,7 @@ import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.PagedListDescriptor; @@ -130,10 +131,11 @@ * } * * Please refer to the [Client Side Retry - * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for - * additional support in setting retries. + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. */ @Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") public class SubscriberStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -510,6 +512,15 @@ protected SubscriberStubSettings(Builder settingsBuilder) throws IOException { testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); } + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-pubsub") + .setRepository("googleapis/java-pubsub") + .setVersion(Version.VERSION) + .build(); + } + /** Builder for SubscriberStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; @@ -620,10 +631,10 @@ public static class Builder extends StubSettings.Builder schedule(Runnable command, long delay, TimeUnit unit) { return schedulePendingCallable( new PendingCallable<>( - Duration.ofMillis(unit.toMillis(delay)), command, PendingCallableType.NORMAL)); + Duration.ofMillis(unit.toMillis(delay)), command, null, PendingCallableType.NORMAL)); } @Override public ScheduledFuture schedule(Callable callable, long delay, TimeUnit unit) { return schedulePendingCallable( new PendingCallable<>( - Duration.ofMillis(unit.toMillis(delay)), callable, PendingCallableType.NORMAL)); + Duration.ofMillis(unit.toMillis(delay)), callable, null, PendingCallableType.NORMAL)); } @Override @@ -72,6 +72,7 @@ public ScheduledFuture scheduleAtFixedRate( new PendingCallable<>( Duration.ofMillis(unit.toMillis(initialDelay)), command, + Duration.ofMillis(unit.toMillis(period)), PendingCallableType.FIXED_RATE)); } @@ -82,6 +83,7 @@ public ScheduledFuture scheduleWithFixedDelay( new PendingCallable<>( Duration.ofMillis(unit.toMillis(initialDelay)), command, + Duration.ofMillis(unit.toMillis(delay)), PendingCallableType.FIXED_DELAY)); } @@ -212,13 +214,15 @@ enum PendingCallableType { class PendingCallable implements Comparable> { Instant creationTime = Instant.ofEpochMilli(clock.millisTime()); Duration delay; + Duration period; Callable pendingCallable; SettableFuture future = SettableFuture.create(); AtomicBoolean cancelled = new AtomicBoolean(false); AtomicBoolean done = new AtomicBoolean(false); PendingCallableType type; - PendingCallable(Duration delay, final Runnable runnable, PendingCallableType type) { + PendingCallable( + Duration delay, final Runnable runnable, Duration period, PendingCallableType type) { pendingCallable = new Callable() { @Override @@ -229,12 +233,15 @@ public T call() { }; this.type = type; this.delay = delay; + this.period = period; } - PendingCallable(Duration delay, Callable callable, PendingCallableType type) { + PendingCallable( + Duration delay, Callable callable, Duration period, PendingCallableType type) { pendingCallable = callable; this.type = type; this.delay = delay; + this.period = period; } private Instant getScheduledTime() { @@ -305,10 +312,12 @@ T call() { break; case FIXED_DELAY: this.creationTime = Instant.ofEpochMilli(clock.millisTime()); + this.delay = period; schedulePendingCallable(this); break; case FIXED_RATE: this.creationTime = this.creationTime.plus(delay); + this.delay = period; schedulePendingCallable(this); break; default: diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeSubscriberServiceImpl.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeSubscriberServiceImpl.java index 173248041..3b2bd2f5d 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeSubscriberServiceImpl.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeSubscriberServiceImpl.java @@ -24,6 +24,7 @@ import com.google.pubsub.v1.PublisherGrpc.PublisherImplBase; import com.google.pubsub.v1.PullRequest; import com.google.pubsub.v1.PullResponse; +import com.google.pubsub.v1.ReceivedMessage; import com.google.pubsub.v1.StreamingPullRequest; import com.google.pubsub.v1.StreamingPullResponse; import com.google.pubsub.v1.SubscriberGrpc.SubscriberImplBase; @@ -247,8 +248,26 @@ public void modifyAckDeadline( responseObserver.onCompleted(); } + public void sendMessages(int numMessages) throws InterruptedException { + waitForRegisteredSubscription(); + synchronized (openedStreams) { + waitForOpenedStreams(1); + Stream stream = openedStreams.get(getAndAdvanceCurrentStream()); + StreamingPullResponse.Builder response = StreamingPullResponse.newBuilder(); + for (int i = 0; i < numMessages; i++) { + response.addReceivedMessages( + ReceivedMessage.newBuilder() + .setAckId("ackid" + i) + .setMessage( + com.google.pubsub.v1.PubsubMessage.newBuilder().setMessageId("id" + i).build()) + .build()); + } + stream.responseObserver.onNext(response.build()); + } + } + public void sendError(Throwable error) throws InterruptedException { - waitForRegistedSubscription(); + waitForRegisteredSubscription(); synchronized (openedStreams) { waitForOpenedStreams(1); Stream stream = openedStreams.get(getAndAdvanceCurrentStream()); @@ -257,7 +276,7 @@ public void sendError(Throwable error) throws InterruptedException { } } - public String waitForRegistedSubscription() throws InterruptedException { + public String waitForRegisteredSubscription() throws InterruptedException { synchronized (subscriptionInitialized) { while (!subscriptionInitialized.get()) { subscriptionInitialized.wait(); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java index bd3dccccf..1285fadd5 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java @@ -18,6 +18,9 @@ import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.*; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.argThat; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.*; import com.google.api.gax.batching.FlowController; @@ -35,6 +38,8 @@ import org.mockito.stubbing.Answer; public class MessageDispatcherTest { + private static final String MOCK_SUBSCRIPTION_NAME = + "projects/MOCK-PROJECT/subscriptions/MOCK-SUBSCRIPTION"; private static final ByteString MESSAGE_DATA = ByteString.copyFromUtf8("message-data"); private static final int DELIVERY_INFO_COUNT = 3; private static final String ACK_ID = "ACK-ID"; @@ -462,6 +467,7 @@ public void testAckExtensionDefaultsExactlyOnceDeliveryDisabledThenEnabled() { .setMinDurationPerAckExtensionDefaultUsed(true) .setMaxDurationPerAckExtension(Subscriber.DEFAULT_MAX_ACK_DEADLINE_EXTENSION) .setMaxDurationPerAckExtensionDefaultUsed(true) + .setSubscriptionName(MOCK_SUBSCRIPTION_NAME) .build(); // ExactlyOnceDeliveryEnabled is turned off by default @@ -494,6 +500,7 @@ public void testAckExtensionDefaultsExactlyOnceDeliveryEnabledThenDisabled() { .setMinDurationPerAckExtensionDefaultUsed(true) .setMaxDurationPerAckExtension(Subscriber.DEFAULT_MIN_ACK_DEADLINE_EXTENSION) .setMaxDurationPerAckExtensionDefaultUsed(true) + .setSubscriptionName(MOCK_SUBSCRIPTION_NAME) .build(); // This would normally be set from the streaming pull response in the @@ -605,6 +612,7 @@ public void testAckExtensionCustomMinExactlyOnceDeliveryDisabledThenEnabled() { .setMinDurationPerAckExtensionDefaultUsed(false) .setMaxDurationPerAckExtension(Subscriber.DEFAULT_MIN_ACK_DEADLINE_EXTENSION) .setMaxDurationPerAckExtensionDefaultUsed(true) + .setSubscriptionName(MOCK_SUBSCRIPTION_NAME) .build(); // ExactlyOnceDeliveryEnabled is turned off by default @@ -634,6 +642,7 @@ public void testAckExtensionCustomMaxExactlyOnceDeliveryDisabledThenEnabled() { .setMinDurationPerAckExtensionDefaultUsed(true) .setMaxDurationPerAckExtension(Duration.ofSeconds(customMaxSeconds)) .setMaxDurationPerAckExtensionDefaultUsed(false) + .setSubscriptionName(MOCK_SUBSCRIPTION_NAME) .build(); // ExactlyOnceDeliveryEnabled is turned off by default @@ -704,11 +713,241 @@ private MessageDispatcher getMessageDispatcherFromBuilder( .setAckLatencyDistribution(mock(Distribution.class)) .setFlowController(mock(FlowController.class)) .setExecutor(executor) + .setSubscriptionName(MOCK_SUBSCRIPTION_NAME) .setSystemExecutor(systemExecutor) .setApiClock(clock) + .setSubscriberShutdownSettings(SubscriberShutdownSettings.newBuilder().build()) .build(); messageDispatcher.setMessageDeadlineSeconds(MIN_ACK_DEADLINE_SECONDS); return messageDispatcher; } + + private MessageDispatcher getMessageDispatcherFromBuilder( + MessageDispatcher.Builder builder, SubscriberShutdownSettings shutdownSettings) { + MessageDispatcher messageDispatcher = + builder + .setAckProcessor(mockAckProcessor) + .setAckExpirationPadding(ACK_EXPIRATION_PADDING_DEFAULT) + .setMaxAckExtensionPeriod(MAX_ACK_EXTENSION_PERIOD) + .setMinDurationPerAckExtension(Subscriber.DEFAULT_MIN_ACK_DEADLINE_EXTENSION) + .setMinDurationPerAckExtensionDefaultUsed(true) + .setMaxDurationPerAckExtension(Subscriber.DEFAULT_MAX_ACK_DEADLINE_EXTENSION) + .setMaxDurationPerAckExtensionDefaultUsed(true) + .setAckLatencyDistribution(mock(Distribution.class)) + .setFlowController(mock(FlowController.class)) + .setExecutor(MoreExecutors.newDirectExecutorService()) + .setSubscriptionName(MOCK_SUBSCRIPTION_NAME) + .setSystemExecutor(systemExecutor) + .setApiClock(clock) + .setSubscriberShutdownSettings(shutdownSettings) + .build(); + + messageDispatcher.setMessageDeadlineSeconds(MIN_ACK_DEADLINE_SECONDS); + return messageDispatcher; + } + + @Test + public void testStop_waitForProcessing_indefinite() throws Exception { + SubscriberShutdownSettings shutdownSettings = + SubscriberShutdownSettings.newBuilder() + .setMode(SubscriberShutdownSettings.ShutdownMode.WAIT_FOR_PROCESSING) + .setTimeout(Duration.ofSeconds(-1)) + .build(); + MessageDispatcher dispatcher = + getMessageDispatcherFromBuilder( + MessageDispatcher.newBuilder(messageReceiver), shutdownSettings); + + dispatcher.processReceivedMessages(Collections.singletonList(TEST_MESSAGE)); + + Thread stopThread = new Thread(dispatcher::stop); + stopThread.start(); + + // Wait for the stop thread to block on the waiter. + Thread.sleep(100); + assertTrue(stopThread.isAlive()); + + // Ack the message, which should allow the stop thread to complete. + consumers.take().ack(); + + List ackRequestDataList = new ArrayList(); + AckRequestData ackRequestData = AckRequestData.newBuilder(TEST_MESSAGE.getAckId()).build(); + ackRequestDataList.add(ackRequestData); + + stopThread.join(); + assertFalse(stopThread.isAlive()); + + verify(mockAckProcessor, times(1)) + .sendAckOperations( + argThat(new CustomArgumentMatchers.AckRequestDataListMatcher(ackRequestDataList))); + } + + @Test + public void testStop_waitForProcessing_withTimeout_success() { + SubscriberShutdownSettings shutdownSettings = + SubscriberShutdownSettings.newBuilder() + .setMode(SubscriberShutdownSettings.ShutdownMode.WAIT_FOR_PROCESSING) + .setTimeout(Duration.ofSeconds(5)) + .build(); + MessageDispatcher dispatcher = + getMessageDispatcherFromBuilder( + MessageDispatcher.newBuilder(messageReceiver), shutdownSettings); + + dispatcher.processReceivedMessages(Collections.singletonList(TEST_MESSAGE)); + + Thread stopThread = new Thread(dispatcher::stop); + stopThread.start(); + + // Ack the message before the timeout expires. + try { + consumers.take().ack(); + } catch (InterruptedException e) { + fail("Interrupted while taking consumer"); + } + + try { + stopThread.join(1000); + } catch (InterruptedException e) { + fail("Interrupted while joining stop thread"); + } + + List ackRequestDataList = new ArrayList(); + AckRequestData ackRequestData = AckRequestData.newBuilder(TEST_MESSAGE.getAckId()).build(); + ackRequestDataList.add(ackRequestData); + + verify(mockAckProcessor, times(1)) + .sendAckOperations( + argThat(new CustomArgumentMatchers.AckRequestDataListMatcher(ackRequestDataList))); + assertFalse(stopThread.isAlive()); + } + + @Test + public void testStop_waitForProcessing_withTimeout_nackWithOneSecondLeft() { + SubscriberShutdownSettings shutdownSettings = + SubscriberShutdownSettings.newBuilder() + .setMode(SubscriberShutdownSettings.ShutdownMode.WAIT_FOR_PROCESSING) + .setTimeout(Duration.ofSeconds(2)) + .build(); + MessageDispatcher dispatcher = + getMessageDispatcherFromBuilder( + MessageDispatcher.newBuilder(messageReceiver), shutdownSettings); + + dispatcher.processReceivedMessages(Collections.singletonList(TEST_MESSAGE)); + Thread stopThread = new Thread(dispatcher::stop); + stopThread.start(); + + // Wait for the stop thread to block on the waiter. + try { + Thread.sleep(100); + } catch (InterruptedException e) { + fail("Interrupted while sleeping"); + } + + clock.advance(1500, TimeUnit.MILLISECONDS); + + try { + stopThread.join(); + } catch (InterruptedException e) { + fail("Interrupted while joining stop thread"); + } + // Assert expected behavior + List modackRequestDataList = new ArrayList(); + modackRequestDataList.add( + new ModackRequestData(0, AckRequestData.newBuilder(TEST_MESSAGE.getAckId()).build())); + + verify(mockAckProcessor, times(1)) + .sendModackOperations( + argThat( + new CustomArgumentMatchers.ModackRequestDataListMatcher(modackRequestDataList))); + verify(mockAckProcessor, times(1)) + .sendAckOperations( + argThat(new CustomArgumentMatchers.AckRequestDataListMatcher(Collections.emptyList()))); + } + + @Test + public void testStop_nackImmediately() { + SubscriberShutdownSettings shutdownSettings = + SubscriberShutdownSettings.newBuilder() + .setMode(SubscriberShutdownSettings.ShutdownMode.NACK_IMMEDIATELY) + .build(); + MessageDispatcher dispatcher = + getMessageDispatcherFromBuilder( + MessageDispatcher.newBuilder(messageReceiver), shutdownSettings); + + dispatcher.processReceivedMessages(Collections.singletonList(TEST_MESSAGE)); + dispatcher.stop(); + + // Assert expected behavior + List modackRequestDataList = new ArrayList(); + modackRequestDataList.add( + new ModackRequestData(0, AckRequestData.newBuilder(TEST_MESSAGE.getAckId()).build())); + + verify(mockAckProcessor, times(1)) + .sendModackOperations( + argThat( + new CustomArgumentMatchers.ModackRequestDataListMatcher(modackRequestDataList))); + verify(mockAckProcessor, times(1)) + .sendAckOperations( + argThat(new CustomArgumentMatchers.AckRequestDataListMatcher(Collections.emptyList()))); + } + + @Test + public void testAckDuringNackImmediatelyShutdown() throws Exception { + SubscriberShutdownSettings shutdownSettings = + SubscriberShutdownSettings.newBuilder() + .setMode(SubscriberShutdownSettings.ShutdownMode.NACK_IMMEDIATELY) + .build(); + MessageDispatcher dispatcher = + getMessageDispatcherFromBuilder( + MessageDispatcher.newBuilder(messageReceiverWithAckResponse), shutdownSettings); + dispatcher.setExactlyOnceDeliveryEnabled(true); + + dispatcher.processReceivedMessages(Collections.singletonList(TEST_MESSAGE)); + dispatcher.processOutstandingOperations(); + + List receiptModackRequestDataList = new ArrayList(); + AckRequestData receiptModackRequestData = + AckRequestData.newBuilder(TEST_MESSAGE.getAckId()).build(); + receiptModackRequestDataList.add( + new ModackRequestData(MIN_ACK_DEADLINE_SECONDS, receiptModackRequestData)); + dispatcher.notifyAckSuccess(receiptModackRequestData); + + verify(mockAckProcessor, times(1)) + .sendModackOperations( + argThat( + new CustomArgumentMatchers.ModackRequestDataListMatcher( + receiptModackRequestDataList))); + + Thread stopThread = + new Thread( + () -> { + dispatcher.stop(); + }); + stopThread.start(); + + // Wait for the stop process to start. + while (!dispatcher.getNackImmediatelyShutdownInProgress()) { + Thread.sleep(1); + } + + // Try to ack the message. + AckResponse reply = consumersWithResponse.take().ack().get(); + assertThat(reply.equals(AckResponse.OTHER)); + + stopThread.join(); + + // Assert expected behavior + List modackRequestDataList = new ArrayList(); + modackRequestDataList.add( + new ModackRequestData(0, AckRequestData.newBuilder(TEST_MESSAGE.getAckId()).build())); + + // The message should have been nacked, not acked. + verify(mockAckProcessor, times(1)) + .sendModackOperations( + argThat( + new CustomArgumentMatchers.ModackRequestDataListMatcher(modackRequestDataList))); + verify(mockAckProcessor, times(2)) + .sendAckOperations( + argThat(new CustomArgumentMatchers.AckRequestDataListMatcher(Collections.emptyList()))); + } } diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockIAMPolicy.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockIAMPolicy.java index 9b682f478..3c447fc4f 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockIAMPolicy.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockIAMPolicy.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockIAMPolicyImpl.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockIAMPolicyImpl.java index f65568ec0..9b3838e1f 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockIAMPolicyImpl.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockIAMPolicyImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisher.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisher.java index adb60419d..f992f4bba 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisher.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisher.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java index 75c254dc5..5e9ecad09 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockPublisherImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -189,7 +189,8 @@ public void listTopicSubscriptions( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method ListTopicSubscriptions, expected %s or %s", + "Unrecognized response type %s for method ListTopicSubscriptions, expected %s or" + + " %s", response == null ? "null" : response.getClass().getName(), ListTopicSubscriptionsResponse.class.getName(), Exception.class.getName()))); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSchemaService.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSchemaService.java index 2073458cc..e986b7ed5 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSchemaService.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSchemaService.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSchemaServiceImpl.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSchemaServiceImpl.java index f49e2cc45..92c412f10 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSchemaServiceImpl.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSchemaServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -212,7 +212,8 @@ public void deleteSchemaRevision( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method DeleteSchemaRevision, expected %s or %s", + "Unrecognized response type %s for method DeleteSchemaRevision, expected %s or" + + " %s", response == null ? "null" : response.getClass().getName(), Schema.class.getName(), Exception.class.getName()))); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriber.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriber.java index 33c80a111..a0547f660 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriber.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriber.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriberImpl.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriberImpl.java index d2d892031..81d0ddef2 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriberImpl.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MockSubscriberImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -265,7 +265,8 @@ public void onNext(StreamingPullRequest value) { responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method StreamingPull, expected %s or %s", + "Unrecognized response type %s for method StreamingPull, expected %s or" + + " %s", response == null ? "null" : response.getClass().getName(), StreamingPullResponse.class.getName(), Exception.class.getName()))); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/OpenTelemetryTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/OpenTelemetryTest.java index b4433f41e..52351ddef 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/OpenTelemetryTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/OpenTelemetryTest.java @@ -35,7 +35,6 @@ import io.opentelemetry.sdk.trace.data.LinkData; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.data.StatusData; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.util.Arrays; import java.util.List; import org.junit.Test; @@ -82,6 +81,13 @@ public class OpenTelemetryTest { private static final String ACK_START_EVENT = "ack start"; private static final String ACK_END_EVENT = "ack end"; + private static final String MESSAGING_SYSTEM_ATTR_KEY = "messaging.system"; + private static final String MESSAGING_DESTINATION_NAME_ATTR_KEY = "messaging.destination.name"; + private static final String CODE_FUNCTION_ATTR_KEY = "code.function"; + private static final String MESSAGING_OPERATION_ATTR_KEY = "messaging.operation"; + private static final String MESSAGING_BATCH_MESSAGE_COUNT_ATTR_KEY = + "messaging.batch.message_count"; + private static final String MESSAGING_MESSAGE_ID_ATTR_KEY = "messaging.message.id"; private static final String MESSAGING_SYSTEM_VALUE = "gcp_pubsub"; private static final String PROJECT_ATTR_KEY = "gcp.project_id"; private static final String MESSAGE_SIZE_ATTR_KEY = "messaging.message.body.size"; @@ -104,7 +110,7 @@ public void testPublishSpansSuccess() { openTelemetryTesting.clearSpans(); PubsubMessageWrapper messageWrapper = - PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME.toString()).build(); + PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME).build(); List messageWrappers = Arrays.asList(messageWrapper); long messageSize = messageWrapper.getPubsubMessage().getData().size(); @@ -117,7 +123,7 @@ public void testPublishSpansSuccess() { tracer.endPublishFlowControlSpan(messageWrapper); tracer.startPublishBatchingSpan(messageWrapper); tracer.endPublishBatchingSpan(messageWrapper); - Span publishRpcSpan = tracer.startPublishRpcSpan(FULL_TOPIC_NAME.toString(), messageWrappers); + Span publishRpcSpan = tracer.startPublishRpcSpan(FULL_TOPIC_NAME, messageWrappers); tracer.endPublishRpcSpan(publishRpcSpan); tracer.setPublisherMessageIdSpanAttribute(messageWrapper, MESSAGE_ID); tracer.endPublisherSpan(messageWrapper); @@ -159,12 +165,12 @@ public void testPublishSpansSuccess() { AttributesAssert publishRpcSpanAttributesAssert = OpenTelemetryAssertions.assertThat(publishRpcSpanData.getAttributes()); publishRpcSpanAttributesAssert - .containsEntry(SemanticAttributes.MESSAGING_SYSTEM, MESSAGING_SYSTEM_VALUE) - .containsEntry(SemanticAttributes.MESSAGING_DESTINATION_NAME, FULL_TOPIC_NAME.getTopic()) + .containsEntry(MESSAGING_SYSTEM_ATTR_KEY, MESSAGING_SYSTEM_VALUE) + .containsEntry(MESSAGING_DESTINATION_NAME_ATTR_KEY, FULL_TOPIC_NAME.getTopic()) .containsEntry(PROJECT_ATTR_KEY, FULL_TOPIC_NAME.getProject()) - .containsEntry(SemanticAttributes.CODE_FUNCTION, "publishCall") - .containsEntry(SemanticAttributes.MESSAGING_OPERATION, "publish") - .containsEntry(SemanticAttributes.MESSAGING_BATCH_MESSAGE_COUNT, messageWrappers.size()); + .containsEntry(CODE_FUNCTION_ATTR_KEY, "publishCall") + .containsEntry(MESSAGING_OPERATION_ATTR_KEY, "publish") + .containsEntry(MESSAGING_BATCH_MESSAGE_COUNT_ATTR_KEY, messageWrappers.size()); // Check span data, events, links, and attributes for the publisher create span SpanDataAssert publisherSpanDataAssert = OpenTelemetryAssertions.assertThat(publisherSpanData); @@ -190,14 +196,14 @@ public void testPublishSpansSuccess() { AttributesAssert publisherSpanAttributesAssert = OpenTelemetryAssertions.assertThat(publisherSpanData.getAttributes()); publisherSpanAttributesAssert - .containsEntry(SemanticAttributes.MESSAGING_SYSTEM, MESSAGING_SYSTEM_VALUE) - .containsEntry(SemanticAttributes.MESSAGING_DESTINATION_NAME, FULL_TOPIC_NAME.getTopic()) + .containsEntry(MESSAGING_SYSTEM_ATTR_KEY, MESSAGING_SYSTEM_VALUE) + .containsEntry(MESSAGING_DESTINATION_NAME_ATTR_KEY, FULL_TOPIC_NAME.getTopic()) .containsEntry(PROJECT_ATTR_KEY, PROJECT_NAME) - .containsEntry(SemanticAttributes.CODE_FUNCTION, "publish") - .containsEntry(SemanticAttributes.MESSAGING_OPERATION, "create") + .containsEntry(CODE_FUNCTION_ATTR_KEY, "publish") + .containsEntry(MESSAGING_OPERATION_ATTR_KEY, "create") .containsEntry(ORDERING_KEY_ATTR_KEY, ORDERING_KEY) .containsEntry(MESSAGE_SIZE_ATTR_KEY, messageSize) - .containsEntry(SemanticAttributes.MESSAGING_MESSAGE_ID, MESSAGE_ID); + .containsEntry(MESSAGING_MESSAGE_ID_ATTR_KEY, MESSAGE_ID); // Check that the message has the attribute containing the trace context. PubsubMessage message = messageWrapper.getPubsubMessage(); @@ -218,7 +224,7 @@ public void testPublishFlowControlSpanFailure() { openTelemetryTesting.clearSpans(); PubsubMessageWrapper messageWrapper = - PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME.toString()).build(); + PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME).build(); Tracer openTelemetryTracer = openTelemetryTesting.getOpenTelemetry().getTracer("test"); OpenTelemetryPubsubTracer tracer = new OpenTelemetryPubsubTracer(openTelemetryTracer, true); @@ -258,14 +264,14 @@ public void testPublishRpcSpanFailure() { openTelemetryTesting.clearSpans(); PubsubMessageWrapper messageWrapper = - PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME.toString()).build(); + PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME).build(); List messageWrappers = Arrays.asList(messageWrapper); Tracer openTelemetryTracer = openTelemetryTesting.getOpenTelemetry().getTracer("test"); OpenTelemetryPubsubTracer tracer = new OpenTelemetryPubsubTracer(openTelemetryTracer, true); tracer.startPublisherSpan(messageWrapper); - Span publishRpcSpan = tracer.startPublishRpcSpan(FULL_TOPIC_NAME.toString(), messageWrappers); + Span publishRpcSpan = tracer.startPublishRpcSpan(FULL_TOPIC_NAME, messageWrappers); Exception e = new Exception("test-exception"); tracer.setPublishRpcSpanException(publishRpcSpan, e); @@ -302,7 +308,7 @@ public void testSubscribeSpansSuccess() { OpenTelemetryPubsubTracer tracer = new OpenTelemetryPubsubTracer(openTelemetryTracer, true); PubsubMessageWrapper publishMessageWrapper = - PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME.toString()).build(); + PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME).build(); // Initialize the Publisher span to inject the context in the message tracer.startPublisherSpan(publishMessageWrapper); tracer.endPublisherSpan(publishMessageWrapper); @@ -310,8 +316,7 @@ public void testSubscribeSpansSuccess() { PubsubMessage publishedMessage = publishMessageWrapper.getPubsubMessage().toBuilder().setMessageId(MESSAGE_ID).build(); PubsubMessageWrapper subscribeMessageWrapper = - PubsubMessageWrapper.newBuilder( - publishedMessage, FULL_SUBSCRIPTION_NAME.toString(), ACK_ID, 1) + PubsubMessageWrapper.newBuilder(publishedMessage, FULL_SUBSCRIPTION_NAME, ACK_ID, 1) .build(); List subscribeMessageWrappers = Arrays.asList(subscribeMessageWrapper); @@ -327,21 +332,17 @@ public void testSubscribeSpansSuccess() { tracer.endSubscribeProcessSpan(subscribeMessageWrapper, PROCESS_ACTION); Span subscribeModackRpcSpan = tracer.startSubscribeRpcSpan( - FULL_SUBSCRIPTION_NAME.toString(), - "modack", - subscribeMessageWrappers, - ACK_DEADLINE, - true); + FULL_SUBSCRIPTION_NAME, "modack", subscribeMessageWrappers, ACK_DEADLINE, true); tracer.endSubscribeRpcSpan(subscribeModackRpcSpan); tracer.addEndRpcEvent(subscribeMessageWrapper, true, true, ACK_DEADLINE); Span subscribeAckRpcSpan = tracer.startSubscribeRpcSpan( - FULL_SUBSCRIPTION_NAME.toString(), "ack", subscribeMessageWrappers, 0, false); + FULL_SUBSCRIPTION_NAME, "ack", subscribeMessageWrappers, 0, false); tracer.endSubscribeRpcSpan(subscribeAckRpcSpan); tracer.addEndRpcEvent(subscribeMessageWrapper, true, false, 0); Span subscribeNackRpcSpan = tracer.startSubscribeRpcSpan( - FULL_SUBSCRIPTION_NAME.toString(), "nack", subscribeMessageWrappers, 0, false); + FULL_SUBSCRIPTION_NAME, "nack", subscribeMessageWrappers, 0, false); tracer.endSubscribeRpcSpan(subscribeNackRpcSpan); tracer.addEndRpcEvent(subscribeMessageWrapper, true, true, 0); tracer.endSubscriberSpan(subscribeMessageWrapper); @@ -398,14 +399,13 @@ public void testSubscribeSpansSuccess() { AttributesAssert modackRpcSpanAttributesAssert = OpenTelemetryAssertions.assertThat(modackRpcSpanData.getAttributes()); modackRpcSpanAttributesAssert - .containsEntry(SemanticAttributes.MESSAGING_SYSTEM, MESSAGING_SYSTEM_VALUE) + .containsEntry(MESSAGING_SYSTEM_ATTR_KEY, MESSAGING_SYSTEM_VALUE) .containsEntry( - SemanticAttributes.MESSAGING_DESTINATION_NAME, FULL_SUBSCRIPTION_NAME.getSubscription()) + MESSAGING_DESTINATION_NAME_ATTR_KEY, FULL_SUBSCRIPTION_NAME.getSubscription()) .containsEntry(PROJECT_ATTR_KEY, FULL_TOPIC_NAME.getProject()) - .containsEntry(SemanticAttributes.CODE_FUNCTION, "sendModAckOperations") - .containsEntry(SemanticAttributes.MESSAGING_OPERATION, "modack") - .containsEntry( - SemanticAttributes.MESSAGING_BATCH_MESSAGE_COUNT, subscribeMessageWrappers.size()) + .containsEntry(CODE_FUNCTION_ATTR_KEY, "sendModAckOperations") + .containsEntry(MESSAGING_OPERATION_ATTR_KEY, "modack") + .containsEntry(MESSAGING_BATCH_MESSAGE_COUNT_ATTR_KEY, subscribeMessageWrappers.size()) .containsEntry(ACK_DEADLINE_ATTR_KEY, 10) .containsEntry(RECEIPT_MODACK_ATTR_KEY, true); @@ -425,14 +425,13 @@ public void testSubscribeSpansSuccess() { AttributesAssert ackRpcSpanAttributesAssert = OpenTelemetryAssertions.assertThat(ackRpcSpanData.getAttributes()); ackRpcSpanAttributesAssert - .containsEntry(SemanticAttributes.MESSAGING_SYSTEM, MESSAGING_SYSTEM_VALUE) + .containsEntry(MESSAGING_SYSTEM_ATTR_KEY, MESSAGING_SYSTEM_VALUE) .containsEntry( - SemanticAttributes.MESSAGING_DESTINATION_NAME, FULL_SUBSCRIPTION_NAME.getSubscription()) + MESSAGING_DESTINATION_NAME_ATTR_KEY, FULL_SUBSCRIPTION_NAME.getSubscription()) .containsEntry(PROJECT_ATTR_KEY, FULL_TOPIC_NAME.getProject()) - .containsEntry(SemanticAttributes.CODE_FUNCTION, "sendAckOperations") - .containsEntry(SemanticAttributes.MESSAGING_OPERATION, "ack") - .containsEntry( - SemanticAttributes.MESSAGING_BATCH_MESSAGE_COUNT, subscribeMessageWrappers.size()); + .containsEntry(CODE_FUNCTION_ATTR_KEY, "sendAckOperations") + .containsEntry(MESSAGING_OPERATION_ATTR_KEY, "ack") + .containsEntry(MESSAGING_BATCH_MESSAGE_COUNT_ATTR_KEY, subscribeMessageWrappers.size()); // Check span data, links, and attributes for the nack RPC span SpanDataAssert nackRpcSpanDataAssert = OpenTelemetryAssertions.assertThat(nackRpcSpanData); @@ -450,14 +449,13 @@ public void testSubscribeSpansSuccess() { AttributesAssert nackRpcSpanAttributesAssert = OpenTelemetryAssertions.assertThat(nackRpcSpanData.getAttributes()); nackRpcSpanAttributesAssert - .containsEntry(SemanticAttributes.MESSAGING_SYSTEM, MESSAGING_SYSTEM_VALUE) + .containsEntry(MESSAGING_SYSTEM_ATTR_KEY, MESSAGING_SYSTEM_VALUE) .containsEntry( - SemanticAttributes.MESSAGING_DESTINATION_NAME, FULL_SUBSCRIPTION_NAME.getSubscription()) + MESSAGING_DESTINATION_NAME_ATTR_KEY, FULL_SUBSCRIPTION_NAME.getSubscription()) .containsEntry(PROJECT_ATTR_KEY, FULL_TOPIC_NAME.getProject()) - .containsEntry(SemanticAttributes.CODE_FUNCTION, "sendModAckOperations") - .containsEntry(SemanticAttributes.MESSAGING_OPERATION, "nack") - .containsEntry( - SemanticAttributes.MESSAGING_BATCH_MESSAGE_COUNT, subscribeMessageWrappers.size()); + .containsEntry(CODE_FUNCTION_ATTR_KEY, "sendModAckOperations") + .containsEntry(MESSAGING_OPERATION_ATTR_KEY, "nack") + .containsEntry(MESSAGING_BATCH_MESSAGE_COUNT_ATTR_KEY, subscribeMessageWrappers.size()); // Check span data, events, links, and attributes for the publisher create span SpanDataAssert subscriberSpanDataAssert = @@ -498,18 +496,18 @@ public void testSubscribeSpansSuccess() { AttributesAssert subscriberSpanAttributesAssert = OpenTelemetryAssertions.assertThat(subscriberSpanData.getAttributes()); subscriberSpanAttributesAssert - .containsEntry(SemanticAttributes.MESSAGING_SYSTEM, MESSAGING_SYSTEM_VALUE) + .containsEntry(MESSAGING_SYSTEM_ATTR_KEY, MESSAGING_SYSTEM_VALUE) .containsEntry( - SemanticAttributes.MESSAGING_DESTINATION_NAME, FULL_SUBSCRIPTION_NAME.getSubscription()) + MESSAGING_DESTINATION_NAME_ATTR_KEY, FULL_SUBSCRIPTION_NAME.getSubscription()) .containsEntry(PROJECT_ATTR_KEY, PROJECT_NAME) - .containsEntry(SemanticAttributes.CODE_FUNCTION, "onResponse") + .containsEntry(CODE_FUNCTION_ATTR_KEY, "onResponse") .containsEntry(MESSAGE_SIZE_ATTR_KEY, messageSize) .containsEntry(ORDERING_KEY_ATTR_KEY, ORDERING_KEY) .containsEntry(MESSAGE_ACK_ID_ATTR_KEY, ACK_ID) .containsEntry(MESSAGE_DELIVERY_ATTEMPT_ATTR_KEY, DELIVERY_ATTEMPT) .containsEntry(MESSAGE_EXACTLY_ONCE_ATTR_KEY, EXACTLY_ONCE_ENABLED) .containsEntry(MESSAGE_RESULT_ATTR_KEY, PROCESS_ACTION) - .containsEntry(SemanticAttributes.MESSAGING_MESSAGE_ID, MESSAGE_ID); + .containsEntry(MESSAGING_MESSAGE_ID_ATTR_KEY, MESSAGE_ID); } @Test @@ -518,7 +516,7 @@ public void testSubscribeConcurrencyControlSpanFailure() { PubsubMessageWrapper messageWrapper = PubsubMessageWrapper.newBuilder( - getPubsubMessage(), FULL_SUBSCRIPTION_NAME.toString(), ACK_ID, DELIVERY_ATTEMPT) + getPubsubMessage(), FULL_SUBSCRIPTION_NAME, ACK_ID, DELIVERY_ATTEMPT) .build(); Tracer openTelemetryTracer = openTelemetryTesting.getOpenTelemetry().getTracer("test"); @@ -562,7 +560,7 @@ public void testSubscriberSpanFailure() { PubsubMessageWrapper messageWrapper = PubsubMessageWrapper.newBuilder( - getPubsubMessage(), FULL_SUBSCRIPTION_NAME.toString(), ACK_ID, DELIVERY_ATTEMPT) + getPubsubMessage(), FULL_SUBSCRIPTION_NAME, ACK_ID, DELIVERY_ATTEMPT) .build(); Tracer openTelemetryTracer = openTelemetryTesting.getOpenTelemetry().getTracer("test"); @@ -595,7 +593,7 @@ public void testSubscribeRpcSpanFailures() { PubsubMessageWrapper messageWrapper = PubsubMessageWrapper.newBuilder( - getPubsubMessage(), FULL_SUBSCRIPTION_NAME.toString(), ACK_ID, DELIVERY_ATTEMPT) + getPubsubMessage(), FULL_SUBSCRIPTION_NAME, ACK_ID, DELIVERY_ATTEMPT) .build(); List messageWrappers = Arrays.asList(messageWrapper); @@ -605,13 +603,11 @@ public void testSubscribeRpcSpanFailures() { tracer.startSubscriberSpan(messageWrapper, EXACTLY_ONCE_ENABLED); Span subscribeModackRpcSpan = tracer.startSubscribeRpcSpan( - FULL_SUBSCRIPTION_NAME.toString(), "modack", messageWrappers, ACK_DEADLINE, true); + FULL_SUBSCRIPTION_NAME, "modack", messageWrappers, ACK_DEADLINE, true); Span subscribeAckRpcSpan = - tracer.startSubscribeRpcSpan( - FULL_SUBSCRIPTION_NAME.toString(), "ack", messageWrappers, 0, false); + tracer.startSubscribeRpcSpan(FULL_SUBSCRIPTION_NAME, "ack", messageWrappers, 0, false); Span subscribeNackRpcSpan = - tracer.startSubscribeRpcSpan( - FULL_SUBSCRIPTION_NAME.toString(), "nack", messageWrappers, 0, false); + tracer.startSubscribeRpcSpan(FULL_SUBSCRIPTION_NAME, "nack", messageWrappers, 0, false); Exception e = new Exception("test-exception"); tracer.setSubscribeRpcSpanException(subscribeModackRpcSpan, true, ACK_DEADLINE, e); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java index cdefa84f7..39155c848 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java @@ -118,8 +118,7 @@ public void testPublishByDuration() throws Exception { getTestPublisherBuilder() // To demonstrate that reaching duration will trigger publish .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setDelayThresholdDuration(Duration.ofSeconds(5)) .setElementCountThreshold(10L) .build()) @@ -148,8 +147,7 @@ public void testPublishByNumBatchedMessages() throws Exception { Publisher publisher = getTestPublisherBuilder() .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(2L) .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) @@ -187,8 +185,7 @@ public void testSinglePublishByNumBytes() throws Exception { Publisher publisher = getTestPublisherBuilder() .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(2L) .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) @@ -223,8 +220,7 @@ public void testPublishByShutdown() throws Exception { Publisher publisher = getTestPublisherBuilder() .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setDelayThresholdDuration(Duration.ofSeconds(100)) .setElementCountThreshold(10L) .build()) @@ -256,8 +252,7 @@ public void testPublishMixedSizeAndDuration() throws Exception { getTestPublisherBuilder() // To demonstrate that reaching duration will trigger publish .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(2L) .setDelayThresholdDuration(Duration.ofSeconds(5)) .build()) @@ -297,8 +292,7 @@ public void testPublishWithCompression() throws Exception { Publisher publisher = getTestPublisherBuilder() .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(2L) .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) @@ -328,8 +322,7 @@ public void testBatchedMessagesWithOrderingKeyByNum() throws Exception { Publisher publisher = getTestPublisherBuilder() .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(3L) .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) @@ -381,8 +374,7 @@ public void testBatchedMessagesWithOrderingKeyByDuration() throws Exception { Publisher publisher = getTestPublisherBuilder() .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(10L) .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) @@ -444,8 +436,7 @@ public void testLargeMessagesDoNotReorderBatches() throws Exception { Publisher publisher = getTestPublisherBuilder() .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(10L) .setRequestByteThreshold(64L) .setDelayThresholdDuration(Duration.ofSeconds(100)) @@ -488,8 +479,7 @@ public void testEnableMessageOrdering_overwritesMaxAttempts() throws Exception { getTestPublisherBuilder() .setExecutorProvider(SINGLE_THREAD_EXECUTOR) .setRetrySettings( - Publisher.Builder.DEFAULT_RETRY_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_RETRY_SETTINGS.toBuilder() .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(1) .build()) @@ -671,8 +661,7 @@ public void testErrorPropagation() throws Exception { getTestPublisherBuilder() .setExecutorProvider(SINGLE_THREAD_EXECUTOR) .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(1L) .setDelayThresholdDuration(Duration.ofSeconds(5)) .build()) @@ -692,8 +681,7 @@ public void testPublishFailureRetries() throws Exception { getTestPublisherBuilder() .setExecutorProvider(SINGLE_THREAD_EXECUTOR) .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(1L) .setDelayThresholdDuration(Duration.ofSeconds(5)) .build()) @@ -716,8 +704,7 @@ public void testPublishFailureRetries_retriesDisabled() throws Exception { getTestPublisherBuilder() .setExecutorProvider(SINGLE_THREAD_EXECUTOR) .setRetrySettings( - Publisher.Builder.DEFAULT_RETRY_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_RETRY_SETTINGS.toBuilder() .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(1) .build()) @@ -741,8 +728,7 @@ public void testPublishFailureRetries_maxRetriesSetup() throws Exception { getTestPublisherBuilder() .setExecutorProvider(SINGLE_THREAD_EXECUTOR) .setRetrySettings( - Publisher.Builder.DEFAULT_RETRY_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_RETRY_SETTINGS.toBuilder() .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(3) .build()) @@ -766,8 +752,7 @@ public void testPublishFailureRetries_maxRetriesSetUnlimited() throws Exception getTestPublisherBuilder() .setExecutorProvider(SINGLE_THREAD_EXECUTOR) .setRetrySettings( - Publisher.Builder.DEFAULT_RETRY_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_RETRY_SETTINGS.toBuilder() .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(0) .build()) @@ -792,13 +777,11 @@ public void testPublishFailureRetries_nonRetryableFailsImmediately() throws Exce getTestPublisherBuilder() .setExecutorProvider(SINGLE_THREAD_EXECUTOR) .setRetrySettings( - Publisher.Builder.DEFAULT_RETRY_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_RETRY_SETTINGS.toBuilder() .setTotalTimeoutDuration(Duration.ofSeconds(10)) .build()) .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(1L) .setDelayThresholdDuration(Duration.ofSeconds(5)) .build()) @@ -876,8 +859,7 @@ public void testBuilderInvalidArguments() { } try { builder.setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setRequestByteThreshold(null) .build()); fail("Should have thrown an NullPointerException"); @@ -886,8 +868,7 @@ public void testBuilderInvalidArguments() { } try { builder.setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setRequestByteThreshold(0L) .build()); fail("Should have thrown an IllegalArgumentException"); @@ -896,8 +877,7 @@ public void testBuilderInvalidArguments() { } try { builder.setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setRequestByteThreshold(-1L) .build()); fail("Should have thrown an IllegalArgumentException"); @@ -906,8 +886,7 @@ public void testBuilderInvalidArguments() { } builder.setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setDelayThresholdDuration(Duration.ofMillis(1)) .build()); try { @@ -919,8 +898,7 @@ public void testBuilderInvalidArguments() { } try { builder.setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setDelayThresholdDuration(Duration.ofMillis(-1)) .build()); fail("Should have thrown an IllegalArgumentException"); @@ -929,14 +907,12 @@ public void testBuilderInvalidArguments() { } builder.setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(1L) .build()); try { builder.setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(null) .build()); fail("Should have thrown an NullPointerException"); @@ -945,8 +921,7 @@ public void testBuilderInvalidArguments() { } try { builder.setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(0L) .build()); fail("Should have thrown an IllegalArgumentException"); @@ -955,8 +930,7 @@ public void testBuilderInvalidArguments() { } try { builder.setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(-1L) .build()); fail("Should have thrown an IllegalArgumentException"); @@ -965,14 +939,12 @@ public void testBuilderInvalidArguments() { } builder.setRetrySettings( - Publisher.Builder.DEFAULT_RETRY_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_RETRY_SETTINGS.toBuilder() .setInitialRpcTimeoutDuration(Publisher.Builder.MIN_RPC_TIMEOUT) .build()); try { builder.setRetrySettings( - Publisher.Builder.DEFAULT_RETRY_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_RETRY_SETTINGS.toBuilder() .setInitialRpcTimeoutDuration(Publisher.Builder.MIN_RPC_TIMEOUT.minusMillis(1)) .build()); fail("Should have thrown an IllegalArgumentException"); @@ -980,14 +952,12 @@ public void testBuilderInvalidArguments() { // Expected } builder.setRetrySettings( - Publisher.Builder.DEFAULT_RETRY_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_RETRY_SETTINGS.toBuilder() .setTotalTimeoutDuration(Publisher.Builder.MIN_TOTAL_TIMEOUT) .build()); try { builder.setRetrySettings( - Publisher.Builder.DEFAULT_RETRY_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_RETRY_SETTINGS.toBuilder() .setTotalTimeoutDuration(Publisher.Builder.MIN_TOTAL_TIMEOUT.minusMillis(1)) .build()); fail("Should have thrown an IllegalArgumentException"); @@ -1001,8 +971,7 @@ public void testPartialBatchingSettings() throws Exception { Publisher publisher = getTestPublisherBuilder() .setBatchingSettings( - Publisher.Builder.getDefaultBatchingSettings() - .toBuilder() + Publisher.Builder.getDefaultBatchingSettings().toBuilder() .setRequestByteThreshold(5000L) .build()) .build(); @@ -1014,8 +983,7 @@ public void testPartialBatchingSettings() throws Exception { publisher = getTestPublisherBuilder() .setBatchingSettings( - Publisher.Builder.getDefaultBatchingSettings() - .toBuilder() + Publisher.Builder.getDefaultBatchingSettings().toBuilder() .setElementCountThreshold(500L) .build()) .build(); @@ -1031,8 +999,7 @@ public void testAwaitTermination() throws Exception { getTestPublisherBuilder() .setExecutorProvider(SINGLE_THREAD_EXECUTOR) .setRetrySettings( - Publisher.Builder.DEFAULT_RETRY_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_RETRY_SETTINGS.toBuilder() .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(0) .build()) @@ -1065,8 +1032,7 @@ public void invalidFlowControlBytes_throwException() throws Exception { Publisher publisher = getTestPublisherBuilder() .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(1L) .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( @@ -1090,8 +1056,7 @@ public void invalidFlowControlElementCount_throwException() throws Exception { Publisher publisher = getTestPublisherBuilder() .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(1L) .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( @@ -1115,8 +1080,7 @@ public void testMessageExceedsFlowControlLimits_throwException() throws Exceptio getTestPublisherBuilder() .setExecutorProvider(SINGLE_THREAD_EXECUTOR) .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(1L) .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( @@ -1143,8 +1107,7 @@ public void testPublishFlowControl_throwException() throws Exception { getTestPublisherBuilder() .setExecutorProvider(SINGLE_THREAD_EXECUTOR) .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(1L) .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( @@ -1185,8 +1148,7 @@ public void testPublishFlowControl_throwExceptionWithOrderingKey() throws Except getTestPublisherBuilder() .setExecutorProvider(SINGLE_THREAD_EXECUTOR) .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(1L) .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( @@ -1232,8 +1194,7 @@ public void testPublishFlowControl_block() throws Exception { getTestPublisherBuilder() .setExecutorProvider(SINGLE_THREAD_EXECUTOR) .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(1L) .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( @@ -1324,8 +1285,7 @@ public void testPublishOpenTelemetryTracing() throws Exception { final Publisher publisher = getTestPublisherBuilder() .setBatchingSettings( - Publisher.Builder.DEFAULT_BATCHING_SETTINGS - .toBuilder() + Publisher.Builder.DEFAULT_BATCHING_SETTINGS.toBuilder() .setElementCountThreshold(1L) .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SchemaServiceClientHttpJsonTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SchemaServiceClientHttpJsonTest.java index 06df1993b..1d15eafde 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SchemaServiceClientHttpJsonTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SchemaServiceClientHttpJsonTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/test/java/com/google/cloud/pubsub/v1/SchemaServiceClientTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SchemaServiceClientTest.java index a33b9c5bd..f17ef1366 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SchemaServiceClientTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SchemaServiceClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java index 412dd2ad8..6979963a5 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java @@ -17,6 +17,8 @@ package com.google.cloud.pubsub.v1; import static org.junit.Assert.*; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.Mockito.*; import com.google.api.core.ApiFutures; @@ -24,24 +26,37 @@ import com.google.api.gax.batching.FlowControlSettings; import com.google.api.gax.batching.FlowController; import com.google.api.gax.core.Distribution; +import com.google.api.gax.grpc.GrpcStatusCode; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientStream; +import com.google.api.gax.rpc.ResponseObserver; import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StreamController; import com.google.cloud.pubsub.v1.stub.SubscriberStub; import com.google.common.collect.Lists; import com.google.protobuf.Any; import com.google.pubsub.v1.AcknowledgeRequest; import com.google.pubsub.v1.ModifyAckDeadlineRequest; +import com.google.pubsub.v1.StreamingPullRequest; +import com.google.pubsub.v1.StreamingPullResponse; import com.google.rpc.ErrorInfo; import com.google.rpc.Status; +import io.grpc.Status.Code; import io.grpc.StatusException; import io.grpc.protobuf.StatusProto; import java.time.Duration; import java.util.*; import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicInteger; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; +import org.mockito.ArgumentCaptor; /** Tests for {@link StreamingSubscriberConnection}. */ public class StreamingSubscriberConnectionTest { @@ -52,7 +67,8 @@ public class StreamingSubscriberConnectionTest { private FakeClock clock; private SubscriberStub mockSubscriberStub; - private static final String MOCK_SUBSCRIPTION_NAME = "MOCK-SUBSCRIPTION"; + private static final String MOCK_SUBSCRIPTION_NAME = + "projects/MOCK-PROJECT/subscriptions/MOCK-SUBSCRIPTION"; private static final String MOCK_ACK_ID_SUCCESS = "MOCK-ACK-ID-SUCCESS"; private static final String MOCK_ACK_ID_SUCCESS_2 = "MOCK-ACK-ID-SUCCESS-2"; private static final String MOCK_ACK_ID_NACK_SUCCESS = "MOCK-ACK-ID-NACK-SUCCESS"; @@ -64,6 +80,8 @@ public class StreamingSubscriberConnectionTest { "MOCK-ACK-ID-TRANSIENT-FAILURE-SERVICE-UNAVAILABLE-THEN-SUCCESS"; private static final String MOCK_ACK_ID_INVALID = "MOCK-ACK-ID-INVALID"; private static final String MOCK_ACK_ID_OTHER = "MOCK-ACK-ID-OTHER"; + private static final String MOCK_ACK_ID_NO_METADATA_MAP_INTERNAL_ERROR_THEN_PERMISSION_DENIED = + "MOCK-ACK-ID-NO-METADATA-MAP-INTERNAL-ERROR"; private static final String PERMANENT_FAILURE_INVALID_ACK_ID = "PERMANENT_FAILURE_INVALID_ACK_ID"; private static final String TRANSIENT_FAILURE_UNORDERED_ACK_ID = @@ -76,6 +94,10 @@ public class StreamingSubscriberConnectionTest { private static Duration ACK_EXPIRATION_PADDING_DEFAULT_DURATION = Duration.ofSeconds(10); private static int MAX_DURATION_PER_ACK_EXTENSION_DEFAULT_SECONDS = 10; + private static final long KEEP_ALIVE_SUPPORT_VERSION = 1; + private static final Duration CLIENT_PING_INTERVAL = Duration.ofSeconds(30); + private static final Duration MAX_ACK_EXTENSION_PERIOD = Duration.ofMinutes(60); + @Before public void setUp() { systemExecutor = new FakeScheduledExecutorService(); @@ -99,6 +121,110 @@ public void testSetupAndTeardown() { streamingSubscriberConnection.awaitTerminated(); } + @Test + public void testRunShutdown_TimeoutMet() throws Exception { + SubscriberShutdownSettings shutdownSettings = + SubscriberShutdownSettings.newBuilder().setTimeout(Duration.ofSeconds(10)).build(); + StreamingSubscriberConnection.Builder builder = + StreamingSubscriberConnection.newBuilder(mock(MessageReceiverWithAckResponse.class)); + builder.setSubscriberShutdownSettings(shutdownSettings); + StreamingSubscriberConnection streamingSubscriberConnection = + getStreamingSubscriberConnectionFromBuilder(builder); + + streamingSubscriberConnection.startAsync().awaitRunning(); + streamingSubscriberConnection.stopAsync(); + + // Should terminate quickly as there are no outstanding messages. + streamingSubscriberConnection.awaitTerminated(1, TimeUnit.SECONDS); + } + + @Test + public void testRunShutdown_TimeoutExceeded() throws Exception { + final SettableApiFuture ackFuture = SettableApiFuture.create(); + when(mockSubscriberStub.acknowledgeCallable().futureCall(any(AcknowledgeRequest.class))) + .thenReturn(ackFuture); + + SubscriberShutdownSettings shutdownSettings = + SubscriberShutdownSettings.newBuilder().setTimeout(Duration.ofSeconds(2)).build(); + StreamingSubscriberConnection.Builder builder = + StreamingSubscriberConnection.newBuilder(mock(MessageReceiverWithAckResponse.class)); + StreamingSubscriberConnection streamingSubscriberConnection = + getStreamingSubscriberConnectionFromBuilder(builder, shutdownSettings); + streamingSubscriberConnection.setExactlyOnceDeliveryEnabled(true); + + streamingSubscriberConnection.startAsync().awaitRunning(); + + // Send an ACK that will not complete. + SettableApiFuture messageFuture = SettableApiFuture.create(); + streamingSubscriberConnection.sendAckOperations( + Collections.singletonList( + AckRequestData.newBuilder("ack1").setMessageFuture(messageFuture).build())); + + Thread t = + new Thread( + () -> { + streamingSubscriberConnection.stopAsync(); + }); + t.start(); + + Thread t2 = + new Thread( + () -> { + try { + streamingSubscriberConnection.awaitTerminated(1, TimeUnit.SECONDS); + fail("Should have timed out"); + } catch (TimeoutException e) { + // expected + } + }); + t2.start(); + t2.join(); + + // Advance the clock past the shutdown timeout. + clock.advance(3, TimeUnit.SECONDS); + t.join(); + + // Now it should terminate. + streamingSubscriberConnection.awaitTerminated(); + assertFalse(streamingSubscriberConnection.isRunning()); + assertFalse(messageFuture.isDone()); + } + + @Test + public void testAckDuringNackImmediatelyShutdown() throws Exception { + SubscriberShutdownSettings shutdownSettings = + SubscriberShutdownSettings.newBuilder() + .setMode(SubscriberShutdownSettings.ShutdownMode.NACK_IMMEDIATELY) + .build(); + + MessageDispatcher mockMessageDispatcher = mock(MessageDispatcher.class); + when(mockMessageDispatcher.getNackImmediatelyShutdownInProgress()).thenReturn(true); + + StreamingSubscriberConnection.Builder builder = + StreamingSubscriberConnection.newBuilder(mock(MessageReceiverWithAckResponse.class)); + StreamingSubscriberConnection streamingSubscriberConnection = + getStreamingSubscriberConnectionFromBuilder(builder, shutdownSettings); + + // Use reflection to set the mock message dispatcher + java.lang.reflect.Field dispatcherField = + StreamingSubscriberConnection.class.getDeclaredField("messageDispatcher"); + dispatcherField.setAccessible(true); + dispatcherField.set(streamingSubscriberConnection, mockMessageDispatcher); + + streamingSubscriberConnection.setExactlyOnceDeliveryEnabled(true); + + SettableApiFuture messageFuture = SettableApiFuture.create(); + AckRequestData ackRequestData = + AckRequestData.newBuilder("ack1").setMessageFuture(messageFuture).build(); + + when(mockSubscriberStub.acknowledgeCallable().futureCall(any())) + .thenReturn(ApiFutures.immediateFuture(null)); + streamingSubscriberConnection.sendAckOperations(Collections.singletonList(ackRequestData)); + + verify(mockMessageDispatcher, times(1)).notifyAckFailed(ackRequestData); + assertEquals(AckResponse.OTHER, messageFuture.get()); + } + @Test public void testSendAckOperationsExactlyOnceDisabledNoMessageFutures() { // Setup mocks @@ -397,6 +523,62 @@ public void testSendAckOperationsExactlyOnceEnabledMessageFuturesAcks() { } } + @Test + public void testSendAckOperationsExactlyOnceEnabledErrorWithEmptyMetadataMap() { + // Setup + + // The list(s) of ackIds allows us to mock the grpc response(s) + List ackIdsRequest = new ArrayList<>(); + List ackRequestDataList = new ArrayList(); + + // Initial) INTERNAL error, retryable + // Retry) PERMISSION_DENIED, not retryable + SettableApiFuture messageInternalErrorThenPermissionDenied = + SettableApiFuture.create(); + ackRequestDataList.add( + AckRequestData.newBuilder(MOCK_ACK_ID_NO_METADATA_MAP_INTERNAL_ERROR_THEN_PERMISSION_DENIED) + .setMessageFuture(messageInternalErrorThenPermissionDenied) + .build()); + ackIdsRequest.add(MOCK_ACK_ID_NO_METADATA_MAP_INTERNAL_ERROR_THEN_PERMISSION_DENIED); + + // Build our request so we can set our mock responses + AcknowledgeRequest acknowledgeRequest = + AcknowledgeRequest.newBuilder() + .setSubscription(MOCK_SUBSCRIPTION_NAME) + .addAllAckIds(ackIdsRequest) + .build(); + + ApiException internalError = + new ApiException("internal", null, GrpcStatusCode.of(Code.INTERNAL), true); + ApiException permissionDeniedError = + new ApiException( + "permission_denied", null, GrpcStatusCode.of(Code.PERMISSION_DENIED), false); + // Set mock grpc responses + when(mockSubscriberStub.acknowledgeCallable().futureCall(acknowledgeRequest)) + .thenReturn(ApiFutures.immediateFailedFuture(internalError)) + .thenReturn(ApiFutures.immediateFailedFuture(permissionDeniedError)); + + // Instantiate class and run operation(s) + StreamingSubscriberConnection streamingSubscriberConnection = + getStreamingSubscriberConnection(true); + + streamingSubscriberConnection.sendAckOperations(ackRequestDataList); + + // Backoff + systemExecutor.advanceTime(Duration.ofMillis(200)); + + // Assert expected behavior; + verify(mockSubscriberStub.acknowledgeCallable(), times(2)).futureCall(acknowledgeRequest); + verify(mockSubscriberStub, never()).modifyAckDeadlineCallable(); + + try { + assertEquals(AckResponse.PERMISSION_DENIED, messageInternalErrorThenPermissionDenied.get()); + } catch (InterruptedException | ExecutionException e) { + // In case something goes wrong retrieving the futures + throw new AssertionError(); + } + } + @Test public void testSetFailureResponseOutstandingMessages() { // Setup @@ -500,6 +682,155 @@ public void testMaxPerRequestChanges() { } } + @Test + public void testClientPinger_pingSent() { + BidiStreamingCallable mockStreamingCallable = + mock(BidiStreamingCallable.class); + ClientStream mockClientStream = mock(ClientStream.class); + when(mockSubscriberStub.streamingPullCallable()).thenReturn(mockStreamingCallable); + when(mockStreamingCallable.splitCall(any(ResponseObserver.class), any())) + .thenReturn(mockClientStream); + + StreamingSubscriberConnection streamingSubscriberConnection = + getKeepaliveStreamingSubscriberConnection(); + + streamingSubscriberConnection.startAsync(); + streamingSubscriberConnection.awaitRunning(); + + systemExecutor.advanceTime(CLIENT_PING_INTERVAL); + systemExecutor.advanceTime(CLIENT_PING_INTERVAL); + + ArgumentCaptor requestCaptor = + ArgumentCaptor.forClass(StreamingPullRequest.class); + // 1 initial request + 3 pings + verify(mockClientStream, times(4)).send(requestCaptor.capture()); + List requests = requestCaptor.getAllValues(); + + StreamingPullRequest initialRequest = requests.get(0); + assertEquals(MOCK_SUBSCRIPTION_NAME, initialRequest.getSubscription()); + assertEquals(KEEP_ALIVE_SUPPORT_VERSION, initialRequest.getProtocolVersion()); + assertEquals(0, initialRequest.getMaxOutstandingMessages()); + + StreamingPullRequest firstPing = requests.get(1); + assertEquals(StreamingPullRequest.getDefaultInstance(), firstPing); + + StreamingPullRequest secondPing = requests.get(2); + assertEquals(StreamingPullRequest.getDefaultInstance(), secondPing); + + streamingSubscriberConnection.stopAsync(); + streamingSubscriberConnection.awaitTerminated(); + + // No more pings + systemExecutor.advanceTime(CLIENT_PING_INTERVAL); + verify(mockClientStream, times(4)).send(any(StreamingPullRequest.class)); + } + + @Test + public void testClientPinger_pingsNotSentWhenDisabled() { + BidiStreamingCallable mockStreamingCallable = + mock(BidiStreamingCallable.class); + ClientStream mockClientStream = mock(ClientStream.class); + when(mockSubscriberStub.streamingPullCallable()).thenReturn(mockStreamingCallable); + when(mockStreamingCallable.splitCall(any(ResponseObserver.class), any())) + .thenReturn(mockClientStream); + + StreamingSubscriberConnection streamingSubscriberConnection = + getStreamingSubscriberConnection(false); // keepalive disabled + + streamingSubscriberConnection.startAsync(); + streamingSubscriberConnection.awaitRunning(); + + // Initial request. + verify(mockClientStream, times(1)).send(any(StreamingPullRequest.class)); + + // No pings + systemExecutor.advanceTime(CLIENT_PING_INTERVAL); + systemExecutor.advanceTime(CLIENT_PING_INTERVAL); + + verify(mockClientStream, times(1)).send(any(StreamingPullRequest.class)); + } + + @Test + public void testServerMonitor_timesOut() { + BidiStreamingCallable mockStreamingCallable = + mock(BidiStreamingCallable.class); + ClientStream mockClientStream = mock(ClientStream.class); + ArgumentCaptor> observerCaptor = + ArgumentCaptor.forClass(ResponseObserver.class); + when(mockSubscriberStub.streamingPullCallable()).thenReturn(mockStreamingCallable); + when(mockStreamingCallable.splitCall(observerCaptor.capture(), any())) + .thenReturn(mockClientStream); + + // fail pings after the first one to ensure timeout occurs + AtomicInteger pingCount = new AtomicInteger(0); + doAnswer( + (invocation) -> { + StreamingPullRequest req = invocation.getArgument(0); + // Pings are empty requests + if (req.getSubscription().isEmpty()) { + if (pingCount.incrementAndGet() > 2) { // allow first 2 pings + throw new RuntimeException("ping failed"); + } + } + return null; + }) + .when(mockClientStream) + .send(any(StreamingPullRequest.class)); + + StreamingSubscriberConnection streamingSubscriberConnection = + getKeepaliveStreamingSubscriberConnection(); + + streamingSubscriberConnection.startAsync(); + streamingSubscriberConnection.awaitRunning(); + + ResponseObserver observer = observerCaptor.getValue(); + StreamController mockController = mock(StreamController.class); + observer.onStart(mockController); + + systemExecutor.advanceTime(CLIENT_PING_INTERVAL); + verify(mockClientStream, never()).closeSendWithError(any(Exception.class)); + + systemExecutor.advanceTime(CLIENT_PING_INTERVAL); + ArgumentCaptor exceptionCaptor = ArgumentCaptor.forClass(Exception.class); + verify(mockClientStream, times(1)).closeSendWithError(exceptionCaptor.capture()); + StatusException exception = (StatusException) exceptionCaptor.getValue(); + assertEquals(Code.UNAVAILABLE, exception.getStatus().getCode()); + assertEquals("Keepalive timeout with server", exception.getStatus().getDescription()); + } + + @Test + public void testServerMonitor_doesNotTimeOutIfResponseReceived() { + BidiStreamingCallable mockStreamingCallable = + mock(BidiStreamingCallable.class); + ClientStream mockClientStream = mock(ClientStream.class); + ArgumentCaptor> observerCaptor = + ArgumentCaptor.forClass(ResponseObserver.class); + when(mockSubscriberStub.streamingPullCallable()).thenReturn(mockStreamingCallable); + when(mockStreamingCallable.splitCall(observerCaptor.capture(), any())) + .thenReturn(mockClientStream); + + StreamingSubscriberConnection streamingSubscriberConnection = + getKeepaliveStreamingSubscriberConnection(); + + streamingSubscriberConnection.startAsync(); + streamingSubscriberConnection.awaitRunning(); + + ResponseObserver observer = observerCaptor.getValue(); + StreamController mockController = mock(StreamController.class); + observer.onStart(mockController); + + // t=30s: ping sent. + // t=40s: response received. + // t=45s: monitor check. lastPing=30, lastResponse=40. lastPing>lastResponse is false -> no + // timeout. + systemExecutor.advanceTime(Duration.ofSeconds(40)); + observer.onResponse(StreamingPullResponse.getDefaultInstance()); + systemExecutor.advanceTime(Duration.ofSeconds(20)); // to t=60s + observer.onResponse(StreamingPullResponse.getDefaultInstance()); + + verify(mockClientStream, never()).closeSendWithError(any(Exception.class)); + } + private StreamingSubscriberConnection getStreamingSubscriberConnection( boolean exactlyOnceDeliveryEnabled) { StreamingSubscriberConnection streamingSubscriberConnection = @@ -512,8 +843,39 @@ private StreamingSubscriberConnection getStreamingSubscriberConnection( return streamingSubscriberConnection; } + private StreamingSubscriberConnection getKeepaliveStreamingSubscriberConnection() { + StreamingSubscriberConnection streamingSubscriberConnection = + getStreamingSubscriberConnectionFromBuilder( + StreamingSubscriberConnection.newBuilder(mock(MessageReceiverWithAckResponse.class)) + .setProtocolVersion(KEEP_ALIVE_SUPPORT_VERSION)); + + return streamingSubscriberConnection; + } + private StreamingSubscriberConnection getStreamingSubscriberConnectionFromBuilder( StreamingSubscriberConnection.Builder builder) { + return builder + .setSubscription(MOCK_SUBSCRIPTION_NAME) + .setAckExpirationPadding(ACK_EXPIRATION_PADDING_DEFAULT_DURATION) + .setMaxAckExtensionPeriod(MAX_ACK_EXTENSION_PERIOD) + .setAckLatencyDistribution(mock(Distribution.class)) + .setSubscriberStub(mockSubscriberStub) + .setChannelAffinity(0) + .setFlowControlSettings(mock(FlowControlSettings.class)) + .setFlowController(mock(FlowController.class)) + .setExecutor(executor) + .setSystemExecutor(systemExecutor) + .setClock(clock) + .setMinDurationPerAckExtension(Subscriber.DEFAULT_MIN_ACK_DEADLINE_EXTENSION) + .setMinDurationPerAckExtensionDefaultUsed(true) + .setMaxDurationPerAckExtension(Subscriber.DEFAULT_MAX_ACK_DEADLINE_EXTENSION) + .setMaxDurationPerAckExtensionDefaultUsed(true) + .setSubscriberShutdownSettings(SubscriberShutdownSettings.newBuilder().build()) + .build(); + } + + private StreamingSubscriberConnection getStreamingSubscriberConnectionFromBuilder( + StreamingSubscriberConnection.Builder builder, SubscriberShutdownSettings shutdownSettings) { return builder .setSubscription(MOCK_SUBSCRIPTION_NAME) .setAckExpirationPadding(ACK_EXPIRATION_PADDING_DEFAULT_DURATION) @@ -529,6 +891,7 @@ private StreamingSubscriberConnection getStreamingSubscriberConnectionFromBuilde .setMinDurationPerAckExtensionDefaultUsed(true) .setMaxDurationPerAckExtension(Subscriber.DEFAULT_MAX_ACK_DEADLINE_EXTENSION) .setMaxDurationPerAckExtensionDefaultUsed(true) + .setSubscriberShutdownSettings(shutdownSettings) .build(); } diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberShutdownSettingsTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberShutdownSettingsTest.java new file mode 100644 index 000000000..f82937582 --- /dev/null +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberShutdownSettingsTest.java @@ -0,0 +1,100 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.pubsub.v1; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import com.google.cloud.pubsub.v1.SubscriberShutdownSettings.ShutdownMode; +import java.time.Duration; +import org.junit.Test; + +public class SubscriberShutdownSettingsTest { + + @Test + public void testDefaultSettings() { + SubscriberShutdownSettings settings = SubscriberShutdownSettings.newBuilder().build(); + + assertNotNull(settings); + assertEquals(ShutdownMode.WAIT_FOR_PROCESSING, settings.getMode()); + assertTrue(settings.getTimeout().isNegative()); // Indefinite timeout + } + + @Test + public void testWaitForProcessingWithCustomTimeout() { + Duration customTimeout = Duration.ofSeconds(30); + SubscriberShutdownSettings settings = + SubscriberShutdownSettings.newBuilder() + .setMode(ShutdownMode.WAIT_FOR_PROCESSING) + .setTimeout(customTimeout) + .build(); + + assertNotNull(settings); + assertEquals(ShutdownMode.WAIT_FOR_PROCESSING, settings.getMode()); + assertEquals(customTimeout, settings.getTimeout()); + } + + @Test + public void testNackImmediatelyWithDefaultTimeout() { + SubscriberShutdownSettings settings = + SubscriberShutdownSettings.newBuilder().setMode(ShutdownMode.NACK_IMMEDIATELY).build(); + + assertNotNull(settings); + assertEquals(ShutdownMode.NACK_IMMEDIATELY, settings.getMode()); + assertTrue(settings.getTimeout().isNegative()); // Indefinite timeout + } + + @Test + public void testNackImmediatelyWithCustomTimeout() { + Duration customTimeout = Duration.ofSeconds(10); + SubscriberShutdownSettings settings = + SubscriberShutdownSettings.newBuilder() + .setMode(ShutdownMode.NACK_IMMEDIATELY) + .setTimeout(customTimeout) + .build(); + + assertNotNull(settings); + assertEquals(ShutdownMode.NACK_IMMEDIATELY, settings.getMode()); + assertEquals(customTimeout, settings.getTimeout()); + } + + @Test + public void testZeroTimeout() { + Duration zeroTimeout = Duration.ZERO; + SubscriberShutdownSettings settings = + SubscriberShutdownSettings.newBuilder() + .setMode(ShutdownMode.WAIT_FOR_PROCESSING) + .setTimeout(zeroTimeout) + .build(); + + assertNotNull(settings); + assertEquals(ShutdownMode.WAIT_FOR_PROCESSING, settings.getMode()); + assertEquals(zeroTimeout, settings.getTimeout()); + assertTrue(settings.getTimeout().isZero()); + } + + @Test(expected = NullPointerException.class) + public void testNullModeThrowsException() { + SubscriberShutdownSettings.newBuilder().setMode(null).build(); + } + + @Test(expected = NullPointerException.class) + public void testNullTimeoutThrowsException() { + SubscriberShutdownSettings.newBuilder().setTimeout(null).build(); + } +} diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java index 679d37e40..649769d1c 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java @@ -297,8 +297,7 @@ public void testPartialFlowControlSettings() throws Exception { Subscriber subscriber = getTestSubscriberBuilder(testReceiver) .setFlowControlSettings( - Subscriber.Builder.DEFAULT_FLOW_CONTROL_SETTINGS - .toBuilder() + Subscriber.Builder.DEFAULT_FLOW_CONTROL_SETTINGS.toBuilder() .setMaxOutstandingElementCount(500L) .build()) .build(); @@ -310,8 +309,7 @@ public void testPartialFlowControlSettings() throws Exception { subscriber = getTestSubscriberBuilder(testReceiver) .setFlowControlSettings( - Subscriber.Builder.DEFAULT_FLOW_CONTROL_SETTINGS - .toBuilder() + Subscriber.Builder.DEFAULT_FLOW_CONTROL_SETTINGS.toBuilder() .setMaxOutstandingRequestBytes(5_000_000_000L) .build()) .build(); @@ -322,6 +320,104 @@ public void testPartialFlowControlSettings() throws Exception { Subscriber.Builder.DEFAULT_FLOW_CONTROL_SETTINGS.getMaxOutstandingElementCount()); } + @Test + public void testShutdown_waitForProcessing_indefinite() throws Exception { + final CountDownLatch messageReceived = new CountDownLatch(1); + final AckReplyConsumer[] consumer = new AckReplyConsumer[1]; + + MessageReceiver receiver = + new MessageReceiver() { + @Override + public void receiveMessage(PubsubMessage message, AckReplyConsumer c) { + consumer[0] = c; + messageReceived.countDown(); + } + }; + + Subscriber subscriber = + startSubscriber( + getTestSubscriberBuilder(receiver) + .setSubscriberShutdownSettings( + SubscriberShutdownSettings.newBuilder() + .setMode(SubscriberShutdownSettings.ShutdownMode.WAIT_FOR_PROCESSING) + .setTimeout(Duration.ofSeconds(-1)) + .build())); + + // Send a message and wait for it to be received. + fakeSubscriberServiceImpl.sendMessages(1); + messageReceived.await(10, TimeUnit.SECONDS); + + subscriber.stopAsync(); + + try { + subscriber.awaitTerminated(1, TimeUnit.SECONDS); + fail("Subscriber should not have terminated yet."); + } catch (TimeoutException e) { + // Expected + } + + // Now, ack the message, which should allow the subscriber to terminate. + consumer[0].ack(); + subscriber.awaitTerminated(10, TimeUnit.SECONDS); + } + + @Test + public void testShutdown_waitForProcessing_withTimeout_success() throws Exception { + Subscriber subscriber = + startSubscriber( + getTestSubscriberBuilder(testReceiver) + .setSubscriberShutdownSettings( + SubscriberShutdownSettings.newBuilder() + .setMode(SubscriberShutdownSettings.ShutdownMode.WAIT_FOR_PROCESSING) + .setTimeout(Duration.ofSeconds(10)) + .build())); + subscriber.stopAsync(); + fakeExecutor.advanceTime(Duration.ofSeconds(5)); + subscriber.awaitTerminated(1, TimeUnit.SECONDS); // Should terminate quickly now + } + + @Test + public void testShutdown_waitForProcessing_withTimeout_failure() throws Exception { + Subscriber subscriber = + startSubscriber( + getTestSubscriberBuilder(testReceiver) + .setSubscriberShutdownSettings( + SubscriberShutdownSettings.newBuilder() + .setMode(SubscriberShutdownSettings.ShutdownMode.WAIT_FOR_PROCESSING) + .setTimeout(Duration.ofSeconds(5)) + .build())); + subscriber.stopAsync(); + fakeExecutor.advanceTime(Duration.ofSeconds(6)); + subscriber.awaitTerminated(1, TimeUnit.SECONDS); // Should have timed out and terminated + } + + @Test + public void testShutdown_waitForProcessing_zeroTimeout() throws Exception { + Subscriber subscriber = + startSubscriber( + getTestSubscriberBuilder(testReceiver) + .setSubscriberShutdownSettings( + SubscriberShutdownSettings.newBuilder() + .setMode(SubscriberShutdownSettings.ShutdownMode.WAIT_FOR_PROCESSING) + .setTimeout(Duration.ZERO) + .build())); + subscriber.stopAsync(); + subscriber.awaitTerminated(1, TimeUnit.SECONDS); // Should terminate almost immediately + } + + @Test + public void testShutdown_nackImmediately() throws Exception { + Subscriber subscriber = + startSubscriber( + getTestSubscriberBuilder(testReceiver) + .setSubscriberShutdownSettings( + SubscriberShutdownSettings.newBuilder() + .setMode(SubscriberShutdownSettings.ShutdownMode.NACK_IMMEDIATELY) + .build())); + subscriber.stopAsync(); + subscriber.awaitTerminated(1, TimeUnit.SECONDS); // Should terminate almost immediately + } + private Subscriber startSubscriber(Builder testSubscriberBuilder) { Subscriber subscriber = testSubscriberBuilder.build(); subscriber.startAsync().awaitRunning(); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientHttpJsonTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientHttpJsonTest.java index 3c0516832..8ec2cdfab 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientHttpJsonTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientHttpJsonTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,11 +44,13 @@ import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; import com.google.pubsub.v1.BigQueryConfig; +import com.google.pubsub.v1.BigtableConfig; import com.google.pubsub.v1.CloudStorageConfig; import com.google.pubsub.v1.DeadLetterPolicy; import com.google.pubsub.v1.ExpirationPolicy; import com.google.pubsub.v1.ListSnapshotsResponse; import com.google.pubsub.v1.ListSubscriptionsResponse; +import com.google.pubsub.v1.MessageTransform; import com.google.pubsub.v1.ProjectName; import com.google.pubsub.v1.PullResponse; import com.google.pubsub.v1.PushConfig; @@ -119,6 +121,7 @@ public void createSubscriptionTest() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -133,6 +136,8 @@ public void createSubscriptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -188,6 +193,7 @@ public void createSubscriptionTest2() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -202,6 +208,8 @@ public void createSubscriptionTest2() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -257,6 +265,7 @@ public void createSubscriptionTest3() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -271,6 +280,8 @@ public void createSubscriptionTest3() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -326,6 +337,7 @@ public void createSubscriptionTest4() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -340,6 +352,8 @@ public void createSubscriptionTest4() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -395,6 +409,7 @@ public void getSubscriptionTest() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -409,6 +424,8 @@ public void getSubscriptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -457,6 +474,7 @@ public void getSubscriptionTest2() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -471,6 +489,8 @@ public void getSubscriptionTest2() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -519,6 +539,7 @@ public void updateSubscriptionTest() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -533,6 +554,8 @@ public void updateSubscriptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -543,6 +566,7 @@ public void updateSubscriptionTest() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -557,6 +581,8 @@ public void updateSubscriptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -593,6 +619,7 @@ public void updateSubscriptionExceptionTest() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -607,6 +634,8 @@ public void updateSubscriptionExceptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateSubscription(subscription, updateMask); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java index 5136ecd1b..7df554b6d 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,6 +47,7 @@ import com.google.protobuf.Timestamp; import com.google.pubsub.v1.AcknowledgeRequest; import com.google.pubsub.v1.BigQueryConfig; +import com.google.pubsub.v1.BigtableConfig; import com.google.pubsub.v1.CloudStorageConfig; import com.google.pubsub.v1.CreateSnapshotRequest; import com.google.pubsub.v1.DeadLetterPolicy; @@ -59,6 +60,7 @@ import com.google.pubsub.v1.ListSnapshotsResponse; import com.google.pubsub.v1.ListSubscriptionsRequest; import com.google.pubsub.v1.ListSubscriptionsResponse; +import com.google.pubsub.v1.MessageTransform; import com.google.pubsub.v1.ModifyAckDeadlineRequest; import com.google.pubsub.v1.ModifyPushConfigRequest; import com.google.pubsub.v1.ProjectName; @@ -145,6 +147,7 @@ public void createSubscriptionTest() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -159,6 +162,8 @@ public void createSubscriptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -211,6 +216,7 @@ public void createSubscriptionTest2() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -225,6 +231,8 @@ public void createSubscriptionTest2() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -277,6 +285,7 @@ public void createSubscriptionTest3() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -291,6 +300,8 @@ public void createSubscriptionTest3() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -343,6 +354,7 @@ public void createSubscriptionTest4() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -357,6 +369,8 @@ public void createSubscriptionTest4() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -409,6 +423,7 @@ public void getSubscriptionTest() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -423,6 +438,8 @@ public void getSubscriptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -465,6 +482,7 @@ public void getSubscriptionTest2() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -479,6 +497,8 @@ public void getSubscriptionTest2() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -521,6 +541,7 @@ public void updateSubscriptionTest() throws Exception { .setPushConfig(PushConfig.newBuilder().build()) .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setCloudStorageConfig(CloudStorageConfig.newBuilder().build()) + .setBigtableConfig(BigtableConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -535,6 +556,8 @@ public void updateSubscriptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -1066,6 +1089,7 @@ public void streamingPullTest() throws Exception { .setClientId("clientId908408390") .setMaxOutstandingMessages(-1315266996) .setMaxOutstandingBytes(-2103098517) + .setProtocolVersion(-1161610703) .build(); MockStreamObserver responseObserver = new MockStreamObserver<>(); @@ -1097,6 +1121,7 @@ public void streamingPullExceptionTest() throws Exception { .setClientId("clientId908408390") .setMaxOutstandingMessages(-1315266996) .setMaxOutstandingBytes(-2103098517) + .setProtocolVersion(-1161610703) .build(); MockStreamObserver responseObserver = new MockStreamObserver<>(); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientHttpJsonTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientHttpJsonTest.java index 821411d6d..70165e3a2 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientHttpJsonTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientHttpJsonTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,6 +43,7 @@ import com.google.protobuf.Duration; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; +import com.google.pubsub.v1.CryptoKeyName; import com.google.pubsub.v1.DetachSubscriptionRequest; import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.IngestionDataSourceSettings; @@ -50,6 +51,7 @@ import com.google.pubsub.v1.ListTopicSubscriptionsResponse; import com.google.pubsub.v1.ListTopicsResponse; import com.google.pubsub.v1.MessageStoragePolicy; +import com.google.pubsub.v1.MessageTransform; import com.google.pubsub.v1.ProjectName; import com.google.pubsub.v1.PublishResponse; import com.google.pubsub.v1.PubsubMessage; @@ -112,11 +114,15 @@ public void createTopicTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -163,11 +169,15 @@ public void createTopicTest2() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -214,11 +224,15 @@ public void updateTopicTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -227,11 +241,15 @@ public void updateTopicTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -266,11 +284,15 @@ public void updateTopicExceptionTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateTopic(topic, updateMask); @@ -375,11 +397,15 @@ public void getTopicTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -426,11 +452,15 @@ public void getTopicTest2() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java index fa7e7bd06..5774110a4 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,7 @@ import com.google.protobuf.Duration; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; +import com.google.pubsub.v1.CryptoKeyName; import com.google.pubsub.v1.DeleteTopicRequest; import com.google.pubsub.v1.DetachSubscriptionRequest; import com.google.pubsub.v1.DetachSubscriptionResponse; @@ -53,6 +54,7 @@ import com.google.pubsub.v1.ListTopicsRequest; import com.google.pubsub.v1.ListTopicsResponse; import com.google.pubsub.v1.MessageStoragePolicy; +import com.google.pubsub.v1.MessageTransform; import com.google.pubsub.v1.ProjectName; import com.google.pubsub.v1.PublishRequest; import com.google.pubsub.v1.PublishResponse; @@ -126,11 +128,15 @@ public void createTopicTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockPublisher.addResponse(expectedResponse); @@ -171,11 +177,15 @@ public void createTopicTest2() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockPublisher.addResponse(expectedResponse); @@ -216,11 +226,15 @@ public void updateTopicTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockPublisher.addResponse(expectedResponse); @@ -342,11 +356,15 @@ public void getTopicTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockPublisher.addResponse(expectedResponse); @@ -387,11 +405,15 @@ public void getTopicTest2() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockPublisher.addResponse(expectedResponse); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/WaiterTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/WaiterTest.java index ca8618378..aaa396690 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/WaiterTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/WaiterTest.java @@ -17,7 +17,10 @@ package com.google.cloud.pubsub.v1; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import java.util.concurrent.TimeUnit; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -50,4 +53,69 @@ public void run() { assertEquals(0, waiter.pendingCount()); } + + @Test + public void testTryWait_Completes() throws Exception { + final Waiter waiter = new Waiter(); + waiter.incrementPendingCount(1); + final FakeClock clock = new FakeClock(); + + final Thread mainThread = Thread.currentThread(); + Thread t = + new Thread( + new Runnable() { + @Override + public void run() { + while (mainThread.getState() == Thread.State.NEW) { + Thread.yield(); + } + waiter.incrementPendingCount(-1); + } + }); + t.start(); + + assertTrue(waiter.tryWait(500, clock)); + t.join(); + + assertEquals(0, waiter.pendingCount()); + } + + @Test + public void testTryWait_TimesOut() throws Exception { + final Waiter waiter = new Waiter(); + waiter.incrementPendingCount(1); + final FakeClock clock = new FakeClock(); + + final Thread mainThread = Thread.currentThread(); + Thread t = + new Thread( + new Runnable() { + @Override + public void run() { + while (mainThread.getState() == Thread.State.NEW) { + Thread.yield(); + } + try { + // Waits some additional time to ensure that the waiter is actually waiting. + Thread.sleep(100); + clock.advance(200, TimeUnit.MILLISECONDS); + } catch (InterruptedException e) { + // Ignored. + } + } + }); + t.start(); + + assertFalse(waiter.tryWait(100, clock)); + t.join(); + + assertEquals(1, waiter.pendingCount()); + } + + @Test + public void testTryWait_NoPending() { + final Waiter waiter = new Waiter(); + final FakeClock clock = new FakeClock(); + assertTrue(waiter.tryWait(100, clock)); + } } diff --git a/google-cloud-pubsub/src/test/resources/META-INF/native-image/com.google.cloud/google-cloud-pubsub/native-image.properties b/google-cloud-pubsub/src/test/resources/META-INF/native-image/com.google.cloud/google-cloud-pubsub/native-image.properties new file mode 100644 index 000000000..b77dd433a --- /dev/null +++ b/google-cloud-pubsub/src/test/resources/META-INF/native-image/com.google.cloud/google-cloud-pubsub/native-image.properties @@ -0,0 +1 @@ +Args=--initialize-at-build-time=org.junit.runners.model.FrameworkField \ No newline at end of file diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index dea977515..d84a02a07 100644 --- a/grpc-google-cloud-pubsub-v1/pom.xml +++ b/grpc-google-cloud-pubsub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.116.2 + 1.132.3-SNAPSHOT grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.134.2 + 1.150.3-SNAPSHOT diff --git a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java index 18d2202b1..16c28e9cc 100644 --- a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java +++ b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublisherGrpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,9 +25,6 @@ * messages to a topic. * */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/pubsub/v1/pubsub.proto") @io.grpc.stub.annotations.GrpcGenerated public final class PublisherGrpc { @@ -422,6 +419,19 @@ public PublisherStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOp return PublisherStub.newStub(factory, channel); } + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static PublisherBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PublisherBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PublisherBlockingV2Stub(channel, callOptions); + } + }; + return PublisherBlockingV2Stub.newStub(factory, channel); + } + /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ @@ -799,6 +809,158 @@ public void detachSubscription( * messages to a topic. * */ + public static final class PublisherBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private PublisherBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PublisherBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PublisherBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
    +     * Creates the given topic with the given name. See the [resource name rules]
    +     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
    +     * 
    + */ + public com.google.pubsub.v1.Topic createTopic(com.google.pubsub.v1.Topic request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateTopicMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Updates an existing topic by updating the fields specified in the update
    +     * mask. Note that certain properties of a topic are not modifiable.
    +     * 
    + */ + public com.google.pubsub.v1.Topic updateTopic(com.google.pubsub.v1.UpdateTopicRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateTopicMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
    +     * does not exist.
    +     * 
    + */ + public com.google.pubsub.v1.PublishResponse publish(com.google.pubsub.v1.PublishRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getPublishMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Gets the configuration of a topic.
    +     * 
    + */ + public com.google.pubsub.v1.Topic getTopic(com.google.pubsub.v1.GetTopicRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetTopicMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Lists matching topics.
    +     * 
    + */ + public com.google.pubsub.v1.ListTopicsResponse listTopics( + com.google.pubsub.v1.ListTopicsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListTopicsMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Lists the names of the attached subscriptions on this topic.
    +     * 
    + */ + public com.google.pubsub.v1.ListTopicSubscriptionsResponse listTopicSubscriptions( + com.google.pubsub.v1.ListTopicSubscriptionsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListTopicSubscriptionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Lists the names of the snapshots on this topic. Snapshots are used in
    +     * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
    +     * which allow you to manage message acknowledgments in bulk. That is, you can
    +     * set the acknowledgment state of messages in an existing subscription to the
    +     * state captured by a snapshot.
    +     * 
    + */ + public com.google.pubsub.v1.ListTopicSnapshotsResponse listTopicSnapshots( + com.google.pubsub.v1.ListTopicSnapshotsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListTopicSnapshotsMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
    +     * does not exist. After a topic is deleted, a new topic may be created with
    +     * the same name; this is an entirely new topic with none of the old
    +     * configuration or subscriptions. Existing subscriptions to this topic are
    +     * not deleted, but their `topic` field is set to `_deleted-topic_`.
    +     * 
    + */ + public com.google.protobuf.Empty deleteTopic(com.google.pubsub.v1.DeleteTopicRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteTopicMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Detaches a subscription from this topic. All messages retained in the
    +     * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
    +     * will return FAILED_PRECONDITION. If the subscription is a push
    +     * subscription, pushes to the endpoint will stop.
    +     * 
    + */ + public com.google.pubsub.v1.DetachSubscriptionResponse detachSubscription( + com.google.pubsub.v1.DetachSubscriptionRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDetachSubscriptionMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service Publisher. + * + *
    +   * The service that an application uses to manipulate topics, and to send
    +   * messages to a topic.
    +   * 
    + */ public static final class PublisherBlockingStub extends io.grpc.stub.AbstractBlockingStub { private PublisherBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { diff --git a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java index ab612d2c5..d08c72904 100644 --- a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java +++ b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaServiceGrpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,9 +24,6 @@ * Service for doing schema-related operations. * */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/pubsub/v1/schema.proto") @io.grpc.stub.annotations.GrpcGenerated public final class SchemaServiceGrpc { @@ -467,6 +464,19 @@ public SchemaServiceStub newStub( return SchemaServiceStub.newStub(factory, channel); } + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static SchemaServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SchemaServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceBlockingV2Stub(channel, callOptions); + } + }; + return SchemaServiceBlockingV2Stub.newStub(factory, channel); + } + /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ @@ -848,6 +858,156 @@ public void validateMessage( * Service for doing schema-related operations. * */ + public static final class SchemaServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private SchemaServiceBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SchemaServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
    +     * Creates a schema.
    +     * 
    + */ + public com.google.pubsub.v1.Schema createSchema( + com.google.pubsub.v1.CreateSchemaRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateSchemaMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Gets a schema.
    +     * 
    + */ + public com.google.pubsub.v1.Schema getSchema(com.google.pubsub.v1.GetSchemaRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetSchemaMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Lists schemas in a project.
    +     * 
    + */ + public com.google.pubsub.v1.ListSchemasResponse listSchemas( + com.google.pubsub.v1.ListSchemasRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListSchemasMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Lists all schema revisions for the named schema.
    +     * 
    + */ + public com.google.pubsub.v1.ListSchemaRevisionsResponse listSchemaRevisions( + com.google.pubsub.v1.ListSchemaRevisionsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListSchemaRevisionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Commits a new schema revision to an existing schema.
    +     * 
    + */ + public com.google.pubsub.v1.Schema commitSchema( + com.google.pubsub.v1.CommitSchemaRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCommitSchemaMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Creates a new schema revision that is a copy of the provided revision_id.
    +     * 
    + */ + public com.google.pubsub.v1.Schema rollbackSchema( + com.google.pubsub.v1.RollbackSchemaRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getRollbackSchemaMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Deletes a specific schema revision.
    +     * 
    + */ + public com.google.pubsub.v1.Schema deleteSchemaRevision( + com.google.pubsub.v1.DeleteSchemaRevisionRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteSchemaRevisionMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Deletes a schema.
    +     * 
    + */ + public com.google.protobuf.Empty deleteSchema(com.google.pubsub.v1.DeleteSchemaRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteSchemaMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Validates a schema.
    +     * 
    + */ + public com.google.pubsub.v1.ValidateSchemaResponse validateSchema( + com.google.pubsub.v1.ValidateSchemaRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getValidateSchemaMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Validates a message against a schema.
    +     * 
    + */ + public com.google.pubsub.v1.ValidateMessageResponse validateMessage( + com.google.pubsub.v1.ValidateMessageRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getValidateMessageMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service SchemaService. + * + *
    +   * Service for doing schema-related operations.
    +   * 
    + */ public static final class SchemaServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private SchemaServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { diff --git a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java index 3bf65b4e3..8e3a8dc13 100644 --- a/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java +++ b/grpc-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,9 +26,6 @@ * establishing a bi-directional stream using the `StreamingPull` method. * */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/pubsub/v1/pubsub.proto") @io.grpc.stub.annotations.GrpcGenerated public final class SubscriberGrpc { @@ -698,6 +695,19 @@ public SubscriberStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callO return SubscriberStub.newStub(factory, channel); } + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static SubscriberBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SubscriberBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SubscriberBlockingV2Stub(channel, callOptions); + } + }; + return SubscriberBlockingV2Stub.newStub(factory, channel); + } + /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ @@ -878,7 +888,7 @@ default void pull( * *
          * Establishes a stream with the server, which sends messages down to the
    -     * client. The client streams acknowledgements and ack deadline modifications
    +     * client. The client streams acknowledgments and ack deadline modifications
          * back to the server. The server will close the stream and return the status
          * on any error. The server may close the stream with status `UNAVAILABLE` to
          * reassign server-side resources, in which case, the client should
    @@ -1228,7 +1238,7 @@ public void pull(
          *
          * 
          * Establishes a stream with the server, which sends messages down to the
    -     * client. The client streams acknowledgements and ack deadline modifications
    +     * client. The client streams acknowledgments and ack deadline modifications
          * back to the server. The server will close the stream and return the status
          * on any error. The server may close the stream with status `UNAVAILABLE` to
          * reassign server-side resources, in which case, the client should
    @@ -1408,6 +1418,314 @@ public void seek(
        * establishing a bi-directional stream using the `StreamingPull` method.
        * 
    */ + public static final class SubscriberBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private SubscriberBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SubscriberBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SubscriberBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
    +     * Creates a subscription to a given topic. See the [resource name rules]
    +     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
    +     * If the subscription already exists, returns `ALREADY_EXISTS`.
    +     * If the corresponding topic doesn't exist, returns `NOT_FOUND`.
    +     * If the name is not provided in the request, the server will assign a random
    +     * name for this subscription on the same project as the topic, conforming
    +     * to the [resource name format]
    +     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
    +     * generated name is populated in the returned Subscription object. Note that
    +     * for REST API requests, you must specify a name in the request.
    +     * 
    + */ + public com.google.pubsub.v1.Subscription createSubscription( + com.google.pubsub.v1.Subscription request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateSubscriptionMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Gets the configuration details of a subscription.
    +     * 
    + */ + public com.google.pubsub.v1.Subscription getSubscription( + com.google.pubsub.v1.GetSubscriptionRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetSubscriptionMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Updates an existing subscription by updating the fields specified in the
    +     * update mask. Note that certain properties of a subscription, such as its
    +     * topic, are not modifiable.
    +     * 
    + */ + public com.google.pubsub.v1.Subscription updateSubscription( + com.google.pubsub.v1.UpdateSubscriptionRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateSubscriptionMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Lists matching subscriptions.
    +     * 
    + */ + public com.google.pubsub.v1.ListSubscriptionsResponse listSubscriptions( + com.google.pubsub.v1.ListSubscriptionsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListSubscriptionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Deletes an existing subscription. All messages retained in the subscription
    +     * are immediately dropped. Calls to `Pull` after deletion will return
    +     * `NOT_FOUND`. After a subscription is deleted, a new one may be created with
    +     * the same name, but the new one has no association with the old
    +     * subscription or its topic unless the same topic is specified.
    +     * 
    + */ + public com.google.protobuf.Empty deleteSubscription( + com.google.pubsub.v1.DeleteSubscriptionRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteSubscriptionMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Modifies the ack deadline for a specific message. This method is useful
    +     * to indicate that more time is needed to process a message by the
    +     * subscriber, or to make the message available for redelivery if the
    +     * processing was interrupted. Note that this does not modify the
    +     * subscription-level `ackDeadlineSeconds` used for subsequent messages.
    +     * 
    + */ + public com.google.protobuf.Empty modifyAckDeadline( + com.google.pubsub.v1.ModifyAckDeadlineRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getModifyAckDeadlineMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Acknowledges the messages associated with the `ack_ids` in the
    +     * `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
    +     * from the subscription.
    +     * Acknowledging a message whose ack deadline has expired may succeed,
    +     * but such a message may be redelivered later. Acknowledging a message more
    +     * than once will not result in an error.
    +     * 
    + */ + public com.google.protobuf.Empty acknowledge(com.google.pubsub.v1.AcknowledgeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getAcknowledgeMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Pulls messages from the server.
    +     * 
    + */ + public com.google.pubsub.v1.PullResponse pull(com.google.pubsub.v1.PullRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getPullMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Establishes a stream with the server, which sends messages down to the
    +     * client. The client streams acknowledgments and ack deadline modifications
    +     * back to the server. The server will close the stream and return the status
    +     * on any error. The server may close the stream with status `UNAVAILABLE` to
    +     * reassign server-side resources, in which case, the client should
    +     * re-establish the stream. Flow control can be achieved by configuring the
    +     * underlying RPC channel.
    +     * 
    + */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall< + com.google.pubsub.v1.StreamingPullRequest, com.google.pubsub.v1.StreamingPullResponse> + streamingPull() { + return io.grpc.stub.ClientCalls.blockingBidiStreamingCall( + getChannel(), getStreamingPullMethod(), getCallOptions()); + } + + /** + * + * + *
    +     * Modifies the `PushConfig` for a specified subscription.
    +     * This may be used to change a push subscription to a pull one (signified by
    +     * an empty `PushConfig`) or vice versa, or change the endpoint URL and other
    +     * attributes of a push subscription. Messages will accumulate for delivery
    +     * continuously through the call regardless of changes to the `PushConfig`.
    +     * 
    + */ + public com.google.protobuf.Empty modifyPushConfig( + com.google.pubsub.v1.ModifyPushConfigRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getModifyPushConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Gets the configuration details of a snapshot. Snapshots are used in
    +     * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
    +     * which allow you to manage message acknowledgments in bulk. That is, you can
    +     * set the acknowledgment state of messages in an existing subscription to the
    +     * state captured by a snapshot.
    +     * 
    + */ + public com.google.pubsub.v1.Snapshot getSnapshot( + com.google.pubsub.v1.GetSnapshotRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetSnapshotMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Lists the existing snapshots. Snapshots are used in [Seek](
    +     * https://cloud.google.com/pubsub/docs/replay-overview) operations, which
    +     * allow you to manage message acknowledgments in bulk. That is, you can set
    +     * the acknowledgment state of messages in an existing subscription to the
    +     * state captured by a snapshot.
    +     * 
    + */ + public com.google.pubsub.v1.ListSnapshotsResponse listSnapshots( + com.google.pubsub.v1.ListSnapshotsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListSnapshotsMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Creates a snapshot from the requested subscription. Snapshots are used in
    +     * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
    +     * which allow you to manage message acknowledgments in bulk. That is, you can
    +     * set the acknowledgment state of messages in an existing subscription to the
    +     * state captured by a snapshot.
    +     * If the snapshot already exists, returns `ALREADY_EXISTS`.
    +     * If the requested subscription doesn't exist, returns `NOT_FOUND`.
    +     * If the backlog in the subscription is too old -- and the resulting snapshot
    +     * would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
    +     * See also the `Snapshot.expire_time` field. If the name is not provided in
    +     * the request, the server will assign a random
    +     * name for this snapshot on the same project as the subscription, conforming
    +     * to the [resource name format]
    +     * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
    +     * generated name is populated in the returned Snapshot object. Note that for
    +     * REST API requests, you must specify a name in the request.
    +     * 
    + */ + public com.google.pubsub.v1.Snapshot createSnapshot( + com.google.pubsub.v1.CreateSnapshotRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateSnapshotMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Updates an existing snapshot by updating the fields specified in the update
    +     * mask. Snapshots are used in
    +     * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
    +     * which allow you to manage message acknowledgments in bulk. That is, you can
    +     * set the acknowledgment state of messages in an existing subscription to the
    +     * state captured by a snapshot.
    +     * 
    + */ + public com.google.pubsub.v1.Snapshot updateSnapshot( + com.google.pubsub.v1.UpdateSnapshotRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateSnapshotMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Removes an existing snapshot. Snapshots are used in [Seek]
    +     * (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
    +     * allow you to manage message acknowledgments in bulk. That is, you can set
    +     * the acknowledgment state of messages in an existing subscription to the
    +     * state captured by a snapshot.
    +     * When the snapshot is deleted, all messages retained in the snapshot
    +     * are immediately dropped. After a snapshot is deleted, a new one may be
    +     * created with the same name, but the new one has no association with the old
    +     * snapshot or its subscription, unless the same subscription is specified.
    +     * 
    + */ + public com.google.protobuf.Empty deleteSnapshot( + com.google.pubsub.v1.DeleteSnapshotRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteSnapshotMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Seeks an existing subscription to a point in time or to a given snapshot,
    +     * whichever is provided in the request. Snapshots are used in [Seek]
    +     * (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
    +     * allow you to manage message acknowledgments in bulk. That is, you can set
    +     * the acknowledgment state of messages in an existing subscription to the
    +     * state captured by a snapshot. Note that both the subscription and the
    +     * snapshot must be on the same topic.
    +     * 
    + */ + public com.google.pubsub.v1.SeekResponse seek(com.google.pubsub.v1.SeekRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getSeekMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service Subscriber. + * + *
    +   * The service that an application uses to manipulate subscriptions and to
    +   * consume messages from a subscription via the `Pull` method or by
    +   * establishing a bi-directional stream using the `StreamingPull` method.
    +   * 
    + */ public static final class SubscriberBlockingStub extends io.grpc.stub.AbstractBlockingStub { private SubscriberBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { diff --git a/owlbot.py b/owlbot.py index 1ef474bc4..cf50f5e65 100644 --- a/owlbot.py +++ b/owlbot.py @@ -1069,11 +1069,6 @@ r'setMaxInboundMessageSize\(Integer.MAX_VALUE\)', 'setMaxInboundMessageSize(20 << 20)' ) - s.replace( - f"proto-google-cloud-{service}-{version}/src/**/*.java", - java.BAD_LICENSE, - java.GOOD_LICENSE, - ) s.replace( '**/TopicAdminClient.java', diff --git a/pom.xml b/pom.xml index 6407100a6..8d7ea2816 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.134.2 + 1.150.3-SNAPSHOT Google Cloud Pub/Sub Parent https://github.com/googleapis/java-pubsub @@ -14,7 +14,7 @@ com.google.cloud sdk-platform-java-config - 3.40.0 + 3.62.0 @@ -69,17 +69,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.116.2 + 1.132.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.116.2 + 1.132.3-SNAPSHOT com.google.cloud google-cloud-pubsub - 1.134.2 + 1.150.3-SNAPSHOT @@ -98,13 +98,13 @@ org.easymock easymock - 5.2.0 + 5.6.0 test com.google.truth truth - 1.4.4 + 1.4.5 test @@ -116,7 +116,7 @@ org.assertj assertj-core - 3.26.3 + 3.27.7 test @@ -151,7 +151,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.8.0 + 3.9.0 diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index fa506eee8..3588ea34e 100644 --- a/proto-google-cloud-pubsub-v1/pom.xml +++ b/proto-google-cloud-pubsub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.116.2 + 1.132.3-SNAPSHOT proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.134.2 + 1.150.3-SNAPSHOT diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AIInference.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AIInference.java new file mode 100644 index 000000000..deb2dbafd --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AIInference.java @@ -0,0 +1,2019 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.pubsub.v1; + +/** + * + * + *
    + * Configuration for making inference requests against Vertex AI models.
    + * 
    + * + * Protobuf type {@code google.pubsub.v1.AIInference} + */ +@com.google.protobuf.Generated +public final class AIInference extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.AIInference) + AIInferenceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AIInference"); + } + + // Use AIInference.newBuilder() to construct. + private AIInference(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AIInference() { + endpoint_ = ""; + serviceAccountEmail_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_AIInference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_AIInference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.AIInference.class, com.google.pubsub.v1.AIInference.Builder.class); + } + + public interface UnstructuredInferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.AIInference.UnstructuredInference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Optional. A parameters object to be included in each inference request.
    +     * The parameters object is combined with the data field of the Pub/Sub
    +     * message to form the inference request.
    +     * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the parameters field is set. + */ + boolean hasParameters(); + + /** + * + * + *
    +     * Optional. A parameters object to be included in each inference request.
    +     * The parameters object is combined with the data field of the Pub/Sub
    +     * message to form the inference request.
    +     * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The parameters. + */ + com.google.protobuf.Struct getParameters(); + + /** + * + * + *
    +     * Optional. A parameters object to be included in each inference request.
    +     * The parameters object is combined with the data field of the Pub/Sub
    +     * message to form the inference request.
    +     * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getParametersOrBuilder(); + } + + /** + * + * + *
    +   * Configuration for making inferences using arbitrary JSON payloads.
    +   * 
    + * + * Protobuf type {@code google.pubsub.v1.AIInference.UnstructuredInference} + */ + public static final class UnstructuredInference extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.AIInference.UnstructuredInference) + UnstructuredInferenceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UnstructuredInference"); + } + + // Use UnstructuredInference.newBuilder() to construct. + private UnstructuredInference(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UnstructuredInference() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_AIInference_UnstructuredInference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_AIInference_UnstructuredInference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.AIInference.UnstructuredInference.class, + com.google.pubsub.v1.AIInference.UnstructuredInference.Builder.class); + } + + private int bitField0_; + public static final int PARAMETERS_FIELD_NUMBER = 1; + private com.google.protobuf.Struct parameters_; + + /** + * + * + *
    +     * Optional. A parameters object to be included in each inference request.
    +     * The parameters object is combined with the data field of the Pub/Sub
    +     * message to form the inference request.
    +     * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the parameters field is set. + */ + @java.lang.Override + public boolean hasParameters() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * Optional. A parameters object to be included in each inference request.
    +     * The parameters object is combined with the data field of the Pub/Sub
    +     * message to form the inference request.
    +     * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The parameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getParameters() { + return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; + } + + /** + * + * + *
    +     * Optional. A parameters object to be included in each inference request.
    +     * The parameters object is combined with the data field of the Pub/Sub
    +     * message to form the inference request.
    +     * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { + return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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, getParameters()); + } + 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, getParameters()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.AIInference.UnstructuredInference)) { + return super.equals(obj); + } + com.google.pubsub.v1.AIInference.UnstructuredInference other = + (com.google.pubsub.v1.AIInference.UnstructuredInference) obj; + + if (hasParameters() != other.hasParameters()) return false; + if (hasParameters()) { + if (!getParameters().equals(other.getParameters())) 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 (hasParameters()) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParameters().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.AIInference.UnstructuredInference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.AIInference.UnstructuredInference parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.AIInference.UnstructuredInference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.AIInference.UnstructuredInference parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.AIInference.UnstructuredInference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.AIInference.UnstructuredInference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.AIInference.UnstructuredInference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.AIInference.UnstructuredInference parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.AIInference.UnstructuredInference parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.AIInference.UnstructuredInference parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.AIInference.UnstructuredInference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.AIInference.UnstructuredInference parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.pubsub.v1.AIInference.UnstructuredInference prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * Configuration for making inferences using arbitrary JSON payloads.
    +     * 
    + * + * Protobuf type {@code google.pubsub.v1.AIInference.UnstructuredInference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.AIInference.UnstructuredInference) + com.google.pubsub.v1.AIInference.UnstructuredInferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_AIInference_UnstructuredInference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_AIInference_UnstructuredInference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.AIInference.UnstructuredInference.class, + com.google.pubsub.v1.AIInference.UnstructuredInference.Builder.class); + } + + // Construct using com.google.pubsub.v1.AIInference.UnstructuredInference.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parameters_ = null; + if (parametersBuilder_ != null) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_AIInference_UnstructuredInference_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.AIInference.UnstructuredInference getDefaultInstanceForType() { + return com.google.pubsub.v1.AIInference.UnstructuredInference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.AIInference.UnstructuredInference build() { + com.google.pubsub.v1.AIInference.UnstructuredInference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.AIInference.UnstructuredInference buildPartial() { + com.google.pubsub.v1.AIInference.UnstructuredInference result = + new com.google.pubsub.v1.AIInference.UnstructuredInference(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.pubsub.v1.AIInference.UnstructuredInference result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parameters_ = + parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.AIInference.UnstructuredInference) { + return mergeFrom((com.google.pubsub.v1.AIInference.UnstructuredInference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.AIInference.UnstructuredInference other) { + if (other == com.google.pubsub.v1.AIInference.UnstructuredInference.getDefaultInstance()) + return this; + if (other.hasParameters()) { + mergeParameters(other.getParameters()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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( + internalGetParametersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Struct parameters_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + parametersBuilder_; + + /** + * + * + *
    +       * Optional. A parameters object to be included in each inference request.
    +       * The parameters object is combined with the data field of the Pub/Sub
    +       * message to form the inference request.
    +       * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the parameters field is set. + */ + public boolean hasParameters() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +       * Optional. A parameters object to be included in each inference request.
    +       * The parameters object is combined with the data field of the Pub/Sub
    +       * message to form the inference request.
    +       * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The parameters. + */ + public com.google.protobuf.Struct getParameters() { + if (parametersBuilder_ == null) { + return parameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : parameters_; + } else { + return parametersBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * Optional. A parameters object to be included in each inference request.
    +       * The parameters object is combined with the data field of the Pub/Sub
    +       * message to form the inference request.
    +       * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParameters(com.google.protobuf.Struct value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parameters_ = value; + } else { + parametersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. A parameters object to be included in each inference request.
    +       * The parameters object is combined with the data field of the Pub/Sub
    +       * message to form the inference request.
    +       * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (parametersBuilder_ == null) { + parameters_ = builderForValue.build(); + } else { + parametersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. A parameters object to be included in each inference request.
    +       * The parameters object is combined with the data field of the Pub/Sub
    +       * message to form the inference request.
    +       * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeParameters(com.google.protobuf.Struct value) { + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && parameters_ != null + && parameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getParametersBuilder().mergeFrom(value); + } else { + parameters_ = value; + } + } else { + parametersBuilder_.mergeFrom(value); + } + if (parameters_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * Optional. A parameters object to be included in each inference request.
    +       * The parameters object is combined with the data field of the Pub/Sub
    +       * message to form the inference request.
    +       * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearParameters() { + bitField0_ = (bitField0_ & ~0x00000001); + parameters_ = null; + if (parametersBuilder_ != null) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. A parameters object to be included in each inference request.
    +       * The parameters object is combined with the data field of the Pub/Sub
    +       * message to form the inference request.
    +       * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getParametersBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetParametersFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Optional. A parameters object to be included in each inference request.
    +       * The parameters object is combined with the data field of the Pub/Sub
    +       * message to form the inference request.
    +       * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilder(); + } else { + return parameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : parameters_; + } + } + + /** + * + * + *
    +       * Optional. A parameters object to be included in each inference request.
    +       * The parameters object is combined with the data field of the Pub/Sub
    +       * message to form the inference request.
    +       * 
    + * + * .google.protobuf.Struct parameters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getParameters(), getParentForChildren(), isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.AIInference.UnstructuredInference) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.AIInference.UnstructuredInference) + private static final com.google.pubsub.v1.AIInference.UnstructuredInference DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.AIInference.UnstructuredInference(); + } + + public static com.google.pubsub.v1.AIInference.UnstructuredInference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UnstructuredInference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.AIInference.UnstructuredInference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int inferenceModeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object inferenceMode_; + + public enum InferenceModeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + UNSTRUCTURED_INFERENCE(2), + INFERENCEMODE_NOT_SET(0); + private final int value; + + private InferenceModeCase(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 InferenceModeCase valueOf(int value) { + return forNumber(value); + } + + public static InferenceModeCase forNumber(int value) { + switch (value) { + case 2: + return UNSTRUCTURED_INFERENCE; + case 0: + return INFERENCEMODE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InferenceModeCase getInferenceModeCase() { + return InferenceModeCase.forNumber(inferenceModeCase_); + } + + public static final int ENDPOINT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object endpoint_ = ""; + + /** + * + * + *
    +   * Required. An endpoint to a Vertex AI model of the form
    +   * `projects/{project}/locations/{location}/endpoints/{endpoint}` or
    +   * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`.
    +   * Vertex AI API requests will be sent to this endpoint.
    +   * 
    + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. An endpoint to a Vertex AI model of the form
    +   * `projects/{project}/locations/{location}/endpoints/{endpoint}` or
    +   * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`.
    +   * Vertex AI API requests will be sent to this endpoint.
    +   * 
    + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNSTRUCTURED_INFERENCE_FIELD_NUMBER = 2; + + /** + * + * + *
    +   * Optional. Requests and responses can be any arbitrary JSON object.
    +   * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the unstructuredInference field is set. + */ + @java.lang.Override + public boolean hasUnstructuredInference() { + return inferenceModeCase_ == 2; + } + + /** + * + * + *
    +   * Optional. Requests and responses can be any arbitrary JSON object.
    +   * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The unstructuredInference. + */ + @java.lang.Override + public com.google.pubsub.v1.AIInference.UnstructuredInference getUnstructuredInference() { + if (inferenceModeCase_ == 2) { + return (com.google.pubsub.v1.AIInference.UnstructuredInference) inferenceMode_; + } + return com.google.pubsub.v1.AIInference.UnstructuredInference.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. Requests and responses can be any arbitrary JSON object.
    +   * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.AIInference.UnstructuredInferenceOrBuilder + getUnstructuredInferenceOrBuilder() { + if (inferenceModeCase_ == 2) { + return (com.google.pubsub.v1.AIInference.UnstructuredInference) inferenceMode_; + } + return com.google.pubsub.v1.AIInference.UnstructuredInference.getDefaultInstance(); + } + + public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccountEmail_ = ""; + + /** + * + * + *
    +   * Optional. The service account to use to make prediction requests against
    +   * endpoints. The resource creator or updater that specifies this field must
    +   * have `iam.serviceAccounts.actAs` permission on the service account. If not
    +   * specified, the Pub/Sub [service
    +   * agent](https://cloud.google.com/iam/docs/service-agents),
    +   * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +   * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccountEmail. + */ + @java.lang.Override + public java.lang.String getServiceAccountEmail() { + java.lang.Object ref = serviceAccountEmail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccountEmail_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The service account to use to make prediction requests against
    +   * endpoints. The resource creator or updater that specifies this field must
    +   * have `iam.serviceAccounts.actAs` permission on the service account. If not
    +   * specified, the Pub/Sub [service
    +   * agent](https://cloud.google.com/iam/docs/service-agents),
    +   * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +   * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccountEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountEmailBytes() { + java.lang.Object ref = serviceAccountEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccountEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); + } + if (inferenceModeCase_ == 2) { + output.writeMessage( + 2, (com.google.pubsub.v1.AIInference.UnstructuredInference) inferenceMode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccountEmail_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, serviceAccountEmail_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); + } + if (inferenceModeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.pubsub.v1.AIInference.UnstructuredInference) inferenceMode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccountEmail_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, serviceAccountEmail_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.AIInference)) { + return super.equals(obj); + } + com.google.pubsub.v1.AIInference other = (com.google.pubsub.v1.AIInference) obj; + + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; + if (!getInferenceModeCase().equals(other.getInferenceModeCase())) return false; + switch (inferenceModeCase_) { + case 2: + if (!getUnstructuredInference().equals(other.getUnstructuredInference())) 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) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountEmail().hashCode(); + switch (inferenceModeCase_) { + case 2: + hash = (37 * hash) + UNSTRUCTURED_INFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getUnstructuredInference().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.AIInference parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.AIInference parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.AIInference parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.AIInference parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.AIInference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.AIInference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.AIInference parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.AIInference parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.AIInference parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.AIInference parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.AIInference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.AIInference parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.pubsub.v1.AIInference prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * Configuration for making inference requests against Vertex AI models.
    +   * 
    + * + * Protobuf type {@code google.pubsub.v1.AIInference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.AIInference) + com.google.pubsub.v1.AIInferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_AIInference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_AIInference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.AIInference.class, + com.google.pubsub.v1.AIInference.Builder.class); + } + + // Construct using com.google.pubsub.v1.AIInference.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpoint_ = ""; + if (unstructuredInferenceBuilder_ != null) { + unstructuredInferenceBuilder_.clear(); + } + serviceAccountEmail_ = ""; + inferenceModeCase_ = 0; + inferenceMode_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_AIInference_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.AIInference getDefaultInstanceForType() { + return com.google.pubsub.v1.AIInference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.AIInference build() { + com.google.pubsub.v1.AIInference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.AIInference buildPartial() { + com.google.pubsub.v1.AIInference result = new com.google.pubsub.v1.AIInference(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.pubsub.v1.AIInference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpoint_ = endpoint_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.serviceAccountEmail_ = serviceAccountEmail_; + } + } + + private void buildPartialOneofs(com.google.pubsub.v1.AIInference result) { + result.inferenceModeCase_ = inferenceModeCase_; + result.inferenceMode_ = this.inferenceMode_; + if (inferenceModeCase_ == 2 && unstructuredInferenceBuilder_ != null) { + result.inferenceMode_ = unstructuredInferenceBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.AIInference) { + return mergeFrom((com.google.pubsub.v1.AIInference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.AIInference other) { + if (other == com.google.pubsub.v1.AIInference.getDefaultInstance()) return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getServiceAccountEmail().isEmpty()) { + serviceAccountEmail_ = other.serviceAccountEmail_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getInferenceModeCase()) { + case UNSTRUCTURED_INFERENCE: + { + mergeUnstructuredInference(other.getUnstructuredInference()); + break; + } + case INFERENCEMODE_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: + { + endpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUnstructuredInferenceFieldBuilder().getBuilder(), extensionRegistry); + inferenceModeCase_ = 2; + break; + } // case 18 + case 26: + { + serviceAccountEmail_ = 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 inferenceModeCase_ = 0; + private java.lang.Object inferenceMode_; + + public InferenceModeCase getInferenceModeCase() { + return InferenceModeCase.forNumber(inferenceModeCase_); + } + + public Builder clearInferenceMode() { + inferenceModeCase_ = 0; + inferenceMode_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object endpoint_ = ""; + + /** + * + * + *
    +     * Required. An endpoint to a Vertex AI model of the form
    +     * `projects/{project}/locations/{location}/endpoints/{endpoint}` or
    +     * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`.
    +     * Vertex AI API requests will be sent to this endpoint.
    +     * 
    + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. An endpoint to a Vertex AI model of the form
    +     * `projects/{project}/locations/{location}/endpoints/{endpoint}` or
    +     * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`.
    +     * Vertex AI API requests will be sent to this endpoint.
    +     * 
    + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. An endpoint to a Vertex AI model of the form
    +     * `projects/{project}/locations/{location}/endpoints/{endpoint}` or
    +     * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`.
    +     * Vertex AI API requests will be sent to this endpoint.
    +     * 
    + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. An endpoint to a Vertex AI model of the form
    +     * `projects/{project}/locations/{location}/endpoints/{endpoint}` or
    +     * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`.
    +     * Vertex AI API requests will be sent to this endpoint.
    +     * 
    + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + endpoint_ = getDefaultInstance().getEndpoint(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. An endpoint to a Vertex AI model of the form
    +     * `projects/{project}/locations/{location}/endpoints/{endpoint}` or
    +     * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`.
    +     * Vertex AI API requests will be sent to this endpoint.
    +     * 
    + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.AIInference.UnstructuredInference, + com.google.pubsub.v1.AIInference.UnstructuredInference.Builder, + com.google.pubsub.v1.AIInference.UnstructuredInferenceOrBuilder> + unstructuredInferenceBuilder_; + + /** + * + * + *
    +     * Optional. Requests and responses can be any arbitrary JSON object.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the unstructuredInference field is set. + */ + @java.lang.Override + public boolean hasUnstructuredInference() { + return inferenceModeCase_ == 2; + } + + /** + * + * + *
    +     * Optional. Requests and responses can be any arbitrary JSON object.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The unstructuredInference. + */ + @java.lang.Override + public com.google.pubsub.v1.AIInference.UnstructuredInference getUnstructuredInference() { + if (unstructuredInferenceBuilder_ == null) { + if (inferenceModeCase_ == 2) { + return (com.google.pubsub.v1.AIInference.UnstructuredInference) inferenceMode_; + } + return com.google.pubsub.v1.AIInference.UnstructuredInference.getDefaultInstance(); + } else { + if (inferenceModeCase_ == 2) { + return unstructuredInferenceBuilder_.getMessage(); + } + return com.google.pubsub.v1.AIInference.UnstructuredInference.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. Requests and responses can be any arbitrary JSON object.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUnstructuredInference( + com.google.pubsub.v1.AIInference.UnstructuredInference value) { + if (unstructuredInferenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inferenceMode_ = value; + onChanged(); + } else { + unstructuredInferenceBuilder_.setMessage(value); + } + inferenceModeCase_ = 2; + return this; + } + + /** + * + * + *
    +     * Optional. Requests and responses can be any arbitrary JSON object.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUnstructuredInference( + com.google.pubsub.v1.AIInference.UnstructuredInference.Builder builderForValue) { + if (unstructuredInferenceBuilder_ == null) { + inferenceMode_ = builderForValue.build(); + onChanged(); + } else { + unstructuredInferenceBuilder_.setMessage(builderForValue.build()); + } + inferenceModeCase_ = 2; + return this; + } + + /** + * + * + *
    +     * Optional. Requests and responses can be any arbitrary JSON object.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUnstructuredInference( + com.google.pubsub.v1.AIInference.UnstructuredInference value) { + if (unstructuredInferenceBuilder_ == null) { + if (inferenceModeCase_ == 2 + && inferenceMode_ + != com.google.pubsub.v1.AIInference.UnstructuredInference.getDefaultInstance()) { + inferenceMode_ = + com.google.pubsub.v1.AIInference.UnstructuredInference.newBuilder( + (com.google.pubsub.v1.AIInference.UnstructuredInference) inferenceMode_) + .mergeFrom(value) + .buildPartial(); + } else { + inferenceMode_ = value; + } + onChanged(); + } else { + if (inferenceModeCase_ == 2) { + unstructuredInferenceBuilder_.mergeFrom(value); + } else { + unstructuredInferenceBuilder_.setMessage(value); + } + } + inferenceModeCase_ = 2; + return this; + } + + /** + * + * + *
    +     * Optional. Requests and responses can be any arbitrary JSON object.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUnstructuredInference() { + if (unstructuredInferenceBuilder_ == null) { + if (inferenceModeCase_ == 2) { + inferenceModeCase_ = 0; + inferenceMode_ = null; + onChanged(); + } + } else { + if (inferenceModeCase_ == 2) { + inferenceModeCase_ = 0; + inferenceMode_ = null; + } + unstructuredInferenceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. Requests and responses can be any arbitrary JSON object.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.AIInference.UnstructuredInference.Builder + getUnstructuredInferenceBuilder() { + return internalGetUnstructuredInferenceFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. Requests and responses can be any arbitrary JSON object.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.AIInference.UnstructuredInferenceOrBuilder + getUnstructuredInferenceOrBuilder() { + if ((inferenceModeCase_ == 2) && (unstructuredInferenceBuilder_ != null)) { + return unstructuredInferenceBuilder_.getMessageOrBuilder(); + } else { + if (inferenceModeCase_ == 2) { + return (com.google.pubsub.v1.AIInference.UnstructuredInference) inferenceMode_; + } + return com.google.pubsub.v1.AIInference.UnstructuredInference.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. Requests and responses can be any arbitrary JSON object.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.AIInference.UnstructuredInference, + com.google.pubsub.v1.AIInference.UnstructuredInference.Builder, + com.google.pubsub.v1.AIInference.UnstructuredInferenceOrBuilder> + internalGetUnstructuredInferenceFieldBuilder() { + if (unstructuredInferenceBuilder_ == null) { + if (!(inferenceModeCase_ == 2)) { + inferenceMode_ = + com.google.pubsub.v1.AIInference.UnstructuredInference.getDefaultInstance(); + } + unstructuredInferenceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.AIInference.UnstructuredInference, + com.google.pubsub.v1.AIInference.UnstructuredInference.Builder, + com.google.pubsub.v1.AIInference.UnstructuredInferenceOrBuilder>( + (com.google.pubsub.v1.AIInference.UnstructuredInference) inferenceMode_, + getParentForChildren(), + isClean()); + inferenceMode_ = null; + } + inferenceModeCase_ = 2; + onChanged(); + return unstructuredInferenceBuilder_; + } + + private java.lang.Object serviceAccountEmail_ = ""; + + /** + * + * + *
    +     * Optional. The service account to use to make prediction requests against
    +     * endpoints. The resource creator or updater that specifies this field must
    +     * have `iam.serviceAccounts.actAs` permission on the service account. If not
    +     * specified, the Pub/Sub [service
    +     * agent](https://cloud.google.com/iam/docs/service-agents),
    +     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +     * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccountEmail. + */ + public java.lang.String getServiceAccountEmail() { + java.lang.Object ref = serviceAccountEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccountEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The service account to use to make prediction requests against
    +     * endpoints. The resource creator or updater that specifies this field must
    +     * have `iam.serviceAccounts.actAs` permission on the service account. If not
    +     * specified, the Pub/Sub [service
    +     * agent](https://cloud.google.com/iam/docs/service-agents),
    +     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +     * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccountEmail. + */ + public com.google.protobuf.ByteString getServiceAccountEmailBytes() { + java.lang.Object ref = serviceAccountEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccountEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The service account to use to make prediction requests against
    +     * endpoints. The resource creator or updater that specifies this field must
    +     * have `iam.serviceAccounts.actAs` permission on the service account. If not
    +     * specified, the Pub/Sub [service
    +     * agent](https://cloud.google.com/iam/docs/service-agents),
    +     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +     * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The serviceAccountEmail to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccountEmail_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The service account to use to make prediction requests against
    +     * endpoints. The resource creator or updater that specifies this field must
    +     * have `iam.serviceAccounts.actAs` permission on the service account. If not
    +     * specified, the Pub/Sub [service
    +     * agent](https://cloud.google.com/iam/docs/service-agents),
    +     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +     * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccountEmail() { + serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The service account to use to make prediction requests against
    +     * endpoints. The resource creator or updater that specifies this field must
    +     * have `iam.serviceAccounts.actAs` permission on the service account. If not
    +     * specified, the Pub/Sub [service
    +     * agent](https://cloud.google.com/iam/docs/service-agents),
    +     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +     * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for serviceAccountEmail to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccountEmail_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.AIInference) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.AIInference) + private static final com.google.pubsub.v1.AIInference DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.AIInference(); + } + + public static com.google.pubsub.v1.AIInference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AIInference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.AIInference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AIInferenceOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AIInferenceOrBuilder.java new file mode 100644 index 000000000..07aa76e61 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AIInferenceOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.pubsub.v1; + +@com.google.protobuf.Generated +public interface AIInferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.AIInference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. An endpoint to a Vertex AI model of the form
    +   * `projects/{project}/locations/{location}/endpoints/{endpoint}` or
    +   * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`.
    +   * Vertex AI API requests will be sent to this endpoint.
    +   * 
    + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + + /** + * + * + *
    +   * Required. An endpoint to a Vertex AI model of the form
    +   * `projects/{project}/locations/{location}/endpoints/{endpoint}` or
    +   * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`.
    +   * Vertex AI API requests will be sent to this endpoint.
    +   * 
    + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); + + /** + * + * + *
    +   * Optional. Requests and responses can be any arbitrary JSON object.
    +   * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the unstructuredInference field is set. + */ + boolean hasUnstructuredInference(); + + /** + * + * + *
    +   * Optional. Requests and responses can be any arbitrary JSON object.
    +   * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The unstructuredInference. + */ + com.google.pubsub.v1.AIInference.UnstructuredInference getUnstructuredInference(); + + /** + * + * + *
    +   * Optional. Requests and responses can be any arbitrary JSON object.
    +   * 
    + * + * + * .google.pubsub.v1.AIInference.UnstructuredInference unstructured_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.AIInference.UnstructuredInferenceOrBuilder + getUnstructuredInferenceOrBuilder(); + + /** + * + * + *
    +   * Optional. The service account to use to make prediction requests against
    +   * endpoints. The resource creator or updater that specifies this field must
    +   * have `iam.serviceAccounts.actAs` permission on the service account. If not
    +   * specified, the Pub/Sub [service
    +   * agent](https://cloud.google.com/iam/docs/service-agents),
    +   * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +   * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccountEmail. + */ + java.lang.String getServiceAccountEmail(); + + /** + * + * + *
    +   * Optional. The service account to use to make prediction requests against
    +   * endpoints. The resource creator or updater that specifies this field must
    +   * have `iam.serviceAccounts.actAs` permission on the service account. If not
    +   * specified, the Pub/Sub [service
    +   * agent](https://cloud.google.com/iam/docs/service-agents),
    +   * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +   * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccountEmail. + */ + com.google.protobuf.ByteString getServiceAccountEmailBytes(); + + com.google.pubsub.v1.AIInference.InferenceModeCase getInferenceModeCase(); +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequest.java index 1f62eb3ed..392f45dc6 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.AcknowledgeRequest} */ -public final class AcknowledgeRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class AcknowledgeRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.AcknowledgeRequest) AcknowledgeRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AcknowledgeRequest"); + } + // Use AcknowledgeRequest.newBuilder() to construct. - private AcknowledgeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AcknowledgeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private AcknowledgeRequest() { ackIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AcknowledgeRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_AcknowledgeRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object subscription_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getSubscription() { return s; } } + /** * * @@ -126,6 +135,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList ackIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -142,6 +152,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { public com.google.protobuf.ProtocolStringList getAckIdsList() { return ackIds_; } + /** * * @@ -158,6 +169,7 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { public int getAckIdsCount() { return ackIds_.size(); } + /** * * @@ -175,6 +187,7 @@ public int getAckIdsCount() { public java.lang.String getAckIds(int index) { return ackIds_.get(index); } + /** * * @@ -207,11 +220,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); } for (int i = 0; i < ackIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ackIds_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 2, ackIds_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -222,8 +235,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); } { int dataSize = 0; @@ -309,38 +322,38 @@ public static com.google.pubsub.v1.AcknowledgeRequest parseFrom( public static com.google.pubsub.v1.AcknowledgeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.AcknowledgeRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.AcknowledgeRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.AcknowledgeRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.AcknowledgeRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.AcknowledgeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -363,10 +376,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -376,7 +390,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.AcknowledgeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.AcknowledgeRequest) com.google.pubsub.v1.AcknowledgeRequestOrBuilder { @@ -386,7 +400,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_AcknowledgeRequest_fieldAccessorTable @@ -398,7 +412,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.AcknowledgeRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -453,39 +467,6 @@ private void buildPartial0(com.google.pubsub.v1.AcknowledgeRequest 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.pubsub.v1.AcknowledgeRequest) { @@ -572,6 +553,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object subscription_ = ""; + /** * * @@ -597,6 +579,7 @@ public java.lang.String getSubscription() { return (java.lang.String) ref; } } + /** * * @@ -622,6 +605,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -646,6 +630,7 @@ public Builder setSubscription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -666,6 +651,7 @@ public Builder clearSubscription() { onChanged(); return this; } + /** * * @@ -701,6 +687,7 @@ private void ensureAckIdsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -718,6 +705,7 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { ackIds_.makeImmutable(); return ackIds_; } + /** * * @@ -734,6 +722,7 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { public int getAckIdsCount() { return ackIds_.size(); } + /** * * @@ -751,6 +740,7 @@ public int getAckIdsCount() { public java.lang.String getAckIds(int index) { return ackIds_.get(index); } + /** * * @@ -768,6 +758,7 @@ public java.lang.String getAckIds(int index) { public com.google.protobuf.ByteString getAckIdsBytes(int index) { return ackIds_.getByteString(index); } + /** * * @@ -793,6 +784,7 @@ public Builder setAckIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -817,6 +809,7 @@ public Builder addAckIds(java.lang.String value) { onChanged(); return this; } + /** * * @@ -838,6 +831,7 @@ public Builder addAllAckIds(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -858,6 +852,7 @@ public Builder clearAckIds() { onChanged(); return this; } + /** * * @@ -884,17 +879,6 @@ public Builder addAckIdsBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.AcknowledgeRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequestOrBuilder.java index d68356fe1..f74ab5d14 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/AcknowledgeRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface AcknowledgeRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.AcknowledgeRequest) @@ -39,6 +41,7 @@ public interface AcknowledgeRequestOrBuilder * @return The subscription. */ java.lang.String getSubscription(); + /** * * @@ -69,6 +72,7 @@ public interface AcknowledgeRequestOrBuilder * @return A list containing the ackIds. */ java.util.List getAckIdsList(); + /** * * @@ -83,6 +87,7 @@ public interface AcknowledgeRequestOrBuilder * @return The count of ackIds. */ int getAckIdsCount(); + /** * * @@ -98,6 +103,7 @@ public interface AcknowledgeRequestOrBuilder * @return The ackIds at the given index. */ java.lang.String getAckIds(int index); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java index 7e22cfa02..6dc42b7be 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.BigQueryConfig} */ -public final class BigQueryConfig extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class BigQueryConfig extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.BigQueryConfig) BigQueryConfigOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BigQueryConfig"); + } + // Use BigQueryConfig.newBuilder() to construct. - private BigQueryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BigQueryConfig(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private BigQueryConfig() { serviceAccountEmail_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BigQueryConfig(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_BigQueryConfig_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_BigQueryConfig_fieldAccessorTable @@ -141,9 +148,31 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * IN_TRANSIT_LOCATION_RESTRICTION = 5; */ IN_TRANSIT_LOCATION_RESTRICTION(5), + /** + * + * + *
    +     * Cannot write to the BigQuery table because the table is not in the same
    +     * location as where Vertex AI models used in `message_transform`s are
    +     * deployed.
    +     * 
    + * + * VERTEX_AI_LOCATION_RESTRICTION = 6; + */ + VERTEX_AI_LOCATION_RESTRICTION(6), UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + /** * * @@ -154,6 +183,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -164,6 +194,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * ACTIVE = 1; */ public static final int ACTIVE_VALUE = 1; + /** * * @@ -179,6 +210,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * PERMISSION_DENIED = 2; */ public static final int PERMISSION_DENIED_VALUE = 2; + /** * * @@ -189,6 +221,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * NOT_FOUND = 3; */ public static final int NOT_FOUND_VALUE = 3; + /** * * @@ -199,6 +232,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * SCHEMA_MISMATCH = 4; */ public static final int SCHEMA_MISMATCH_VALUE = 4; + /** * * @@ -211,6 +245,19 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int IN_TRANSIT_LOCATION_RESTRICTION_VALUE = 5; + /** + * + * + *
    +     * Cannot write to the BigQuery table because the table is not in the same
    +     * location as where Vertex AI models used in `message_transform`s are
    +     * deployed.
    +     * 
    + * + * VERTEX_AI_LOCATION_RESTRICTION = 6; + */ + public static final int VERTEX_AI_LOCATION_RESTRICTION_VALUE = 6; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -247,6 +294,8 @@ public static State forNumber(int value) { return SCHEMA_MISMATCH; case 5: return IN_TRANSIT_LOCATION_RESTRICTION; + case 6: + return VERTEX_AI_LOCATION_RESTRICTION; default: return null; } @@ -275,7 +324,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.pubsub.v1.BigQueryConfig.getDescriptor().getEnumTypes().get(0); } @@ -304,6 +353,7 @@ private State(int value) { @SuppressWarnings("serial") private volatile java.lang.Object table_ = ""; + /** * * @@ -328,6 +378,7 @@ public java.lang.String getTable() { return s; } } + /** * * @@ -355,6 +406,7 @@ public com.google.protobuf.ByteString getTableBytes() { public static final int USE_TOPIC_SCHEMA_FIELD_NUMBER = 2; private boolean useTopicSchema_ = false; + /** * * @@ -375,6 +427,7 @@ public boolean getUseTopicSchema() { public static final int WRITE_METADATA_FIELD_NUMBER = 3; private boolean writeMetadata_ = false; + /** * * @@ -397,6 +450,7 @@ public boolean getWriteMetadata() { public static final int DROP_UNKNOWN_FIELDS_FIELD_NUMBER = 4; private boolean dropUnknownFields_ = false; + /** * * @@ -419,6 +473,7 @@ public boolean getDropUnknownFields() { public static final int STATE_FIELD_NUMBER = 5; private int state_ = 0; + /** * * @@ -437,6 +492,7 @@ public boolean getDropUnknownFields() { public int getStateValue() { return state_; } + /** * * @@ -460,6 +516,7 @@ public com.google.pubsub.v1.BigQueryConfig.State getState() { public static final int USE_TABLE_SCHEMA_FIELD_NUMBER = 6; private boolean useTableSchema_ = false; + /** * * @@ -482,6 +539,7 @@ public boolean getUseTableSchema() { @SuppressWarnings("serial") private volatile java.lang.Object serviceAccountEmail_ = ""; + /** * * @@ -510,6 +568,7 @@ public java.lang.String getServiceAccountEmail() { return s; } } + /** * * @@ -553,8 +612,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, table_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, table_); } if (useTopicSchema_ != false) { output.writeBool(2, useTopicSchema_); @@ -571,8 +630,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (useTableSchema_ != false) { output.writeBool(6, useTableSchema_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, serviceAccountEmail_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccountEmail_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, serviceAccountEmail_); } getUnknownFields().writeTo(output); } @@ -583,8 +642,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, table_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, table_); } if (useTopicSchema_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, useTopicSchema_); @@ -601,8 +660,8 @@ public int getSerializedSize() { if (useTableSchema_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, useTableSchema_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, serviceAccountEmail_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccountEmail_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, serviceAccountEmail_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -692,38 +751,38 @@ public static com.google.pubsub.v1.BigQueryConfig parseFrom( public static com.google.pubsub.v1.BigQueryConfig parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.BigQueryConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.BigQueryConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.BigQueryConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.BigQueryConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.BigQueryConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -746,10 +805,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -759,7 +819,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.BigQueryConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.BigQueryConfig) com.google.pubsub.v1.BigQueryConfigOrBuilder { @@ -769,7 +829,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_BigQueryConfig_fieldAccessorTable @@ -781,7 +841,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.BigQueryConfig.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -854,39 +914,6 @@ private void buildPartial0(com.google.pubsub.v1.BigQueryConfig 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.pubsub.v1.BigQueryConfig) { @@ -1012,6 +1039,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object table_ = ""; + /** * * @@ -1035,6 +1063,7 @@ public java.lang.String getTable() { return (java.lang.String) ref; } } + /** * * @@ -1058,6 +1087,7 @@ public com.google.protobuf.ByteString getTableBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1080,6 +1110,7 @@ public Builder setTable(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1098,6 +1129,7 @@ public Builder clearTable() { onChanged(); return this; } + /** * * @@ -1123,6 +1155,7 @@ public Builder setTableBytes(com.google.protobuf.ByteString value) { } private boolean useTopicSchema_; + /** * * @@ -1140,6 +1173,7 @@ public Builder setTableBytes(com.google.protobuf.ByteString value) { public boolean getUseTopicSchema() { return useTopicSchema_; } + /** * * @@ -1161,6 +1195,7 @@ public Builder setUseTopicSchema(boolean value) { onChanged(); return this; } + /** * * @@ -1182,6 +1217,7 @@ public Builder clearUseTopicSchema() { } private boolean writeMetadata_; + /** * * @@ -1201,6 +1237,7 @@ public Builder clearUseTopicSchema() { public boolean getWriteMetadata() { return writeMetadata_; } + /** * * @@ -1224,6 +1261,7 @@ public Builder setWriteMetadata(boolean value) { onChanged(); return this; } + /** * * @@ -1247,6 +1285,7 @@ public Builder clearWriteMetadata() { } private boolean dropUnknownFields_; + /** * * @@ -1266,6 +1305,7 @@ public Builder clearWriteMetadata() { public boolean getDropUnknownFields() { return dropUnknownFields_; } + /** * * @@ -1289,6 +1329,7 @@ public Builder setDropUnknownFields(boolean value) { onChanged(); return this; } + /** * * @@ -1312,6 +1353,7 @@ public Builder clearDropUnknownFields() { } private int state_ = 0; + /** * * @@ -1330,6 +1372,7 @@ public Builder clearDropUnknownFields() { public int getStateValue() { return state_; } + /** * * @@ -1351,6 +1394,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -1371,6 +1415,7 @@ public com.google.pubsub.v1.BigQueryConfig.State getState() { com.google.pubsub.v1.BigQueryConfig.State.forNumber(state_); return result == null ? com.google.pubsub.v1.BigQueryConfig.State.UNRECOGNIZED : result; } + /** * * @@ -1395,6 +1440,7 @@ public Builder setState(com.google.pubsub.v1.BigQueryConfig.State value) { onChanged(); return this; } + /** * * @@ -1417,6 +1463,7 @@ public Builder clearState() { } private boolean useTableSchema_; + /** * * @@ -1434,6 +1481,7 @@ public Builder clearState() { public boolean getUseTableSchema() { return useTableSchema_; } + /** * * @@ -1455,6 +1503,7 @@ public Builder setUseTableSchema(boolean value) { onChanged(); return this; } + /** * * @@ -1476,6 +1525,7 @@ public Builder clearUseTableSchema() { } private java.lang.Object serviceAccountEmail_ = ""; + /** * * @@ -1503,6 +1553,7 @@ public java.lang.String getServiceAccountEmail() { return (java.lang.String) ref; } } + /** * * @@ -1530,6 +1581,7 @@ public com.google.protobuf.ByteString getServiceAccountEmailBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1556,6 +1608,7 @@ public Builder setServiceAccountEmail(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1578,6 +1631,7 @@ public Builder clearServiceAccountEmail() { onChanged(); return this; } + /** * * @@ -1606,17 +1660,6 @@ public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.BigQueryConfig) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java index f9c4eb555..250b87a57 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface BigQueryConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.BigQueryConfig) @@ -37,6 +39,7 @@ public interface BigQueryConfigOrBuilder * @return The table. */ java.lang.String getTable(); + /** * * @@ -115,6 +118,7 @@ public interface BigQueryConfigOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -163,6 +167,7 @@ public interface BigQueryConfigOrBuilder * @return The serviceAccountEmail. */ java.lang.String getServiceAccountEmail(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigtableConfig.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigtableConfig.java new file mode 100644 index 000000000..38cafb2e0 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigtableConfig.java @@ -0,0 +1,1650 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.pubsub.v1; + +/** + * + * + *
    + * Configuration for a Bigtable subscription. The Pub/Sub message will be
    + * written to a Bigtable row as follows:
    + * - row key: subscription name and message ID delimited by #.
    + * - columns: message bytes written to a single column family "data" with an
    + * empty-string column qualifier.
    + * - cell timestamp: the message publish timestamp.
    + * 
    + * + * Protobuf type {@code google.pubsub.v1.BigtableConfig} + */ +@com.google.protobuf.Generated +public final class BigtableConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.BigtableConfig) + BigtableConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BigtableConfig"); + } + + // Use BigtableConfig.newBuilder() to construct. + private BigtableConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BigtableConfig() { + table_ = ""; + appProfileId_ = ""; + serviceAccountEmail_ = ""; + state_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_BigtableConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_BigtableConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.BigtableConfig.class, + com.google.pubsub.v1.BigtableConfig.Builder.class); + } + + /** + * + * + *
    +   * Possible states for a Bigtable subscription.
    +   * Note: more states could be added in the future. Please code accordingly.
    +   * 
    + * + * Protobuf enum {@code google.pubsub.v1.BigtableConfig.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * Default value. This value is unused.
    +     * 
    + * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
    +     * The subscription can actively send messages to Bigtable.
    +     * 
    + * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
    +     * Cannot write to Bigtable because the instance, table, or app profile
    +     * does not exist.
    +     * 
    + * + * NOT_FOUND = 2; + */ + NOT_FOUND(2), + /** + * + * + *
    +     * Cannot write to Bigtable because the app profile is not configured for
    +     * single-cluster routing.
    +     * 
    + * + * APP_PROFILE_MISCONFIGURED = 3; + */ + APP_PROFILE_MISCONFIGURED(3), + /** + * + * + *
    +     * Cannot write to Bigtable because of permission denied errors.
    +     * This can happen if:
    +     * - The Pub/Sub service agent has not been granted the
    +     * [appropriate Bigtable IAM permission
    +     * bigtable.tables.mutateRows]({$universe.dns_names.final_documentation_domain}/bigtable/docs/access-control#permissions)
    +     * - The bigtable.googleapis.com API is not enabled for the project
    +     * ([instructions]({$universe.dns_names.final_documentation_domain}/service-usage/docs/enable-disable))
    +     * 
    + * + * PERMISSION_DENIED = 4; + */ + PERMISSION_DENIED(4), + /** + * + * + *
    +     * Cannot write to Bigtable because of a missing column family ("data") or
    +     * if there is no structured row key for the subscription name + message ID.
    +     * 
    + * + * SCHEMA_MISMATCH = 5; + */ + SCHEMA_MISMATCH(5), + /** + * + * + *
    +     * Cannot write to the destination because enforce_in_transit is set to true
    +     * and the destination locations are not in the allowed regions.
    +     * 
    + * + * IN_TRANSIT_LOCATION_RESTRICTION = 6; + */ + IN_TRANSIT_LOCATION_RESTRICTION(6), + /** + * + * + *
    +     * Cannot write to Bigtable because the table is not in the same location as
    +     * where Vertex AI models used in `message_transform`s are deployed.
    +     * 
    + * + * VERTEX_AI_LOCATION_RESTRICTION = 7; + */ + VERTEX_AI_LOCATION_RESTRICTION(7), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
    +     * Default value. This value is unused.
    +     * 
    + * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +     * The subscription can actively send messages to Bigtable.
    +     * 
    + * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + + /** + * + * + *
    +     * Cannot write to Bigtable because the instance, table, or app profile
    +     * does not exist.
    +     * 
    + * + * NOT_FOUND = 2; + */ + public static final int NOT_FOUND_VALUE = 2; + + /** + * + * + *
    +     * Cannot write to Bigtable because the app profile is not configured for
    +     * single-cluster routing.
    +     * 
    + * + * APP_PROFILE_MISCONFIGURED = 3; + */ + public static final int APP_PROFILE_MISCONFIGURED_VALUE = 3; + + /** + * + * + *
    +     * Cannot write to Bigtable because of permission denied errors.
    +     * This can happen if:
    +     * - The Pub/Sub service agent has not been granted the
    +     * [appropriate Bigtable IAM permission
    +     * bigtable.tables.mutateRows]({$universe.dns_names.final_documentation_domain}/bigtable/docs/access-control#permissions)
    +     * - The bigtable.googleapis.com API is not enabled for the project
    +     * ([instructions]({$universe.dns_names.final_documentation_domain}/service-usage/docs/enable-disable))
    +     * 
    + * + * PERMISSION_DENIED = 4; + */ + public static final int PERMISSION_DENIED_VALUE = 4; + + /** + * + * + *
    +     * Cannot write to Bigtable because of a missing column family ("data") or
    +     * if there is no structured row key for the subscription name + message ID.
    +     * 
    + * + * SCHEMA_MISMATCH = 5; + */ + public static final int SCHEMA_MISMATCH_VALUE = 5; + + /** + * + * + *
    +     * Cannot write to the destination because enforce_in_transit is set to true
    +     * and the destination locations are not in the allowed regions.
    +     * 
    + * + * IN_TRANSIT_LOCATION_RESTRICTION = 6; + */ + public static final int IN_TRANSIT_LOCATION_RESTRICTION_VALUE = 6; + + /** + * + * + *
    +     * Cannot write to Bigtable because the table is not in the same location as
    +     * where Vertex AI models used in `message_transform`s are deployed.
    +     * 
    + * + * VERTEX_AI_LOCATION_RESTRICTION = 7; + */ + public static final int VERTEX_AI_LOCATION_RESTRICTION_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return NOT_FOUND; + case 3: + return APP_PROFILE_MISCONFIGURED; + case 4: + return PERMISSION_DENIED; + case 5: + return SCHEMA_MISMATCH; + case 6: + return IN_TRANSIT_LOCATION_RESTRICTION; + case 7: + return VERTEX_AI_LOCATION_RESTRICTION; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.pubsub.v1.BigtableConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.pubsub.v1.BigtableConfig.State) + } + + public static final int TABLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object table_ = ""; + + /** + * + * + *
    +   * Optional. The unique name of the table to write messages to.
    +   *
    +   * Values are of the form
    +   * `projects/<project>/instances/<instance>/tables/<table>`.
    +   * 
    + * + * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The table. + */ + @java.lang.Override + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The unique name of the table to write messages to.
    +   *
    +   * Values are of the form
    +   * `projects/<project>/instances/<instance>/tables/<table>`.
    +   * 
    + * + * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for table. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APP_PROFILE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object appProfileId_ = ""; + + /** + * + * + *
    +   * Optional. The app profile to use for the Bigtable writes. If not specified,
    +   * the "default" application profile will be used. The app profile must use
    +   * single-cluster routing.
    +   * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appProfileId. + */ + @java.lang.Override + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appProfileId_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The app profile to use for the Bigtable writes. If not specified,
    +   * the "default" application profile will be used. The app profile must use
    +   * single-cluster routing.
    +   * 
    + * + * 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 SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccountEmail_ = ""; + + /** + * + * + *
    +   * Optional. The service account to use to write to Bigtable. The subscription
    +   * creator or updater that specifies this field must have
    +   * `iam.serviceAccounts.actAs` permission on the service account. If not
    +   * specified, the Pub/Sub [service
    +   * agent](https://cloud.google.com/iam/docs/service-agents),
    +   * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +   * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccountEmail. + */ + @java.lang.Override + public java.lang.String getServiceAccountEmail() { + java.lang.Object ref = serviceAccountEmail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccountEmail_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The service account to use to write to Bigtable. The subscription
    +   * creator or updater that specifies this field must have
    +   * `iam.serviceAccounts.actAs` permission on the service account. If not
    +   * specified, the Pub/Sub [service
    +   * agent](https://cloud.google.com/iam/docs/service-agents),
    +   * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +   * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccountEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountEmailBytes() { + java.lang.Object ref = serviceAccountEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccountEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WRITE_METADATA_FIELD_NUMBER = 5; + private boolean writeMetadata_ = false; + + /** + * + * + *
    +   * Optional. When true, write the subscription name, message_id, publish_time,
    +   * attributes, and ordering_key to additional columns in the table under the
    +   * pubsub_metadata column family. The subscription name, message_id, and
    +   * publish_time fields are put in their own columns while all other message
    +   * properties (other than data) are written to a JSON object in the attributes
    +   * column.
    +   * 
    + * + * bool write_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The writeMetadata. + */ + @java.lang.Override + public boolean getWriteMetadata() { + return writeMetadata_; + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + + /** + * + * + *
    +   * Output only. An output-only field that indicates whether or not the
    +   * subscription can receive messages.
    +   * 
    + * + * + * .google.pubsub.v1.BigtableConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
    +   * Output only. An output-only field that indicates whether or not the
    +   * subscription can receive messages.
    +   * 
    + * + * + * .google.pubsub.v1.BigtableConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.pubsub.v1.BigtableConfig.State getState() { + com.google.pubsub.v1.BigtableConfig.State result = + com.google.pubsub.v1.BigtableConfig.State.forNumber(state_); + return result == null ? com.google.pubsub.v1.BigtableConfig.State.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, table_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, appProfileId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccountEmail_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, serviceAccountEmail_); + } + if (state_ != com.google.pubsub.v1.BigtableConfig.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (writeMetadata_ != false) { + output.writeBool(5, writeMetadata_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, table_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appProfileId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccountEmail_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, serviceAccountEmail_); + } + if (state_ != com.google.pubsub.v1.BigtableConfig.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (writeMetadata_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, writeMetadata_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.BigtableConfig)) { + return super.equals(obj); + } + com.google.pubsub.v1.BigtableConfig other = (com.google.pubsub.v1.BigtableConfig) obj; + + if (!getTable().equals(other.getTable())) return false; + if (!getAppProfileId().equals(other.getAppProfileId())) return false; + if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; + if (getWriteMetadata() != other.getWriteMetadata()) return false; + if (state_ != other.state_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAppProfileId().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountEmail().hashCode(); + hash = (37 * hash) + WRITE_METADATA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getWriteMetadata()); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.BigtableConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.BigtableConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.BigtableConfig parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.BigtableConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.BigtableConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.BigtableConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.BigtableConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.BigtableConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.BigtableConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.BigtableConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.BigtableConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.BigtableConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.pubsub.v1.BigtableConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * Configuration for a Bigtable subscription. The Pub/Sub message will be
    +   * written to a Bigtable row as follows:
    +   * - row key: subscription name and message ID delimited by #.
    +   * - columns: message bytes written to a single column family "data" with an
    +   * empty-string column qualifier.
    +   * - cell timestamp: the message publish timestamp.
    +   * 
    + * + * Protobuf type {@code google.pubsub.v1.BigtableConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.BigtableConfig) + com.google.pubsub.v1.BigtableConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_BigtableConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_BigtableConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.BigtableConfig.class, + com.google.pubsub.v1.BigtableConfig.Builder.class); + } + + // Construct using com.google.pubsub.v1.BigtableConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + table_ = ""; + appProfileId_ = ""; + serviceAccountEmail_ = ""; + writeMetadata_ = false; + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_BigtableConfig_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.BigtableConfig getDefaultInstanceForType() { + return com.google.pubsub.v1.BigtableConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.BigtableConfig build() { + com.google.pubsub.v1.BigtableConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.BigtableConfig buildPartial() { + com.google.pubsub.v1.BigtableConfig result = new com.google.pubsub.v1.BigtableConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.pubsub.v1.BigtableConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.table_ = table_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.appProfileId_ = appProfileId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.serviceAccountEmail_ = serviceAccountEmail_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.writeMetadata_ = writeMetadata_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.state_ = state_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.BigtableConfig) { + return mergeFrom((com.google.pubsub.v1.BigtableConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.BigtableConfig other) { + if (other == com.google.pubsub.v1.BigtableConfig.getDefaultInstance()) return this; + if (!other.getTable().isEmpty()) { + table_ = other.table_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAppProfileId().isEmpty()) { + appProfileId_ = other.appProfileId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getServiceAccountEmail().isEmpty()) { + serviceAccountEmail_ = other.serviceAccountEmail_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getWriteMetadata() != false) { + setWriteMetadata(other.getWriteMetadata()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + table_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + appProfileId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + serviceAccountEmail_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 32 + case 40: + { + writeMetadata_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object table_ = ""; + + /** + * + * + *
    +     * Optional. The unique name of the table to write messages to.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/tables/<table>`.
    +     * 
    + * + * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The table. + */ + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The unique name of the table to write messages to.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/tables/<table>`.
    +     * 
    + * + * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for table. + */ + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The unique name of the table to write messages to.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/tables/<table>`.
    +     * 
    + * + * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The table to set. + * @return This builder for chaining. + */ + public Builder setTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + table_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The unique name of the table to write messages to.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/tables/<table>`.
    +     * 
    + * + * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTable() { + table_ = getDefaultInstance().getTable(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The unique name of the table to write messages to.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/tables/<table>`.
    +     * 
    + * + * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for table to set. + * @return This builder for chaining. + */ + public Builder setTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + table_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object appProfileId_ = ""; + + /** + * + * + *
    +     * Optional. The app profile to use for the Bigtable writes. If not specified,
    +     * the "default" application profile will be used. The app profile must use
    +     * single-cluster routing.
    +     * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appProfileId. + */ + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appProfileId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The app profile to use for the Bigtable writes. If not specified,
    +     * the "default" application profile will be used. The app profile must use
    +     * single-cluster routing.
    +     * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for appProfileId. + */ + public com.google.protobuf.ByteString getAppProfileIdBytes() { + java.lang.Object ref = appProfileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The app profile to use for the Bigtable writes. If not specified,
    +     * the "default" application profile will be used. The app profile must use
    +     * single-cluster routing.
    +     * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + appProfileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The app profile to use for the Bigtable writes. If not specified,
    +     * the "default" application profile will be used. The app profile must use
    +     * single-cluster routing.
    +     * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAppProfileId() { + appProfileId_ = getDefaultInstance().getAppProfileId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The app profile to use for the Bigtable writes. If not specified,
    +     * the "default" application profile will be used. The app profile must use
    +     * single-cluster routing.
    +     * 
    + * + * 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 serviceAccountEmail_ = ""; + + /** + * + * + *
    +     * Optional. The service account to use to write to Bigtable. The subscription
    +     * creator or updater that specifies this field must have
    +     * `iam.serviceAccounts.actAs` permission on the service account. If not
    +     * specified, the Pub/Sub [service
    +     * agent](https://cloud.google.com/iam/docs/service-agents),
    +     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +     * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccountEmail. + */ + public java.lang.String getServiceAccountEmail() { + java.lang.Object ref = serviceAccountEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccountEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The service account to use to write to Bigtable. The subscription
    +     * creator or updater that specifies this field must have
    +     * `iam.serviceAccounts.actAs` permission on the service account. If not
    +     * specified, the Pub/Sub [service
    +     * agent](https://cloud.google.com/iam/docs/service-agents),
    +     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +     * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccountEmail. + */ + public com.google.protobuf.ByteString getServiceAccountEmailBytes() { + java.lang.Object ref = serviceAccountEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccountEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The service account to use to write to Bigtable. The subscription
    +     * creator or updater that specifies this field must have
    +     * `iam.serviceAccounts.actAs` permission on the service account. If not
    +     * specified, the Pub/Sub [service
    +     * agent](https://cloud.google.com/iam/docs/service-agents),
    +     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +     * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The serviceAccountEmail to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccountEmail_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The service account to use to write to Bigtable. The subscription
    +     * creator or updater that specifies this field must have
    +     * `iam.serviceAccounts.actAs` permission on the service account. If not
    +     * specified, the Pub/Sub [service
    +     * agent](https://cloud.google.com/iam/docs/service-agents),
    +     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +     * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccountEmail() { + serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The service account to use to write to Bigtable. The subscription
    +     * creator or updater that specifies this field must have
    +     * `iam.serviceAccounts.actAs` permission on the service account. If not
    +     * specified, the Pub/Sub [service
    +     * agent](https://cloud.google.com/iam/docs/service-agents),
    +     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +     * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for serviceAccountEmail to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccountEmail_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean writeMetadata_; + + /** + * + * + *
    +     * Optional. When true, write the subscription name, message_id, publish_time,
    +     * attributes, and ordering_key to additional columns in the table under the
    +     * pubsub_metadata column family. The subscription name, message_id, and
    +     * publish_time fields are put in their own columns while all other message
    +     * properties (other than data) are written to a JSON object in the attributes
    +     * column.
    +     * 
    + * + * bool write_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The writeMetadata. + */ + @java.lang.Override + public boolean getWriteMetadata() { + return writeMetadata_; + } + + /** + * + * + *
    +     * Optional. When true, write the subscription name, message_id, publish_time,
    +     * attributes, and ordering_key to additional columns in the table under the
    +     * pubsub_metadata column family. The subscription name, message_id, and
    +     * publish_time fields are put in their own columns while all other message
    +     * properties (other than data) are written to a JSON object in the attributes
    +     * column.
    +     * 
    + * + * bool write_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The writeMetadata to set. + * @return This builder for chaining. + */ + public Builder setWriteMetadata(boolean value) { + + writeMetadata_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. When true, write the subscription name, message_id, publish_time,
    +     * attributes, and ordering_key to additional columns in the table under the
    +     * pubsub_metadata column family. The subscription name, message_id, and
    +     * publish_time fields are put in their own columns while all other message
    +     * properties (other than data) are written to a JSON object in the attributes
    +     * column.
    +     * 
    + * + * bool write_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearWriteMetadata() { + bitField0_ = (bitField0_ & ~0x00000008); + writeMetadata_ = false; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
    +     * Output only. An output-only field that indicates whether or not the
    +     * subscription can receive messages.
    +     * 
    + * + * + * .google.pubsub.v1.BigtableConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
    +     * Output only. An output-only field that indicates whether or not the
    +     * subscription can receive messages.
    +     * 
    + * + * + * .google.pubsub.v1.BigtableConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. An output-only field that indicates whether or not the
    +     * subscription can receive messages.
    +     * 
    + * + * + * .google.pubsub.v1.BigtableConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.pubsub.v1.BigtableConfig.State getState() { + com.google.pubsub.v1.BigtableConfig.State result = + com.google.pubsub.v1.BigtableConfig.State.forNumber(state_); + return result == null ? com.google.pubsub.v1.BigtableConfig.State.UNRECOGNIZED : result; + } + + /** + * + * + *
    +     * Output only. An output-only field that indicates whether or not the
    +     * subscription can receive messages.
    +     * 
    + * + * + * .google.pubsub.v1.BigtableConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.pubsub.v1.BigtableConfig.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. An output-only field that indicates whether or not the
    +     * subscription can receive messages.
    +     * 
    + * + * + * .google.pubsub.v1.BigtableConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000010); + state_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.BigtableConfig) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.BigtableConfig) + private static final com.google.pubsub.v1.BigtableConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.BigtableConfig(); + } + + public static com.google.pubsub.v1.BigtableConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigtableConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.BigtableConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigtableConfigOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigtableConfigOrBuilder.java new file mode 100644 index 000000000..ef22565e2 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigtableConfigOrBuilder.java @@ -0,0 +1,176 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.pubsub.v1; + +@com.google.protobuf.Generated +public interface BigtableConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.BigtableConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Optional. The unique name of the table to write messages to.
    +   *
    +   * Values are of the form
    +   * `projects/<project>/instances/<instance>/tables/<table>`.
    +   * 
    + * + * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The table. + */ + java.lang.String getTable(); + + /** + * + * + *
    +   * Optional. The unique name of the table to write messages to.
    +   *
    +   * Values are of the form
    +   * `projects/<project>/instances/<instance>/tables/<table>`.
    +   * 
    + * + * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for table. + */ + com.google.protobuf.ByteString getTableBytes(); + + /** + * + * + *
    +   * Optional. The app profile to use for the Bigtable writes. If not specified,
    +   * the "default" application profile will be used. The app profile must use
    +   * single-cluster routing.
    +   * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appProfileId. + */ + java.lang.String getAppProfileId(); + + /** + * + * + *
    +   * Optional. The app profile to use for the Bigtable writes. If not specified,
    +   * the "default" application profile will be used. The app profile must use
    +   * single-cluster routing.
    +   * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for appProfileId. + */ + com.google.protobuf.ByteString getAppProfileIdBytes(); + + /** + * + * + *
    +   * Optional. The service account to use to write to Bigtable. The subscription
    +   * creator or updater that specifies this field must have
    +   * `iam.serviceAccounts.actAs` permission on the service account. If not
    +   * specified, the Pub/Sub [service
    +   * agent](https://cloud.google.com/iam/docs/service-agents),
    +   * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +   * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccountEmail. + */ + java.lang.String getServiceAccountEmail(); + + /** + * + * + *
    +   * Optional. The service account to use to write to Bigtable. The subscription
    +   * creator or updater that specifies this field must have
    +   * `iam.serviceAccounts.actAs` permission on the service account. If not
    +   * specified, the Pub/Sub [service
    +   * agent](https://cloud.google.com/iam/docs/service-agents),
    +   * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    +   * 
    + * + * string service_account_email = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccountEmail. + */ + com.google.protobuf.ByteString getServiceAccountEmailBytes(); + + /** + * + * + *
    +   * Optional. When true, write the subscription name, message_id, publish_time,
    +   * attributes, and ordering_key to additional columns in the table under the
    +   * pubsub_metadata column family. The subscription name, message_id, and
    +   * publish_time fields are put in their own columns while all other message
    +   * properties (other than data) are written to a JSON object in the attributes
    +   * column.
    +   * 
    + * + * bool write_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The writeMetadata. + */ + boolean getWriteMetadata(); + + /** + * + * + *
    +   * Output only. An output-only field that indicates whether or not the
    +   * subscription can receive messages.
    +   * 
    + * + * + * .google.pubsub.v1.BigtableConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
    +   * Output only. An output-only field that indicates whether or not the
    +   * subscription can receive messages.
    +   * 
    + * + * + * .google.pubsub.v1.BigtableConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.pubsub.v1.BigtableConfig.State getState(); +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java index a90d77109..b30b59267 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.CloudStorageConfig} */ -public final class CloudStorageConfig extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CloudStorageConfig extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.CloudStorageConfig) CloudStorageConfigOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CloudStorageConfig"); + } + // Use CloudStorageConfig.newBuilder() to construct. - private CloudStorageConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CloudStorageConfig(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -47,19 +60,13 @@ private CloudStorageConfig() { serviceAccountEmail_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CloudStorageConfig(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_CloudStorageConfig_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_CloudStorageConfig_fieldAccessorTable @@ -141,9 +148,31 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * SCHEMA_MISMATCH = 5; */ SCHEMA_MISMATCH(5), + /** + * + * + *
    +     * Cannot write to the Cloud Storage bucket because the bucket is not in the
    +     * same location as where Vertex AI models used in `message_transform`s are
    +     * deployed.
    +     * 
    + * + * VERTEX_AI_LOCATION_RESTRICTION = 6; + */ + VERTEX_AI_LOCATION_RESTRICTION(6), UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + /** * * @@ -154,6 +183,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -164,6 +194,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * ACTIVE = 1; */ public static final int ACTIVE_VALUE = 1; + /** * * @@ -175,6 +206,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * PERMISSION_DENIED = 2; */ public static final int PERMISSION_DENIED_VALUE = 2; + /** * * @@ -185,6 +217,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * NOT_FOUND = 3; */ public static final int NOT_FOUND_VALUE = 3; + /** * * @@ -196,6 +229,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * IN_TRANSIT_LOCATION_RESTRICTION = 4; */ public static final int IN_TRANSIT_LOCATION_RESTRICTION_VALUE = 4; + /** * * @@ -208,6 +242,19 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int SCHEMA_MISMATCH_VALUE = 5; + /** + * + * + *
    +     * Cannot write to the Cloud Storage bucket because the bucket is not in the
    +     * same location as where Vertex AI models used in `message_transform`s are
    +     * deployed.
    +     * 
    + * + * VERTEX_AI_LOCATION_RESTRICTION = 6; + */ + public static final int VERTEX_AI_LOCATION_RESTRICTION_VALUE = 6; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -244,6 +291,8 @@ public static State forNumber(int value) { return IN_TRANSIT_LOCATION_RESTRICTION; case 5: return SCHEMA_MISMATCH; + case 6: + return VERTEX_AI_LOCATION_RESTRICTION; default: return null; } @@ -272,7 +321,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.pubsub.v1.CloudStorageConfig.getDescriptor().getEnumTypes().get(0); } @@ -301,6 +350,7 @@ public interface TextConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.CloudStorageConfig.TextConfig) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -312,31 +362,36 @@ public interface TextConfigOrBuilder * * Protobuf type {@code google.pubsub.v1.CloudStorageConfig.TextConfig} */ - public static final class TextConfig extends com.google.protobuf.GeneratedMessageV3 + public static final class TextConfig extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.CloudStorageConfig.TextConfig) TextConfigOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TextConfig"); + } + // Use TextConfig.newBuilder() to construct. - private TextConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private TextConfig(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private TextConfig() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextConfig(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_CloudStorageConfig_TextConfig_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_CloudStorageConfig_TextConfig_fieldAccessorTable @@ -437,38 +492,38 @@ public static com.google.pubsub.v1.CloudStorageConfig.TextConfig parseFrom( public static com.google.pubsub.v1.CloudStorageConfig.TextConfig parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.CloudStorageConfig.TextConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.CloudStorageConfig.TextConfig parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.CloudStorageConfig.TextConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.CloudStorageConfig.TextConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.CloudStorageConfig.TextConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -491,11 +546,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -507,8 +562,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.pubsub.v1.CloudStorageConfig.TextConfig} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.CloudStorageConfig.TextConfig) com.google.pubsub.v1.CloudStorageConfig.TextConfigOrBuilder { @@ -518,7 +572,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_CloudStorageConfig_TextConfig_fieldAccessorTable @@ -530,7 +584,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.CloudStorageConfig.TextConfig.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -568,41 +622,6 @@ public com.google.pubsub.v1.CloudStorageConfig.TextConfig buildPartial() { return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.CloudStorageConfig.TextConfig) { @@ -659,18 +678,6 @@ public Builder mergeFrom( return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.CloudStorageConfig.TextConfig) } @@ -760,6 +767,7 @@ public interface AvroConfigOrBuilder */ boolean getUseTopicSchema(); } + /** * * @@ -770,31 +778,36 @@ public interface AvroConfigOrBuilder * * Protobuf type {@code google.pubsub.v1.CloudStorageConfig.AvroConfig} */ - public static final class AvroConfig extends com.google.protobuf.GeneratedMessageV3 + public static final class AvroConfig extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.CloudStorageConfig.AvroConfig) AvroConfigOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AvroConfig"); + } + // Use AvroConfig.newBuilder() to construct. - private AvroConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AvroConfig(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AvroConfig() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AvroConfig(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_CloudStorageConfig_AvroConfig_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_CloudStorageConfig_AvroConfig_fieldAccessorTable @@ -805,6 +818,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int WRITE_METADATA_FIELD_NUMBER = 1; private boolean writeMetadata_ = false; + /** * * @@ -828,6 +842,7 @@ public boolean getWriteMetadata() { public static final int USE_TOPIC_SCHEMA_FIELD_NUMBER = 2; private boolean useTopicSchema_ = false; + /** * * @@ -955,38 +970,38 @@ public static com.google.pubsub.v1.CloudStorageConfig.AvroConfig parseFrom( public static com.google.pubsub.v1.CloudStorageConfig.AvroConfig parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.CloudStorageConfig.AvroConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.CloudStorageConfig.AvroConfig parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.CloudStorageConfig.AvroConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.CloudStorageConfig.AvroConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.CloudStorageConfig.AvroConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1009,11 +1024,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -1024,8 +1039,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.pubsub.v1.CloudStorageConfig.AvroConfig} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.CloudStorageConfig.AvroConfig) com.google.pubsub.v1.CloudStorageConfig.AvroConfigOrBuilder { @@ -1035,7 +1049,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_CloudStorageConfig_AvroConfig_fieldAccessorTable @@ -1047,7 +1061,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.CloudStorageConfig.AvroConfig.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1101,41 +1115,6 @@ private void buildPartial0(com.google.pubsub.v1.CloudStorageConfig.AvroConfig re } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.CloudStorageConfig.AvroConfig) { @@ -1213,6 +1192,7 @@ public Builder mergeFrom( private int bitField0_; private boolean writeMetadata_; + /** * * @@ -1233,6 +1213,7 @@ public Builder mergeFrom( public boolean getWriteMetadata() { return writeMetadata_; } + /** * * @@ -1257,6 +1238,7 @@ public Builder setWriteMetadata(boolean value) { onChanged(); return this; } + /** * * @@ -1281,6 +1263,7 @@ public Builder clearWriteMetadata() { } private boolean useTopicSchema_; + /** * * @@ -1297,6 +1280,7 @@ public Builder clearWriteMetadata() { public boolean getUseTopicSchema() { return useTopicSchema_; } + /** * * @@ -1317,6 +1301,7 @@ public Builder setUseTopicSchema(boolean value) { onChanged(); return this; } + /** * * @@ -1336,18 +1321,6 @@ public Builder clearUseTopicSchema() { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.CloudStorageConfig.AvroConfig) } @@ -1418,6 +1391,7 @@ public enum OutputFormatCase private OutputFormatCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -1454,6 +1428,7 @@ public OutputFormatCase getOutputFormatCase() { @SuppressWarnings("serial") private volatile java.lang.Object bucket_ = ""; + /** * * @@ -1480,6 +1455,7 @@ public java.lang.String getBucket() { return s; } } + /** * * @@ -1511,6 +1487,7 @@ public com.google.protobuf.ByteString getBucketBytes() { @SuppressWarnings("serial") private volatile java.lang.Object filenamePrefix_ = ""; + /** * * @@ -1535,6 +1512,7 @@ public java.lang.String getFilenamePrefix() { return s; } } + /** * * @@ -1564,6 +1542,7 @@ public com.google.protobuf.ByteString getFilenamePrefixBytes() { @SuppressWarnings("serial") private volatile java.lang.Object filenameSuffix_ = ""; + /** * * @@ -1589,6 +1568,7 @@ public java.lang.String getFilenameSuffix() { return s; } } + /** * * @@ -1619,6 +1599,7 @@ public com.google.protobuf.ByteString getFilenameSuffixBytes() { @SuppressWarnings("serial") private volatile java.lang.Object filenameDatetimeFormat_ = ""; + /** * * @@ -1644,6 +1625,7 @@ public java.lang.String getFilenameDatetimeFormat() { return s; } } + /** * * @@ -1671,6 +1653,7 @@ public com.google.protobuf.ByteString getFilenameDatetimeFormatBytes() { } public static final int TEXT_CONFIG_FIELD_NUMBER = 4; + /** * * @@ -1689,6 +1672,7 @@ public com.google.protobuf.ByteString getFilenameDatetimeFormatBytes() { public boolean hasTextConfig() { return outputFormatCase_ == 4; } + /** * * @@ -1710,6 +1694,7 @@ public com.google.pubsub.v1.CloudStorageConfig.TextConfig getTextConfig() { } return com.google.pubsub.v1.CloudStorageConfig.TextConfig.getDefaultInstance(); } + /** * * @@ -1731,6 +1716,7 @@ public com.google.pubsub.v1.CloudStorageConfig.TextConfigOrBuilder getTextConfig } public static final int AVRO_CONFIG_FIELD_NUMBER = 5; + /** * * @@ -1749,6 +1735,7 @@ public com.google.pubsub.v1.CloudStorageConfig.TextConfigOrBuilder getTextConfig public boolean hasAvroConfig() { return outputFormatCase_ == 5; } + /** * * @@ -1770,6 +1757,7 @@ public com.google.pubsub.v1.CloudStorageConfig.AvroConfig getAvroConfig() { } return com.google.pubsub.v1.CloudStorageConfig.AvroConfig.getDefaultInstance(); } + /** * * @@ -1792,13 +1780,14 @@ public com.google.pubsub.v1.CloudStorageConfig.AvroConfigOrBuilder getAvroConfig public static final int MAX_DURATION_FIELD_NUMBER = 6; private com.google.protobuf.Duration maxDuration_; + /** * * *
        * Optional. The maximum duration that can elapse before a new Cloud Storage
        * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -   * exceed the subscription's acknowledgement deadline.
    +   * exceed the subscription's acknowledgment deadline.
        * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -1810,13 +1799,14 @@ public com.google.pubsub.v1.CloudStorageConfig.AvroConfigOrBuilder getAvroConfig public boolean hasMaxDuration() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
        * Optional. The maximum duration that can elapse before a new Cloud Storage
        * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -   * exceed the subscription's acknowledgement deadline.
    +   * exceed the subscription's acknowledgment deadline.
        * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -1828,13 +1818,14 @@ public boolean hasMaxDuration() { public com.google.protobuf.Duration getMaxDuration() { return maxDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxDuration_; } + /** * * *
        * Optional. The maximum duration that can elapse before a new Cloud Storage
        * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -   * exceed the subscription's acknowledgement deadline.
    +   * exceed the subscription's acknowledgment deadline.
        * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -1847,6 +1838,7 @@ public com.google.protobuf.DurationOrBuilder getMaxDurationOrBuilder() { public static final int MAX_BYTES_FIELD_NUMBER = 7; private long maxBytes_ = 0L; + /** * * @@ -1867,6 +1859,7 @@ public long getMaxBytes() { public static final int MAX_MESSAGES_FIELD_NUMBER = 8; private long maxMessages_ = 0L; + /** * * @@ -1886,6 +1879,7 @@ public long getMaxMessages() { public static final int STATE_FIELD_NUMBER = 9; private int state_ = 0; + /** * * @@ -1904,6 +1898,7 @@ public long getMaxMessages() { public int getStateValue() { return state_; } + /** * * @@ -1929,6 +1924,7 @@ public com.google.pubsub.v1.CloudStorageConfig.State getState() { @SuppressWarnings("serial") private volatile java.lang.Object serviceAccountEmail_ = ""; + /** * * @@ -1957,6 +1953,7 @@ public java.lang.String getServiceAccountEmail() { return s; } } + /** * * @@ -2000,14 +1997,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucket_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bucket_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bucket_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, bucket_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filenamePrefix_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filenamePrefix_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filenamePrefix_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, filenamePrefix_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filenameSuffix_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filenameSuffix_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filenameSuffix_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, filenameSuffix_); } if (outputFormatCase_ == 4) { output.writeMessage(4, (com.google.pubsub.v1.CloudStorageConfig.TextConfig) outputFormat_); @@ -2027,11 +2024,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (state_ != com.google.pubsub.v1.CloudStorageConfig.State.STATE_UNSPECIFIED.getNumber()) { output.writeEnum(9, state_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filenameDatetimeFormat_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, filenameDatetimeFormat_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filenameDatetimeFormat_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, filenameDatetimeFormat_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, serviceAccountEmail_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccountEmail_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, serviceAccountEmail_); } getUnknownFields().writeTo(output); } @@ -2042,14 +2039,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucket_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, bucket_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bucket_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, bucket_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filenamePrefix_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filenamePrefix_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filenamePrefix_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filenamePrefix_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filenameSuffix_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filenameSuffix_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filenameSuffix_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, filenameSuffix_); } if (outputFormatCase_ == 4) { size += @@ -2073,11 +2070,11 @@ public int getSerializedSize() { if (state_ != com.google.pubsub.v1.CloudStorageConfig.State.STATE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filenameDatetimeFormat_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, filenameDatetimeFormat_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filenameDatetimeFormat_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, filenameDatetimeFormat_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, serviceAccountEmail_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccountEmail_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, serviceAccountEmail_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -2202,38 +2199,38 @@ public static com.google.pubsub.v1.CloudStorageConfig parseFrom( public static com.google.pubsub.v1.CloudStorageConfig parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.CloudStorageConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.CloudStorageConfig parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.CloudStorageConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.CloudStorageConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.CloudStorageConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2256,10 +2253,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -2269,7 +2267,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.CloudStorageConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.CloudStorageConfig) com.google.pubsub.v1.CloudStorageConfigOrBuilder { @@ -2279,7 +2277,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_CloudStorageConfig_fieldAccessorTable @@ -2293,14 +2291,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMaxDurationFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMaxDurationFieldBuilder(); } } @@ -2410,39 +2408,6 @@ private void buildPartialOneofs(com.google.pubsub.v1.CloudStorageConfig 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.pubsub.v1.CloudStorageConfig) { @@ -2554,19 +2519,22 @@ public Builder mergeFrom( } // case 26 case 34: { - input.readMessage(getTextConfigFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTextConfigFieldBuilder().getBuilder(), extensionRegistry); outputFormatCase_ = 4; break; } // case 34 case 42: { - input.readMessage(getAvroConfigFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetAvroConfigFieldBuilder().getBuilder(), extensionRegistry); outputFormatCase_ = 5; break; } // case 42 case 50: { - input.readMessage(getMaxDurationFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMaxDurationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 50 @@ -2634,6 +2602,7 @@ public Builder clearOutputFormat() { private int bitField0_; private java.lang.Object bucket_ = ""; + /** * * @@ -2659,6 +2628,7 @@ public java.lang.String getBucket() { return (java.lang.String) ref; } } + /** * * @@ -2684,6 +2654,7 @@ public com.google.protobuf.ByteString getBucketBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2708,6 +2679,7 @@ public Builder setBucket(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2728,6 +2700,7 @@ public Builder clearBucket() { onChanged(); return this; } + /** * * @@ -2755,6 +2728,7 @@ public Builder setBucketBytes(com.google.protobuf.ByteString value) { } private java.lang.Object filenamePrefix_ = ""; + /** * * @@ -2778,6 +2752,7 @@ public java.lang.String getFilenamePrefix() { return (java.lang.String) ref; } } + /** * * @@ -2801,6 +2776,7 @@ public com.google.protobuf.ByteString getFilenamePrefixBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2823,6 +2799,7 @@ public Builder setFilenamePrefix(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2841,6 +2818,7 @@ public Builder clearFilenamePrefix() { onChanged(); return this; } + /** * * @@ -2866,6 +2844,7 @@ public Builder setFilenamePrefixBytes(com.google.protobuf.ByteString value) { } private java.lang.Object filenameSuffix_ = ""; + /** * * @@ -2890,6 +2869,7 @@ public java.lang.String getFilenameSuffix() { return (java.lang.String) ref; } } + /** * * @@ -2914,6 +2894,7 @@ public com.google.protobuf.ByteString getFilenameSuffixBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2937,6 +2918,7 @@ public Builder setFilenameSuffix(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2956,6 +2938,7 @@ public Builder clearFilenameSuffix() { onChanged(); return this; } + /** * * @@ -2982,6 +2965,7 @@ public Builder setFilenameSuffixBytes(com.google.protobuf.ByteString value) { } private java.lang.Object filenameDatetimeFormat_ = ""; + /** * * @@ -3006,6 +2990,7 @@ public java.lang.String getFilenameDatetimeFormat() { return (java.lang.String) ref; } } + /** * * @@ -3030,6 +3015,7 @@ public com.google.protobuf.ByteString getFilenameDatetimeFormatBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3053,6 +3039,7 @@ public Builder setFilenameDatetimeFormat(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3072,6 +3059,7 @@ public Builder clearFilenameDatetimeFormat() { onChanged(); return this; } + /** * * @@ -3097,11 +3085,12 @@ public Builder setFilenameDatetimeFormatBytes(com.google.protobuf.ByteString val return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.CloudStorageConfig.TextConfig, com.google.pubsub.v1.CloudStorageConfig.TextConfig.Builder, com.google.pubsub.v1.CloudStorageConfig.TextConfigOrBuilder> textConfigBuilder_; + /** * * @@ -3120,6 +3109,7 @@ public Builder setFilenameDatetimeFormatBytes(com.google.protobuf.ByteString val public boolean hasTextConfig() { return outputFormatCase_ == 4; } + /** * * @@ -3148,6 +3138,7 @@ public com.google.pubsub.v1.CloudStorageConfig.TextConfig getTextConfig() { return com.google.pubsub.v1.CloudStorageConfig.TextConfig.getDefaultInstance(); } } + /** * * @@ -3173,6 +3164,7 @@ public Builder setTextConfig(com.google.pubsub.v1.CloudStorageConfig.TextConfig outputFormatCase_ = 4; return this; } + /** * * @@ -3196,6 +3188,7 @@ public Builder setTextConfig( outputFormatCase_ = 4; return this; } + /** * * @@ -3232,6 +3225,7 @@ public Builder mergeTextConfig(com.google.pubsub.v1.CloudStorageConfig.TextConfi outputFormatCase_ = 4; return this; } + /** * * @@ -3260,6 +3254,7 @@ public Builder clearTextConfig() { } return this; } + /** * * @@ -3273,8 +3268,9 @@ public Builder clearTextConfig() { * */ public com.google.pubsub.v1.CloudStorageConfig.TextConfig.Builder getTextConfigBuilder() { - return getTextConfigFieldBuilder().getBuilder(); + return internalGetTextConfigFieldBuilder().getBuilder(); } + /** * * @@ -3298,6 +3294,7 @@ public com.google.pubsub.v1.CloudStorageConfig.TextConfigOrBuilder getTextConfig return com.google.pubsub.v1.CloudStorageConfig.TextConfig.getDefaultInstance(); } } + /** * * @@ -3310,17 +3307,17 @@ public com.google.pubsub.v1.CloudStorageConfig.TextConfigOrBuilder getTextConfig * .google.pubsub.v1.CloudStorageConfig.TextConfig text_config = 4 [(.google.api.field_behavior) = OPTIONAL]; *
    */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.CloudStorageConfig.TextConfig, com.google.pubsub.v1.CloudStorageConfig.TextConfig.Builder, com.google.pubsub.v1.CloudStorageConfig.TextConfigOrBuilder> - getTextConfigFieldBuilder() { + internalGetTextConfigFieldBuilder() { if (textConfigBuilder_ == null) { if (!(outputFormatCase_ == 4)) { outputFormat_ = com.google.pubsub.v1.CloudStorageConfig.TextConfig.getDefaultInstance(); } textConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.CloudStorageConfig.TextConfig, com.google.pubsub.v1.CloudStorageConfig.TextConfig.Builder, com.google.pubsub.v1.CloudStorageConfig.TextConfigOrBuilder>( @@ -3334,11 +3331,12 @@ public com.google.pubsub.v1.CloudStorageConfig.TextConfigOrBuilder getTextConfig return textConfigBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.CloudStorageConfig.AvroConfig, com.google.pubsub.v1.CloudStorageConfig.AvroConfig.Builder, com.google.pubsub.v1.CloudStorageConfig.AvroConfigOrBuilder> avroConfigBuilder_; + /** * * @@ -3357,6 +3355,7 @@ public com.google.pubsub.v1.CloudStorageConfig.TextConfigOrBuilder getTextConfig public boolean hasAvroConfig() { return outputFormatCase_ == 5; } + /** * * @@ -3385,6 +3384,7 @@ public com.google.pubsub.v1.CloudStorageConfig.AvroConfig getAvroConfig() { return com.google.pubsub.v1.CloudStorageConfig.AvroConfig.getDefaultInstance(); } } + /** * * @@ -3410,6 +3410,7 @@ public Builder setAvroConfig(com.google.pubsub.v1.CloudStorageConfig.AvroConfig outputFormatCase_ = 5; return this; } + /** * * @@ -3433,6 +3434,7 @@ public Builder setAvroConfig( outputFormatCase_ = 5; return this; } + /** * * @@ -3469,6 +3471,7 @@ public Builder mergeAvroConfig(com.google.pubsub.v1.CloudStorageConfig.AvroConfi outputFormatCase_ = 5; return this; } + /** * * @@ -3497,6 +3500,7 @@ public Builder clearAvroConfig() { } return this; } + /** * * @@ -3510,8 +3514,9 @@ public Builder clearAvroConfig() { *
    */ public com.google.pubsub.v1.CloudStorageConfig.AvroConfig.Builder getAvroConfigBuilder() { - return getAvroConfigFieldBuilder().getBuilder(); + return internalGetAvroConfigFieldBuilder().getBuilder(); } + /** * * @@ -3535,6 +3540,7 @@ public com.google.pubsub.v1.CloudStorageConfig.AvroConfigOrBuilder getAvroConfig return com.google.pubsub.v1.CloudStorageConfig.AvroConfig.getDefaultInstance(); } } + /** * * @@ -3547,17 +3553,17 @@ public com.google.pubsub.v1.CloudStorageConfig.AvroConfigOrBuilder getAvroConfig * .google.pubsub.v1.CloudStorageConfig.AvroConfig avro_config = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.CloudStorageConfig.AvroConfig, com.google.pubsub.v1.CloudStorageConfig.AvroConfig.Builder, com.google.pubsub.v1.CloudStorageConfig.AvroConfigOrBuilder> - getAvroConfigFieldBuilder() { + internalGetAvroConfigFieldBuilder() { if (avroConfigBuilder_ == null) { if (!(outputFormatCase_ == 5)) { outputFormat_ = com.google.pubsub.v1.CloudStorageConfig.AvroConfig.getDefaultInstance(); } avroConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.CloudStorageConfig.AvroConfig, com.google.pubsub.v1.CloudStorageConfig.AvroConfig.Builder, com.google.pubsub.v1.CloudStorageConfig.AvroConfigOrBuilder>( @@ -3572,18 +3578,19 @@ public com.google.pubsub.v1.CloudStorageConfig.AvroConfigOrBuilder getAvroConfig } private com.google.protobuf.Duration maxDuration_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> maxDurationBuilder_; + /** * * *
          * Optional. The maximum duration that can elapse before a new Cloud Storage
          * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -     * exceed the subscription's acknowledgement deadline.
    +     * exceed the subscription's acknowledgment deadline.
          * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -3594,13 +3601,14 @@ public com.google.pubsub.v1.CloudStorageConfig.AvroConfigOrBuilder getAvroConfig public boolean hasMaxDuration() { return ((bitField0_ & 0x00000040) != 0); } + /** * * *
          * Optional. The maximum duration that can elapse before a new Cloud Storage
          * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -     * exceed the subscription's acknowledgement deadline.
    +     * exceed the subscription's acknowledgment deadline.
          * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -3617,13 +3625,14 @@ public com.google.protobuf.Duration getMaxDuration() { return maxDurationBuilder_.getMessage(); } } + /** * * *
          * Optional. The maximum duration that can elapse before a new Cloud Storage
          * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -     * exceed the subscription's acknowledgement deadline.
    +     * exceed the subscription's acknowledgment deadline.
          * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -3642,13 +3651,14 @@ public Builder setMaxDuration(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * *
          * Optional. The maximum duration that can elapse before a new Cloud Storage
          * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -     * exceed the subscription's acknowledgement deadline.
    +     * exceed the subscription's acknowledgment deadline.
          * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -3664,13 +3674,14 @@ public Builder setMaxDuration(com.google.protobuf.Duration.Builder builderForVal onChanged(); return this; } + /** * * *
          * Optional. The maximum duration that can elapse before a new Cloud Storage
          * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -     * exceed the subscription's acknowledgement deadline.
    +     * exceed the subscription's acknowledgment deadline.
          * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -3694,13 +3705,14 @@ public Builder mergeMaxDuration(com.google.protobuf.Duration value) { } return this; } + /** * * *
          * Optional. The maximum duration that can elapse before a new Cloud Storage
          * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -     * exceed the subscription's acknowledgement deadline.
    +     * exceed the subscription's acknowledgment deadline.
          * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -3716,13 +3728,14 @@ public Builder clearMaxDuration() { onChanged(); return this; } + /** * * *
          * Optional. The maximum duration that can elapse before a new Cloud Storage
          * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -     * exceed the subscription's acknowledgement deadline.
    +     * exceed the subscription's acknowledgment deadline.
          * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -3731,15 +3744,16 @@ public Builder clearMaxDuration() { public com.google.protobuf.Duration.Builder getMaxDurationBuilder() { bitField0_ |= 0x00000040; onChanged(); - return getMaxDurationFieldBuilder().getBuilder(); + return internalGetMaxDurationFieldBuilder().getBuilder(); } + /** * * *
          * Optional. The maximum duration that can elapse before a new Cloud Storage
          * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -     * exceed the subscription's acknowledgement deadline.
    +     * exceed the subscription's acknowledgment deadline.
          * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -3754,26 +3768,27 @@ public com.google.protobuf.DurationOrBuilder getMaxDurationOrBuilder() { : maxDuration_; } } + /** * * *
          * Optional. The maximum duration that can elapse before a new Cloud Storage
          * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -     * exceed the subscription's acknowledgement deadline.
    +     * exceed the subscription's acknowledgment deadline.
          * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getMaxDurationFieldBuilder() { + internalGetMaxDurationFieldBuilder() { if (maxDurationBuilder_ == null) { maxDurationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -3784,6 +3799,7 @@ public com.google.protobuf.DurationOrBuilder getMaxDurationOrBuilder() { } private long maxBytes_; + /** * * @@ -3801,6 +3817,7 @@ public com.google.protobuf.DurationOrBuilder getMaxDurationOrBuilder() { public long getMaxBytes() { return maxBytes_; } + /** * * @@ -3822,6 +3839,7 @@ public Builder setMaxBytes(long value) { onChanged(); return this; } + /** * * @@ -3843,6 +3861,7 @@ public Builder clearMaxBytes() { } private long maxMessages_; + /** * * @@ -3859,6 +3878,7 @@ public Builder clearMaxBytes() { public long getMaxMessages() { return maxMessages_; } + /** * * @@ -3879,6 +3899,7 @@ public Builder setMaxMessages(long value) { onChanged(); return this; } + /** * * @@ -3899,6 +3920,7 @@ public Builder clearMaxMessages() { } private int state_ = 0; + /** * * @@ -3917,6 +3939,7 @@ public Builder clearMaxMessages() { public int getStateValue() { return state_; } + /** * * @@ -3938,6 +3961,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -3958,6 +3982,7 @@ public com.google.pubsub.v1.CloudStorageConfig.State getState() { com.google.pubsub.v1.CloudStorageConfig.State.forNumber(state_); return result == null ? com.google.pubsub.v1.CloudStorageConfig.State.UNRECOGNIZED : result; } + /** * * @@ -3982,6 +4007,7 @@ public Builder setState(com.google.pubsub.v1.CloudStorageConfig.State value) { onChanged(); return this; } + /** * * @@ -4004,6 +4030,7 @@ public Builder clearState() { } private java.lang.Object serviceAccountEmail_ = ""; + /** * * @@ -4031,6 +4058,7 @@ public java.lang.String getServiceAccountEmail() { return (java.lang.String) ref; } } + /** * * @@ -4058,6 +4086,7 @@ public com.google.protobuf.ByteString getServiceAccountEmailBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4084,6 +4113,7 @@ public Builder setServiceAccountEmail(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4106,6 +4136,7 @@ public Builder clearServiceAccountEmail() { onChanged(); return this; } + /** * * @@ -4134,17 +4165,6 @@ public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.CloudStorageConfig) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfigOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfigOrBuilder.java index 71eeb90b4..2c2bc260b 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfigOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface CloudStorageConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.CloudStorageConfig) @@ -39,6 +41,7 @@ public interface CloudStorageConfigOrBuilder * @return The bucket. */ java.lang.String getBucket(); + /** * * @@ -68,6 +71,7 @@ public interface CloudStorageConfigOrBuilder * @return The filenamePrefix. */ java.lang.String getFilenamePrefix(); + /** * * @@ -96,6 +100,7 @@ public interface CloudStorageConfigOrBuilder * @return The filenameSuffix. */ java.lang.String getFilenameSuffix(); + /** * * @@ -125,6 +130,7 @@ public interface CloudStorageConfigOrBuilder * @return The filenameDatetimeFormat. */ java.lang.String getFilenameDatetimeFormat(); + /** * * @@ -155,6 +161,7 @@ public interface CloudStorageConfigOrBuilder * @return Whether the textConfig field is set. */ boolean hasTextConfig(); + /** * * @@ -170,6 +177,7 @@ public interface CloudStorageConfigOrBuilder * @return The textConfig. */ com.google.pubsub.v1.CloudStorageConfig.TextConfig getTextConfig(); + /** * * @@ -199,6 +207,7 @@ public interface CloudStorageConfigOrBuilder * @return Whether the avroConfig field is set. */ boolean hasAvroConfig(); + /** * * @@ -214,6 +223,7 @@ public interface CloudStorageConfigOrBuilder * @return The avroConfig. */ com.google.pubsub.v1.CloudStorageConfig.AvroConfig getAvroConfig(); + /** * * @@ -234,7 +244,7 @@ public interface CloudStorageConfigOrBuilder *
        * Optional. The maximum duration that can elapse before a new Cloud Storage
        * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -   * exceed the subscription's acknowledgement deadline.
    +   * exceed the subscription's acknowledgment deadline.
        * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -243,13 +253,14 @@ public interface CloudStorageConfigOrBuilder * @return Whether the maxDuration field is set. */ boolean hasMaxDuration(); + /** * * *
        * Optional. The maximum duration that can elapse before a new Cloud Storage
        * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -   * exceed the subscription's acknowledgement deadline.
    +   * exceed the subscription's acknowledgment deadline.
        * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -258,13 +269,14 @@ public interface CloudStorageConfigOrBuilder * @return The maxDuration. */ com.google.protobuf.Duration getMaxDuration(); + /** * * *
        * Optional. The maximum duration that can elapse before a new Cloud Storage
        * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
    -   * exceed the subscription's acknowledgement deadline.
    +   * exceed the subscription's acknowledgment deadline.
        * 
    * * .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -316,6 +328,7 @@ public interface CloudStorageConfigOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -349,6 +362,7 @@ public interface CloudStorageConfigOrBuilder * @return The serviceAccountEmail. */ java.lang.String getServiceAccountEmail(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CommitSchemaRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CommitSchemaRequest.java index d6c14b342..1f8cc26bc 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CommitSchemaRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CommitSchemaRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.CommitSchemaRequest} */ -public final class CommitSchemaRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CommitSchemaRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.CommitSchemaRequest) CommitSchemaRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CommitSchemaRequest"); + } + // Use CommitSchemaRequest.newBuilder() to construct. - private CommitSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CommitSchemaRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private CommitSchemaRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CommitSchemaRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_CommitSchemaRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_CommitSchemaRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -123,6 +132,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int SCHEMA_FIELD_NUMBER = 2; private com.google.pubsub.v1.Schema schema_; + /** * * @@ -138,6 +148,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasSchema() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -153,6 +164,7 @@ public boolean hasSchema() { public com.google.pubsub.v1.Schema getSchema() { return schema_ == null ? com.google.pubsub.v1.Schema.getDefaultInstance() : schema_; } + /** * * @@ -181,8 +193,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getSchema()); @@ -196,8 +208,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSchema()); @@ -281,38 +293,38 @@ public static com.google.pubsub.v1.CommitSchemaRequest parseFrom( public static com.google.pubsub.v1.CommitSchemaRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.CommitSchemaRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.CommitSchemaRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.CommitSchemaRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.CommitSchemaRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.CommitSchemaRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -335,10 +347,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -348,7 +361,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.CommitSchemaRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.CommitSchemaRequest) com.google.pubsub.v1.CommitSchemaRequestOrBuilder { @@ -358,7 +371,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_CommitSchemaRequest_fieldAccessorTable @@ -372,14 +385,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSchemaFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSchemaFieldBuilder(); } } @@ -440,39 +453,6 @@ private void buildPartial0(com.google.pubsub.v1.CommitSchemaRequest result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.CommitSchemaRequest) { @@ -527,7 +507,7 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getSchemaFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetSchemaFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -551,6 +531,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -576,6 +557,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -601,6 +583,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -625,6 +608,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -645,6 +629,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -672,11 +657,12 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private com.google.pubsub.v1.Schema schema_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder> schemaBuilder_; + /** * * @@ -691,6 +677,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasSchema() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -709,6 +696,7 @@ public com.google.pubsub.v1.Schema getSchema() { return schemaBuilder_.getMessage(); } } + /** * * @@ -731,6 +719,7 @@ public Builder setSchema(com.google.pubsub.v1.Schema value) { onChanged(); return this; } + /** * * @@ -750,6 +739,7 @@ public Builder setSchema(com.google.pubsub.v1.Schema.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -777,6 +767,7 @@ public Builder mergeSchema(com.google.pubsub.v1.Schema value) { } return this; } + /** * * @@ -796,6 +787,7 @@ public Builder clearSchema() { onChanged(); return this; } + /** * * @@ -808,8 +800,9 @@ public Builder clearSchema() { public com.google.pubsub.v1.Schema.Builder getSchemaBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getSchemaFieldBuilder().getBuilder(); + return internalGetSchemaFieldBuilder().getBuilder(); } + /** * * @@ -826,6 +819,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { return schema_ == null ? com.google.pubsub.v1.Schema.getDefaultInstance() : schema_; } } + /** * * @@ -835,14 +829,14 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { * * .google.pubsub.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder> - getSchemaFieldBuilder() { + internalGetSchemaFieldBuilder() { if (schemaBuilder_ == null) { schemaBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder>( @@ -852,17 +846,6 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { return schemaBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.CommitSchemaRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CommitSchemaRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CommitSchemaRequestOrBuilder.java index 99b6a5cd0..b904f9d0e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CommitSchemaRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CommitSchemaRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface CommitSchemaRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.CommitSchemaRequest) @@ -39,6 +41,7 @@ public interface CommitSchemaRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -67,6 +70,7 @@ public interface CommitSchemaRequestOrBuilder * @return Whether the schema field is set. */ boolean hasSchema(); + /** * * @@ -79,6 +83,7 @@ public interface CommitSchemaRequestOrBuilder * @return The schema. */ com.google.pubsub.v1.Schema getSchema(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSchemaRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSchemaRequest.java index 619234747..4db632921 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSchemaRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSchemaRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.CreateSchemaRequest} */ -public final class CreateSchemaRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateSchemaRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.CreateSchemaRequest) CreateSchemaRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateSchemaRequest"); + } + // Use CreateSchemaRequest.newBuilder() to construct. - private CreateSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateSchemaRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private CreateSchemaRequest() { schemaId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateSchemaRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_CreateSchemaRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_CreateSchemaRequest_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -95,6 +103,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -124,6 +133,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int SCHEMA_FIELD_NUMBER = 2; private com.google.pubsub.v1.Schema schema_; + /** * * @@ -143,6 +153,7 @@ public com.google.protobuf.ByteString getParentBytes() { public boolean hasSchema() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -162,6 +173,7 @@ public boolean hasSchema() { public com.google.pubsub.v1.Schema getSchema() { return schema_ == null ? com.google.pubsub.v1.Schema.getDefaultInstance() : schema_; } + /** * * @@ -184,6 +196,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object schemaId_ = ""; + /** * * @@ -211,6 +224,7 @@ public java.lang.String getSchemaId() { return s; } } + /** * * @@ -253,14 +267,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getSchema()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, schemaId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(schemaId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, schemaId_); } getUnknownFields().writeTo(output); } @@ -271,14 +285,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSchema()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, schemaId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(schemaId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, schemaId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -362,38 +376,38 @@ public static com.google.pubsub.v1.CreateSchemaRequest parseFrom( public static com.google.pubsub.v1.CreateSchemaRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.CreateSchemaRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.CreateSchemaRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.CreateSchemaRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.CreateSchemaRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.CreateSchemaRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -416,10 +430,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -429,7 +444,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.CreateSchemaRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.CreateSchemaRequest) com.google.pubsub.v1.CreateSchemaRequestOrBuilder { @@ -439,7 +454,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_CreateSchemaRequest_fieldAccessorTable @@ -453,14 +468,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSchemaFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSchemaFieldBuilder(); } } @@ -525,39 +540,6 @@ private void buildPartial0(com.google.pubsub.v1.CreateSchemaRequest result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.CreateSchemaRequest) { @@ -617,7 +599,7 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getSchemaFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetSchemaFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -647,6 +629,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -672,6 +655,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -697,6 +681,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -721,6 +706,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -741,6 +727,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -768,11 +755,12 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private com.google.pubsub.v1.Schema schema_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder> schemaBuilder_; + /** * * @@ -791,6 +779,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public boolean hasSchema() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -813,6 +802,7 @@ public com.google.pubsub.v1.Schema getSchema() { return schemaBuilder_.getMessage(); } } + /** * * @@ -839,6 +829,7 @@ public Builder setSchema(com.google.pubsub.v1.Schema value) { onChanged(); return this; } + /** * * @@ -862,6 +853,7 @@ public Builder setSchema(com.google.pubsub.v1.Schema.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -893,6 +885,7 @@ public Builder mergeSchema(com.google.pubsub.v1.Schema value) { } return this; } + /** * * @@ -916,6 +909,7 @@ public Builder clearSchema() { onChanged(); return this; } + /** * * @@ -932,8 +926,9 @@ public Builder clearSchema() { public com.google.pubsub.v1.Schema.Builder getSchemaBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getSchemaFieldBuilder().getBuilder(); + return internalGetSchemaFieldBuilder().getBuilder(); } + /** * * @@ -954,6 +949,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { return schema_ == null ? com.google.pubsub.v1.Schema.getDefaultInstance() : schema_; } } + /** * * @@ -967,14 +963,14 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { * * .google.pubsub.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder> - getSchemaFieldBuilder() { + internalGetSchemaFieldBuilder() { if (schemaBuilder_ == null) { schemaBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder>( @@ -985,6 +981,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { } private java.lang.Object schemaId_ = ""; + /** * * @@ -1011,6 +1008,7 @@ public java.lang.String getSchemaId() { return (java.lang.String) ref; } } + /** * * @@ -1037,6 +1035,7 @@ public com.google.protobuf.ByteString getSchemaIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1062,6 +1061,7 @@ public Builder setSchemaId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1083,6 +1083,7 @@ public Builder clearSchemaId() { onChanged(); return this; } + /** * * @@ -1110,17 +1111,6 @@ public Builder setSchemaIdBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.CreateSchemaRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSchemaRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSchemaRequestOrBuilder.java index 244ba5160..4fa65546b 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSchemaRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSchemaRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface CreateSchemaRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.CreateSchemaRequest) @@ -39,6 +41,7 @@ public interface CreateSchemaRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -71,6 +74,7 @@ public interface CreateSchemaRequestOrBuilder * @return Whether the schema field is set. */ boolean hasSchema(); + /** * * @@ -87,6 +91,7 @@ public interface CreateSchemaRequestOrBuilder * @return The schema. */ com.google.pubsub.v1.Schema getSchema(); + /** * * @@ -118,6 +123,7 @@ public interface CreateSchemaRequestOrBuilder * @return The schemaId. */ java.lang.String getSchemaId(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java index 71be3fe16..d911473d5 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.CreateSnapshotRequest} */ -public final class CreateSnapshotRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateSnapshotRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.CreateSnapshotRequest) CreateSnapshotRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateSnapshotRequest"); + } + // Use CreateSnapshotRequest.newBuilder() to construct. - private CreateSnapshotRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateSnapshotRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,12 +56,6 @@ private CreateSnapshotRequest() { subscription_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateSnapshotRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor; @@ -61,13 +68,15 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 3: return internalGetLabels(); + case 4: + return internalGetTags(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_CreateSnapshotRequest_fieldAccessorTable @@ -80,6 +89,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -110,6 +120,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -145,18 +156,19 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object subscription_ = ""; + /** * * *
        * Required. The subscription whose backlog the snapshot retains.
        * Specifically, the created snapshot is guaranteed to retain:
    -   *  (a) The existing backlog on the subscription. More precisely, this is
    -   *      defined as the messages in the subscription's backlog that are
    -   *      unacknowledged upon the successful completion of the
    -   *      `CreateSnapshot` request; as well as:
    -   *  (b) Any messages published to the subscription's topic following the
    -   *      successful completion of the CreateSnapshot request.
    +   * (a) The existing backlog on the subscription. More precisely, this is
    +   * defined as the messages in the subscription's backlog that are
    +   * unacknowledged upon the successful completion of the
    +   * `CreateSnapshot` request; as well as:
    +   * (b) Any messages published to the subscription's topic following the
    +   * successful completion of the CreateSnapshot request.
        * Format is `projects/{project}/subscriptions/{sub}`.
        * 
    * @@ -178,18 +190,19 @@ public java.lang.String getSubscription() { return s; } } + /** * * *
        * Required. The subscription whose backlog the snapshot retains.
        * Specifically, the created snapshot is guaranteed to retain:
    -   *  (a) The existing backlog on the subscription. More precisely, this is
    -   *      defined as the messages in the subscription's backlog that are
    -   *      unacknowledged upon the successful completion of the
    -   *      `CreateSnapshot` request; as well as:
    -   *  (b) Any messages published to the subscription's topic following the
    -   *      successful completion of the CreateSnapshot request.
    +   * (a) The existing backlog on the subscription. More precisely, this is
    +   * defined as the messages in the subscription's backlog that are
    +   * unacknowledged upon the successful completion of the
    +   * `CreateSnapshot` request; as well as:
    +   * (b) Any messages published to the subscription's topic following the
    +   * successful completion of the CreateSnapshot request.
        * Format is `projects/{project}/subscriptions/{sub}`.
        * 
    * @@ -238,6 +251,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -255,12 +269,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(); } + /** * * @@ -275,6 +291,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -296,6 +313,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -318,6 +336,141 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { return map.get(key); } + public static final int TAGS_FIELD_NUMBER = 4; + + private static final class TagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_CreateSnapshotRequest_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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 4 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 4 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 4 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 4 [(.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 @@ -332,14 +485,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, subscription_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 4); getUnknownFields().writeTo(output); } @@ -349,11 +504,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, subscription_); } for (java.util.Map.Entry entry : internalGetLabels().getMap().entrySet()) { @@ -365,6 +520,16 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__); } + 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(4, tags__); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -384,6 +549,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getSubscription().equals(other.getSubscription())) return false; if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetTags().equals(other.internalGetTags())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -403,6 +569,10 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } + if (!internalGetTags().getMap().isEmpty()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTags().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -445,38 +615,38 @@ public static com.google.pubsub.v1.CreateSnapshotRequest parseFrom( public static com.google.pubsub.v1.CreateSnapshotRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.CreateSnapshotRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.CreateSnapshotRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.CreateSnapshotRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.CreateSnapshotRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.CreateSnapshotRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -499,10 +669,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -512,7 +683,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.CreateSnapshotRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.CreateSnapshotRequest) com.google.pubsub.v1.CreateSnapshotRequestOrBuilder { @@ -527,6 +698,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 3: return internalGetLabels(); + case 4: + return internalGetTags(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -538,13 +711,15 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi switch (number) { case 3: return internalGetMutableLabels(); + case 4: + return internalGetMutableTags(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_CreateSnapshotRequest_fieldAccessorTable @@ -556,7 +731,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi // Construct using com.google.pubsub.v1.CreateSnapshotRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -567,6 +742,7 @@ public Builder clear() { name_ = ""; subscription_ = ""; internalGetMutableLabels().clear(); + internalGetMutableTags().clear(); return this; } @@ -613,39 +789,10 @@ private void buildPartial0(com.google.pubsub.v1.CreateSnapshotRequest result) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tags_ = internalGetTags(); + result.tags_.makeImmutable(); + } } @java.lang.Override @@ -672,6 +819,8 @@ public Builder mergeFrom(com.google.pubsub.v1.CreateSnapshotRequest other) { } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); bitField0_ |= 0x00000004; + internalGetMutableTags().mergeFrom(other.internalGetTags()); + bitField0_ |= 0x00000008; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -722,6 +871,15 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: + { + com.google.protobuf.MapEntry tags__ = + input.readMessage( + TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableTags().getMutableMap().put(tags__.getKey(), tags__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -742,6 +900,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -771,6 +930,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -800,6 +960,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -828,6 +989,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -852,6 +1014,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -883,18 +1046,19 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object subscription_ = ""; + /** * * *
          * Required. The subscription whose backlog the snapshot retains.
          * Specifically, the created snapshot is guaranteed to retain:
    -     *  (a) The existing backlog on the subscription. More precisely, this is
    -     *      defined as the messages in the subscription's backlog that are
    -     *      unacknowledged upon the successful completion of the
    -     *      `CreateSnapshot` request; as well as:
    -     *  (b) Any messages published to the subscription's topic following the
    -     *      successful completion of the CreateSnapshot request.
    +     * (a) The existing backlog on the subscription. More precisely, this is
    +     * defined as the messages in the subscription's backlog that are
    +     * unacknowledged upon the successful completion of the
    +     * `CreateSnapshot` request; as well as:
    +     * (b) Any messages published to the subscription's topic following the
    +     * successful completion of the CreateSnapshot request.
          * Format is `projects/{project}/subscriptions/{sub}`.
          * 
    * @@ -915,18 +1079,19 @@ public java.lang.String getSubscription() { return (java.lang.String) ref; } } + /** * * *
          * Required. The subscription whose backlog the snapshot retains.
          * Specifically, the created snapshot is guaranteed to retain:
    -     *  (a) The existing backlog on the subscription. More precisely, this is
    -     *      defined as the messages in the subscription's backlog that are
    -     *      unacknowledged upon the successful completion of the
    -     *      `CreateSnapshot` request; as well as:
    -     *  (b) Any messages published to the subscription's topic following the
    -     *      successful completion of the CreateSnapshot request.
    +     * (a) The existing backlog on the subscription. More precisely, this is
    +     * defined as the messages in the subscription's backlog that are
    +     * unacknowledged upon the successful completion of the
    +     * `CreateSnapshot` request; as well as:
    +     * (b) Any messages published to the subscription's topic following the
    +     * successful completion of the CreateSnapshot request.
          * Format is `projects/{project}/subscriptions/{sub}`.
          * 
    * @@ -947,18 +1112,19 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * *
          * Required. The subscription whose backlog the snapshot retains.
          * Specifically, the created snapshot is guaranteed to retain:
    -     *  (a) The existing backlog on the subscription. More precisely, this is
    -     *      defined as the messages in the subscription's backlog that are
    -     *      unacknowledged upon the successful completion of the
    -     *      `CreateSnapshot` request; as well as:
    -     *  (b) Any messages published to the subscription's topic following the
    -     *      successful completion of the CreateSnapshot request.
    +     * (a) The existing backlog on the subscription. More precisely, this is
    +     * defined as the messages in the subscription's backlog that are
    +     * unacknowledged upon the successful completion of the
    +     * `CreateSnapshot` request; as well as:
    +     * (b) Any messages published to the subscription's topic following the
    +     * successful completion of the CreateSnapshot request.
          * Format is `projects/{project}/subscriptions/{sub}`.
          * 
    * @@ -978,18 +1144,19 @@ public Builder setSubscription(java.lang.String value) { onChanged(); return this; } + /** * * *
          * Required. The subscription whose backlog the snapshot retains.
          * Specifically, the created snapshot is guaranteed to retain:
    -     *  (a) The existing backlog on the subscription. More precisely, this is
    -     *      defined as the messages in the subscription's backlog that are
    -     *      unacknowledged upon the successful completion of the
    -     *      `CreateSnapshot` request; as well as:
    -     *  (b) Any messages published to the subscription's topic following the
    -     *      successful completion of the CreateSnapshot request.
    +     * (a) The existing backlog on the subscription. More precisely, this is
    +     * defined as the messages in the subscription's backlog that are
    +     * unacknowledged upon the successful completion of the
    +     * `CreateSnapshot` request; as well as:
    +     * (b) Any messages published to the subscription's topic following the
    +     * successful completion of the CreateSnapshot request.
          * Format is `projects/{project}/subscriptions/{sub}`.
          * 
    * @@ -1005,18 +1172,19 @@ public Builder clearSubscription() { onChanged(); return this; } + /** * * *
          * Required. The subscription whose backlog the snapshot retains.
          * Specifically, the created snapshot is guaranteed to retain:
    -     *  (a) The existing backlog on the subscription. More precisely, this is
    -     *      defined as the messages in the subscription's backlog that are
    -     *      unacknowledged upon the successful completion of the
    -     *      `CreateSnapshot` request; as well as:
    -     *  (b) Any messages published to the subscription's topic following the
    -     *      successful completion of the CreateSnapshot request.
    +     * (a) The existing backlog on the subscription. More precisely, this is
    +     * defined as the messages in the subscription's backlog that are
    +     * unacknowledged upon the successful completion of the
    +     * `CreateSnapshot` request; as well as:
    +     * (b) Any messages published to the subscription's topic following the
    +     * successful completion of the CreateSnapshot request.
          * Format is `projects/{project}/subscriptions/{sub}`.
          * 
    * @@ -1063,6 +1231,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -1080,12 +1249,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(); } + /** * * @@ -1100,6 +1271,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -1121,6 +1293,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -1148,6 +1321,7 @@ public Builder clearLabels() { internalGetMutableLabels().getMutableMap().clear(); return this; } + /** * * @@ -1165,12 +1339,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_ |= 0x00000004; return internalGetMutableLabels().getMutableMap(); } + /** * * @@ -1192,6 +1368,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { bitField0_ |= 0x00000004; return this; } + /** * * @@ -1208,15 +1385,225 @@ public Builder putAllLabels(java.util.Map va 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_ |= 0x00000008; + 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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 4 [(.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 - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + @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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public java.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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 4 [(.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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 4 [(.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_ & ~0x00000008); + 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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 4 [(.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_ |= 0x00000008; + return internalGetMutableTags().getMutableMap(); + } + + /** + * + * + *
    +     * Optional. Input only. Immutable. Tag keys/values directly bound to this
    +     * resource. For example:
    +     * "123/environment": "production",
    +     * "123/costCenter": "marketing"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 4 [(.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_ |= 0x00000008; + return this; + } + + /** + * + * + *
    +     * Optional. Input only. Immutable. Tag keys/values directly bound to this
    +     * resource. For example:
    +     * "123/environment": "production",
    +     * "123/costCenter": "marketing"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 4 [(.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_ |= 0x00000008; + return this; } // @@protoc_insertion_point(builder_scope:google.pubsub.v1.CreateSnapshotRequest) diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java index 534be54bc..2105ed01c 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface CreateSnapshotRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.CreateSnapshotRequest) @@ -43,6 +45,7 @@ public interface CreateSnapshotRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -69,12 +72,12 @@ public interface CreateSnapshotRequestOrBuilder *
        * Required. The subscription whose backlog the snapshot retains.
        * Specifically, the created snapshot is guaranteed to retain:
    -   *  (a) The existing backlog on the subscription. More precisely, this is
    -   *      defined as the messages in the subscription's backlog that are
    -   *      unacknowledged upon the successful completion of the
    -   *      `CreateSnapshot` request; as well as:
    -   *  (b) Any messages published to the subscription's topic following the
    -   *      successful completion of the CreateSnapshot request.
    +   * (a) The existing backlog on the subscription. More precisely, this is
    +   * defined as the messages in the subscription's backlog that are
    +   * unacknowledged upon the successful completion of the
    +   * `CreateSnapshot` request; as well as:
    +   * (b) Any messages published to the subscription's topic following the
    +   * successful completion of the CreateSnapshot request.
        * Format is `projects/{project}/subscriptions/{sub}`.
        * 
    * @@ -85,18 +88,19 @@ public interface CreateSnapshotRequestOrBuilder * @return The subscription. */ java.lang.String getSubscription(); + /** * * *
        * Required. The subscription whose backlog the snapshot retains.
        * Specifically, the created snapshot is guaranteed to retain:
    -   *  (a) The existing backlog on the subscription. More precisely, this is
    -   *      defined as the messages in the subscription's backlog that are
    -   *      unacknowledged upon the successful completion of the
    -   *      `CreateSnapshot` request; as well as:
    -   *  (b) Any messages published to the subscription's topic following the
    -   *      successful completion of the CreateSnapshot request.
    +   * (a) The existing backlog on the subscription. More precisely, this is
    +   * defined as the messages in the subscription's backlog that are
    +   * unacknowledged upon the successful completion of the
    +   * `CreateSnapshot` request; as well as:
    +   * (b) Any messages published to the subscription's topic following the
    +   * successful completion of the CreateSnapshot request.
        * Format is `projects/{project}/subscriptions/{sub}`.
        * 
    * @@ -119,6 +123,7 @@ public interface CreateSnapshotRequestOrBuilder * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ int getLabelsCount(); + /** * * @@ -130,9 +135,11 @@ public interface CreateSnapshotRequestOrBuilder * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Deprecated java.util.Map getLabels(); + /** * * @@ -144,6 +151,7 @@ public interface CreateSnapshotRequestOrBuilder * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ java.util.Map getLabelsMap(); + /** * * @@ -159,6 +167,7 @@ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); + /** * * @@ -170,4 +179,102 @@ java.lang.String getLabelsOrDefault( * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
    +   * Optional. Input only. Immutable. Tag keys/values directly bound to this
    +   * resource. For example:
    +   * "123/environment": "production",
    +   * "123/costCenter": "marketing"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 4 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 4 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 4 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 4 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 4 [(.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-pubsub-v1/src/main/java/com/google/pubsub/v1/CryptoKeyName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CryptoKeyName.java new file mode 100644 index 000000000..c2b1411cb --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CryptoKeyName.java @@ -0,0 +1,261 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.pubsub.v1; + +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 CryptoKeyName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_KEY_RING_CRYPTO_KEY = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String keyRing; + private final String cryptoKey; + + @Deprecated + protected CryptoKeyName() { + project = null; + location = null; + keyRing = null; + cryptoKey = null; + } + + private CryptoKeyName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + keyRing = Preconditions.checkNotNull(builder.getKeyRing()); + cryptoKey = Preconditions.checkNotNull(builder.getCryptoKey()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getKeyRing() { + return keyRing; + } + + public String getCryptoKey() { + return cryptoKey; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CryptoKeyName of( + String project, String location, String keyRing, String cryptoKey) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setKeyRing(keyRing) + .setCryptoKey(cryptoKey) + .build(); + } + + public static String format(String project, String location, String keyRing, String cryptoKey) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setKeyRing(keyRing) + .setCryptoKey(cryptoKey) + .build() + .toString(); + } + + public static CryptoKeyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_KEY_RING_CRYPTO_KEY.validatedMatch( + formattedString, "CryptoKeyName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("key_ring"), + matchMap.get("crypto_key")); + } + + 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 (CryptoKeyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_KEY_RING_CRYPTO_KEY.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 (location != null) { + fieldMapBuilder.put("location", location); + } + if (keyRing != null) { + fieldMapBuilder.put("key_ring", keyRing); + } + if (cryptoKey != null) { + fieldMapBuilder.put("crypto_key", cryptoKey); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_KEY_RING_CRYPTO_KEY.instantiate( + "project", project, "location", location, "key_ring", keyRing, "crypto_key", cryptoKey); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + CryptoKeyName that = ((CryptoKeyName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.keyRing, that.keyRing) + && Objects.equals(this.cryptoKey, that.cryptoKey); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(keyRing); + h *= 1000003; + h ^= Objects.hashCode(cryptoKey); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. + */ + public static class Builder { + private String project; + private String location; + private String keyRing; + private String cryptoKey; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getKeyRing() { + return keyRing; + } + + public String getCryptoKey() { + return cryptoKey; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setKeyRing(String keyRing) { + this.keyRing = keyRing; + return this; + } + + public Builder setCryptoKey(String cryptoKey) { + this.cryptoKey = cryptoKey; + return this; + } + + private Builder(CryptoKeyName cryptoKeyName) { + this.project = cryptoKeyName.project; + this.location = cryptoKeyName.location; + this.keyRing = cryptoKeyName.keyRing; + this.cryptoKey = cryptoKeyName.cryptoKey; + } + + public CryptoKeyName build() { + return new CryptoKeyName(this); + } + } +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java index b96e7ace6..f6ba7bb82 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -32,13 +33,25 @@ * * Protobuf type {@code google.pubsub.v1.DeadLetterPolicy} */ -public final class DeadLetterPolicy extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeadLetterPolicy extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.DeadLetterPolicy) DeadLetterPolicyOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeadLetterPolicy"); + } + // Use DeadLetterPolicy.newBuilder() to construct. - private DeadLetterPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeadLetterPolicy(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +59,13 @@ private DeadLetterPolicy() { deadLetterTopic_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeadLetterPolicy(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DeadLetterPolicy_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DeadLetterPolicy_fieldAccessorTable @@ -71,6 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object deadLetterTopic_ = ""; + /** * * @@ -86,7 +94,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * since messages published to a topic with no subscriptions are lost. *
    * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The deadLetterTopic. */ @@ -102,6 +112,7 @@ public java.lang.String getDeadLetterTopic() { return s; } } + /** * * @@ -117,7 +128,9 @@ public java.lang.String getDeadLetterTopic() { * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for deadLetterTopic. */ @@ -136,6 +149,7 @@ public com.google.protobuf.ByteString getDeadLetterTopicBytes() { public static final int MAX_DELIVERY_ATTEMPTS_FIELD_NUMBER = 2; private int maxDeliveryAttempts_ = 0; + /** * * @@ -144,7 +158,7 @@ public com.google.protobuf.ByteString getDeadLetterTopicBytes() { * value must be between 5 and 100. * * The number of delivery attempts is defined as 1 + (the sum of number of - * NACKs and number of times the acknowledgement deadline has been exceeded + * NACKs and number of times the acknowledgment deadline has been exceeded * for the message). * * A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that @@ -178,8 +192,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deadLetterTopic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deadLetterTopic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deadLetterTopic_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, deadLetterTopic_); } if (maxDeliveryAttempts_ != 0) { output.writeInt32(2, maxDeliveryAttempts_); @@ -193,8 +207,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deadLetterTopic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, deadLetterTopic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deadLetterTopic_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, deadLetterTopic_); } if (maxDeliveryAttempts_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxDeliveryAttempts_); @@ -272,38 +286,38 @@ public static com.google.pubsub.v1.DeadLetterPolicy parseFrom( public static com.google.pubsub.v1.DeadLetterPolicy parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeadLetterPolicy parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DeadLetterPolicy parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeadLetterPolicy parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DeadLetterPolicy parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeadLetterPolicy parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -326,10 +340,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -343,7 +358,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.DeadLetterPolicy} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.DeadLetterPolicy) com.google.pubsub.v1.DeadLetterPolicyOrBuilder { @@ -353,7 +368,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DeadLetterPolicy_fieldAccessorTable @@ -365,7 +380,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.DeadLetterPolicy.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -419,39 +434,6 @@ private void buildPartial0(com.google.pubsub.v1.DeadLetterPolicy 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.pubsub.v1.DeadLetterPolicy) { @@ -530,6 +512,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object deadLetterTopic_ = ""; + /** * * @@ -545,7 +528,9 @@ public Builder mergeFrom( * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The deadLetterTopic. */ @@ -560,6 +545,7 @@ public java.lang.String getDeadLetterTopic() { return (java.lang.String) ref; } } + /** * * @@ -575,7 +561,9 @@ public java.lang.String getDeadLetterTopic() { * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for deadLetterTopic. */ @@ -590,6 +578,7 @@ public com.google.protobuf.ByteString getDeadLetterTopicBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -605,7 +594,9 @@ public com.google.protobuf.ByteString getDeadLetterTopicBytes() { * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The deadLetterTopic to set. * @return This builder for chaining. @@ -619,6 +610,7 @@ public Builder setDeadLetterTopic(java.lang.String value) { onChanged(); return this; } + /** * * @@ -634,7 +626,9 @@ public Builder setDeadLetterTopic(java.lang.String value) { * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -644,6 +638,7 @@ public Builder clearDeadLetterTopic() { onChanged(); return this; } + /** * * @@ -659,7 +654,9 @@ public Builder clearDeadLetterTopic() { * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for deadLetterTopic to set. * @return This builder for chaining. @@ -676,6 +673,7 @@ public Builder setDeadLetterTopicBytes(com.google.protobuf.ByteString value) { } private int maxDeliveryAttempts_; + /** * * @@ -684,7 +682,7 @@ public Builder setDeadLetterTopicBytes(com.google.protobuf.ByteString value) { * value must be between 5 and 100. * * The number of delivery attempts is defined as 1 + (the sum of number of - * NACKs and number of times the acknowledgement deadline has been exceeded + * NACKs and number of times the acknowledgment deadline has been exceeded * for the message). * * A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that @@ -703,6 +701,7 @@ public Builder setDeadLetterTopicBytes(com.google.protobuf.ByteString value) { public int getMaxDeliveryAttempts() { return maxDeliveryAttempts_; } + /** * * @@ -711,7 +710,7 @@ public int getMaxDeliveryAttempts() { * value must be between 5 and 100. * * The number of delivery attempts is defined as 1 + (the sum of number of - * NACKs and number of times the acknowledgement deadline has been exceeded + * NACKs and number of times the acknowledgment deadline has been exceeded * for the message). * * A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that @@ -734,6 +733,7 @@ public Builder setMaxDeliveryAttempts(int value) { onChanged(); return this; } + /** * * @@ -742,7 +742,7 @@ public Builder setMaxDeliveryAttempts(int value) { * value must be between 5 and 100. * * The number of delivery attempts is defined as 1 + (the sum of number of - * NACKs and number of times the acknowledgement deadline has been exceeded + * NACKs and number of times the acknowledgment deadline has been exceeded * for the message). * * A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that @@ -764,17 +764,6 @@ public Builder clearMaxDeliveryAttempts() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.DeadLetterPolicy) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicyOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicyOrBuilder.java index ed5509aab..9d8c29223 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicyOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicyOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface DeadLetterPolicyOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.DeadLetterPolicy) @@ -39,11 +41,14 @@ public interface DeadLetterPolicyOrBuilder * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The deadLetterTopic. */ java.lang.String getDeadLetterTopic(); + /** * * @@ -59,7 +64,9 @@ public interface DeadLetterPolicyOrBuilder * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for deadLetterTopic. */ @@ -73,7 +80,7 @@ public interface DeadLetterPolicyOrBuilder * value must be between 5 and 100. * * The number of delivery attempts is defined as 1 + (the sum of number of - * NACKs and number of times the acknowledgement deadline has been exceeded + * NACKs and number of times the acknowledgment deadline has been exceeded * for the message). * * A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRequest.java index f85adc58b..12f52ffd1 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.DeleteSchemaRequest} */ -public final class DeleteSchemaRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteSchemaRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.DeleteSchemaRequest) DeleteSchemaRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteSchemaRequest"); + } + // Use DeleteSchemaRequest.newBuilder() to construct. - private DeleteSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteSchemaRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private DeleteSchemaRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteSchemaRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_DeleteSchemaRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_DeleteSchemaRequest_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -134,8 +143,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } getUnknownFields().writeTo(output); } @@ -146,8 +155,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -220,38 +229,38 @@ public static com.google.pubsub.v1.DeleteSchemaRequest parseFrom( public static com.google.pubsub.v1.DeleteSchemaRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteSchemaRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DeleteSchemaRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteSchemaRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DeleteSchemaRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteSchemaRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -274,10 +283,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -287,7 +297,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.DeleteSchemaRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.DeleteSchemaRequest) com.google.pubsub.v1.DeleteSchemaRequestOrBuilder { @@ -297,7 +307,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_DeleteSchemaRequest_fieldAccessorTable @@ -309,7 +319,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.DeleteSchemaRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -359,39 +369,6 @@ private void buildPartial0(com.google.pubsub.v1.DeleteSchemaRequest 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.pubsub.v1.DeleteSchemaRequest) { @@ -461,6 +438,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -486,6 +464,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -511,6 +490,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -535,6 +515,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -555,6 +536,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -581,17 +563,6 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.DeleteSchemaRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRequestOrBuilder.java index 513d1cc69..0d665ae9d 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface DeleteSchemaRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.DeleteSchemaRequest) @@ -39,6 +41,7 @@ public interface DeleteSchemaRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequest.java index d8a7dc832..5065b30b9 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.DeleteSchemaRevisionRequest} */ -public final class DeleteSchemaRevisionRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteSchemaRevisionRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.DeleteSchemaRevisionRequest) DeleteSchemaRevisionRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteSchemaRevisionRequest"); + } + // Use DeleteSchemaRevisionRequest.newBuilder() to construct. - private DeleteSchemaRevisionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteSchemaRevisionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private DeleteSchemaRevisionRequest() { revisionId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteSchemaRevisionRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_DeleteSchemaRevisionRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_DeleteSchemaRevisionRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -96,6 +104,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -129,6 +138,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object revisionId_ = ""; + /** * * @@ -142,7 +152,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @return The revisionId. */ @java.lang.Override @@ -158,6 +168,7 @@ public java.lang.String getRevisionId() { return s; } } + /** * * @@ -171,7 +182,7 @@ public java.lang.String getRevisionId() { * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @return The bytes for revisionId. */ @java.lang.Override @@ -202,11 +213,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, revisionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(revisionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, revisionId_); } getUnknownFields().writeTo(output); } @@ -217,11 +228,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, revisionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(revisionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, revisionId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -298,38 +309,38 @@ public static com.google.pubsub.v1.DeleteSchemaRevisionRequest parseFrom( public static com.google.pubsub.v1.DeleteSchemaRevisionRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteSchemaRevisionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DeleteSchemaRevisionRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteSchemaRevisionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DeleteSchemaRevisionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteSchemaRevisionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -352,10 +363,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -365,7 +377,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.DeleteSchemaRevisionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.DeleteSchemaRevisionRequest) com.google.pubsub.v1.DeleteSchemaRevisionRequestOrBuilder { @@ -375,7 +387,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_DeleteSchemaRevisionRequest_fieldAccessorTable @@ -387,7 +399,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.DeleteSchemaRevisionRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -441,39 +453,6 @@ private void buildPartial0(com.google.pubsub.v1.DeleteSchemaRevisionRequest resu } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.DeleteSchemaRevisionRequest) { @@ -555,6 +534,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -582,6 +562,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -609,6 +590,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -635,6 +617,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -657,6 +640,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -686,6 +670,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object revisionId_ = ""; + /** * * @@ -699,7 +684,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @return The revisionId. */ @java.lang.Deprecated @@ -714,6 +699,7 @@ public java.lang.String getRevisionId() { return (java.lang.String) ref; } } + /** * * @@ -727,7 +713,7 @@ public java.lang.String getRevisionId() { * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @return The bytes for revisionId. */ @java.lang.Deprecated @@ -742,6 +728,7 @@ public com.google.protobuf.ByteString getRevisionIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -755,7 +742,7 @@ public com.google.protobuf.ByteString getRevisionIdBytes() { * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @param value The revisionId to set. * @return This builder for chaining. */ @@ -769,6 +756,7 @@ public Builder setRevisionId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -782,7 +770,7 @@ public Builder setRevisionId(java.lang.String value) { * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @return This builder for chaining. */ @java.lang.Deprecated @@ -792,6 +780,7 @@ public Builder clearRevisionId() { onChanged(); return this; } + /** * * @@ -805,7 +794,7 @@ public Builder clearRevisionId() { * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @param value The bytes for revisionId to set. * @return This builder for chaining. */ @@ -821,17 +810,6 @@ public Builder setRevisionIdBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.DeleteSchemaRevisionRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequestOrBuilder.java index 1a7006cc6..a116ea05e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface DeleteSchemaRevisionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.DeleteSchemaRevisionRequest) @@ -41,6 +43,7 @@ public interface DeleteSchemaRevisionRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -72,11 +75,12 @@ public interface DeleteSchemaRevisionRequestOrBuilder * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @return The revisionId. */ @java.lang.Deprecated java.lang.String getRevisionId(); + /** * * @@ -90,7 +94,7 @@ public interface DeleteSchemaRevisionRequestOrBuilder * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @return The bytes for revisionId. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java index d69f8530d..4fd129540 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.DeleteSnapshotRequest} */ -public final class DeleteSnapshotRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteSnapshotRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.DeleteSnapshotRequest) DeleteSnapshotRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteSnapshotRequest"); + } + // Use DeleteSnapshotRequest.newBuilder() to construct. - private DeleteSnapshotRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteSnapshotRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private DeleteSnapshotRequest() { snapshot_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteSnapshotRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DeleteSnapshotRequest_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object snapshot_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getSnapshot() { return s; } } + /** * * @@ -134,8 +143,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, snapshot_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snapshot_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, snapshot_); } getUnknownFields().writeTo(output); } @@ -146,8 +155,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, snapshot_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snapshot_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, snapshot_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -221,38 +230,38 @@ public static com.google.pubsub.v1.DeleteSnapshotRequest parseFrom( public static com.google.pubsub.v1.DeleteSnapshotRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteSnapshotRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DeleteSnapshotRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteSnapshotRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DeleteSnapshotRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteSnapshotRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -275,10 +284,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -288,7 +298,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.DeleteSnapshotRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.DeleteSnapshotRequest) com.google.pubsub.v1.DeleteSnapshotRequestOrBuilder { @@ -298,7 +308,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DeleteSnapshotRequest_fieldAccessorTable @@ -310,7 +320,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.DeleteSnapshotRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -360,39 +370,6 @@ private void buildPartial0(com.google.pubsub.v1.DeleteSnapshotRequest 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.pubsub.v1.DeleteSnapshotRequest) { @@ -462,6 +439,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object snapshot_ = ""; + /** * * @@ -487,6 +465,7 @@ public java.lang.String getSnapshot() { return (java.lang.String) ref; } } + /** * * @@ -512,6 +491,7 @@ public com.google.protobuf.ByteString getSnapshotBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -536,6 +516,7 @@ public Builder setSnapshot(java.lang.String value) { onChanged(); return this; } + /** * * @@ -556,6 +537,7 @@ public Builder clearSnapshot() { onChanged(); return this; } + /** * * @@ -582,17 +564,6 @@ public Builder setSnapshotBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.DeleteSnapshotRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequestOrBuilder.java index ecaa5ecc7..aa0db9d68 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSnapshotRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface DeleteSnapshotRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.DeleteSnapshotRequest) @@ -39,6 +41,7 @@ public interface DeleteSnapshotRequestOrBuilder * @return The snapshot. */ java.lang.String getSnapshot(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java index 6726b4fc3..0b55f9447 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.DeleteSubscriptionRequest} */ -public final class DeleteSubscriptionRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteSubscriptionRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.DeleteSubscriptionRequest) DeleteSubscriptionRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteSubscriptionRequest"); + } + // Use DeleteSubscriptionRequest.newBuilder() to construct. - private DeleteSubscriptionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteSubscriptionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private DeleteSubscriptionRequest() { subscription_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteSubscriptionRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DeleteSubscriptionRequest_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object subscription_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getSubscription() { return s; } } + /** * * @@ -134,8 +143,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); } getUnknownFields().writeTo(output); } @@ -146,8 +155,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -221,38 +230,38 @@ public static com.google.pubsub.v1.DeleteSubscriptionRequest parseFrom( public static com.google.pubsub.v1.DeleteSubscriptionRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteSubscriptionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DeleteSubscriptionRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteSubscriptionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DeleteSubscriptionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteSubscriptionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -275,10 +284,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -288,7 +298,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.DeleteSubscriptionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.DeleteSubscriptionRequest) com.google.pubsub.v1.DeleteSubscriptionRequestOrBuilder { @@ -298,7 +308,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DeleteSubscriptionRequest_fieldAccessorTable @@ -310,7 +320,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.DeleteSubscriptionRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -360,39 +370,6 @@ private void buildPartial0(com.google.pubsub.v1.DeleteSubscriptionRequest 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.pubsub.v1.DeleteSubscriptionRequest) { @@ -462,6 +439,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object subscription_ = ""; + /** * * @@ -487,6 +465,7 @@ public java.lang.String getSubscription() { return (java.lang.String) ref; } } + /** * * @@ -512,6 +491,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -536,6 +516,7 @@ public Builder setSubscription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -556,6 +537,7 @@ public Builder clearSubscription() { onChanged(); return this; } + /** * * @@ -582,17 +564,6 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.DeleteSubscriptionRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequestOrBuilder.java index e97be3071..407ff8133 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface DeleteSubscriptionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.DeleteSubscriptionRequest) @@ -39,6 +41,7 @@ public interface DeleteSubscriptionRequestOrBuilder * @return The subscription. */ java.lang.String getSubscription(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java index cd5232d4e..2d2b37801 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.DeleteTopicRequest} */ -public final class DeleteTopicRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteTopicRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.DeleteTopicRequest) DeleteTopicRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteTopicRequest"); + } + // Use DeleteTopicRequest.newBuilder() to construct. - private DeleteTopicRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteTopicRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private DeleteTopicRequest() { topic_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteTopicRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DeleteTopicRequest_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object topic_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getTopic() { return s; } } + /** * * @@ -134,8 +143,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, topic_); } getUnknownFields().writeTo(output); } @@ -146,8 +155,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, topic_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -220,38 +229,38 @@ public static com.google.pubsub.v1.DeleteTopicRequest parseFrom( public static com.google.pubsub.v1.DeleteTopicRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteTopicRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DeleteTopicRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteTopicRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DeleteTopicRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DeleteTopicRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -274,10 +283,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -287,7 +297,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.DeleteTopicRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.DeleteTopicRequest) com.google.pubsub.v1.DeleteTopicRequestOrBuilder { @@ -297,7 +307,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DeleteTopicRequest_fieldAccessorTable @@ -309,7 +319,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.DeleteTopicRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -359,39 +369,6 @@ private void buildPartial0(com.google.pubsub.v1.DeleteTopicRequest 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.pubsub.v1.DeleteTopicRequest) { @@ -461,6 +438,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object topic_ = ""; + /** * * @@ -486,6 +464,7 @@ public java.lang.String getTopic() { return (java.lang.String) ref; } } + /** * * @@ -511,6 +490,7 @@ public com.google.protobuf.ByteString getTopicBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -535,6 +515,7 @@ public Builder setTopic(java.lang.String value) { onChanged(); return this; } + /** * * @@ -555,6 +536,7 @@ public Builder clearTopic() { onChanged(); return this; } + /** * * @@ -581,17 +563,6 @@ public Builder setTopicBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.DeleteTopicRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequestOrBuilder.java index 2900017e2..ba2de1ac4 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteTopicRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface DeleteTopicRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.DeleteTopicRequest) @@ -39,6 +41,7 @@ public interface DeleteTopicRequestOrBuilder * @return The topic. */ java.lang.String getTopic(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java index bfb983560..074171a8e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.DetachSubscriptionRequest} */ -public final class DetachSubscriptionRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DetachSubscriptionRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.DetachSubscriptionRequest) DetachSubscriptionRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DetachSubscriptionRequest"); + } + // Use DetachSubscriptionRequest.newBuilder() to construct. - private DetachSubscriptionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DetachSubscriptionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private DetachSubscriptionRequest() { subscription_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DetachSubscriptionRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DetachSubscriptionRequest_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object subscription_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getSubscription() { return s; } } + /** * * @@ -134,8 +143,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); } getUnknownFields().writeTo(output); } @@ -146,8 +155,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -221,38 +230,38 @@ public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom( public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DetachSubscriptionRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.DetachSubscriptionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DetachSubscriptionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -275,10 +284,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -288,7 +298,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.DetachSubscriptionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.DetachSubscriptionRequest) com.google.pubsub.v1.DetachSubscriptionRequestOrBuilder { @@ -298,7 +308,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DetachSubscriptionRequest_fieldAccessorTable @@ -310,7 +320,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.DetachSubscriptionRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -360,39 +370,6 @@ private void buildPartial0(com.google.pubsub.v1.DetachSubscriptionRequest 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.pubsub.v1.DetachSubscriptionRequest) { @@ -462,6 +439,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object subscription_ = ""; + /** * * @@ -487,6 +465,7 @@ public java.lang.String getSubscription() { return (java.lang.String) ref; } } + /** * * @@ -512,6 +491,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -536,6 +516,7 @@ public Builder setSubscription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -556,6 +537,7 @@ public Builder clearSubscription() { onChanged(); return this; } + /** * * @@ -582,17 +564,6 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.DetachSubscriptionRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequestOrBuilder.java index fb7690b35..2980352a4 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface DetachSubscriptionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.DetachSubscriptionRequest) @@ -39,6 +41,7 @@ public interface DetachSubscriptionRequestOrBuilder * @return The subscription. */ java.lang.String getSubscription(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponse.java index 69c19fac1..6cc5449ec 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.pubsub.v1.DetachSubscriptionResponse} */ -public final class DetachSubscriptionResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DetachSubscriptionResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.DetachSubscriptionResponse) DetachSubscriptionResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DetachSubscriptionResponse"); + } + // Use DetachSubscriptionResponse.newBuilder() to construct. - private DetachSubscriptionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DetachSubscriptionResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private DetachSubscriptionResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DetachSubscriptionResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DetachSubscriptionResponse_fieldAccessorTable @@ -154,38 +161,38 @@ public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom( public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DetachSubscriptionResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.DetachSubscriptionResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.DetachSubscriptionResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -208,10 +215,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -222,7 +230,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.DetachSubscriptionResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.DetachSubscriptionResponse) com.google.pubsub.v1.DetachSubscriptionResponseOrBuilder { @@ -232,7 +240,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_DetachSubscriptionResponse_fieldAccessorTable @@ -244,7 +252,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.DetachSubscriptionResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -282,39 +290,6 @@ public com.google.pubsub.v1.DetachSubscriptionResponse buildPartial() { return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.DetachSubscriptionResponse) { @@ -371,17 +346,6 @@ public Builder mergeFrom( return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.DetachSubscriptionResponse) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponseOrBuilder.java index 136f6e620..52e34716c 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DetachSubscriptionResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface DetachSubscriptionResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.DetachSubscriptionResponse) diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Encoding.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Encoding.java index baf416761..3c03c8a9e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Encoding.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Encoding.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,6 +29,7 @@ * * Protobuf enum {@code google.pubsub.v1.Encoding} */ +@com.google.protobuf.Generated public enum Encoding implements com.google.protobuf.ProtocolMessageEnum { /** * @@ -63,6 +65,16 @@ public enum Encoding implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Encoding"); + } + /** * * @@ -73,6 +85,7 @@ public enum Encoding implements com.google.protobuf.ProtocolMessageEnum { * ENCODING_UNSPECIFIED = 0; */ public static final int ENCODING_UNSPECIFIED_VALUE = 0; + /** * * @@ -83,6 +96,7 @@ public enum Encoding implements com.google.protobuf.ProtocolMessageEnum { * JSON = 1; */ public static final int JSON_VALUE = 1; + /** * * @@ -153,7 +167,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto.getDescriptor().getEnumTypes().get(1); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ExpirationPolicy.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ExpirationPolicy.java index 17c3e0753..ef25fb02c 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ExpirationPolicy.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ExpirationPolicy.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.pubsub.v1.ExpirationPolicy} */ -public final class ExpirationPolicy extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ExpirationPolicy extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ExpirationPolicy) ExpirationPolicyOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExpirationPolicy"); + } + // Use ExpirationPolicy.newBuilder() to construct. - private ExpirationPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ExpirationPolicy(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ExpirationPolicy() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExpirationPolicy(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ExpirationPolicy_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ExpirationPolicy_fieldAccessorTable @@ -65,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int TTL_FIELD_NUMBER = 1; private com.google.protobuf.Duration ttl_; + /** * * @@ -85,6 +93,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasTtl() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -105,6 +114,7 @@ public boolean hasTtl() { public com.google.protobuf.Duration getTtl() { return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; } + /** * * @@ -228,38 +238,38 @@ public static com.google.pubsub.v1.ExpirationPolicy parseFrom( public static com.google.pubsub.v1.ExpirationPolicy parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ExpirationPolicy parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ExpirationPolicy parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ExpirationPolicy parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ExpirationPolicy parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ExpirationPolicy parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -282,10 +292,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -296,7 +307,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ExpirationPolicy} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ExpirationPolicy) com.google.pubsub.v1.ExpirationPolicyOrBuilder { @@ -306,7 +317,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ExpirationPolicy_fieldAccessorTable @@ -320,14 +331,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTtlFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTtlFieldBuilder(); } } @@ -384,39 +395,6 @@ private void buildPartial0(com.google.pubsub.v1.ExpirationPolicy result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.ExpirationPolicy) { @@ -460,7 +438,7 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getTtlFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetTtlFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -484,11 +462,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Duration ttl_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> ttlBuilder_; + /** * * @@ -508,6 +487,7 @@ public Builder mergeFrom( public boolean hasTtl() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -531,6 +511,7 @@ public com.google.protobuf.Duration getTtl() { return ttlBuilder_.getMessage(); } } + /** * * @@ -558,6 +539,7 @@ public Builder setTtl(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -582,6 +564,7 @@ public Builder setTtl(com.google.protobuf.Duration.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -614,6 +597,7 @@ public Builder mergeTtl(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -638,6 +622,7 @@ public Builder clearTtl() { onChanged(); return this; } + /** * * @@ -655,8 +640,9 @@ public Builder clearTtl() { public com.google.protobuf.Duration.Builder getTtlBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getTtlFieldBuilder().getBuilder(); + return internalGetTtlFieldBuilder().getBuilder(); } + /** * * @@ -678,6 +664,7 @@ public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; } } + /** * * @@ -692,14 +679,14 @@ public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { * * .google.protobuf.Duration ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getTtlFieldBuilder() { + internalGetTtlFieldBuilder() { if (ttlBuilder_ == null) { ttlBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(getTtl(), getParentForChildren(), isClean()); @@ -708,17 +695,6 @@ public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { return ttlBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ExpirationPolicy) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ExpirationPolicyOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ExpirationPolicyOrBuilder.java index 9a0d2e9d4..825d9c775 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ExpirationPolicyOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ExpirationPolicyOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ExpirationPolicyOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ExpirationPolicy) @@ -41,6 +43,7 @@ public interface ExpirationPolicyOrBuilder * @return Whether the ttl field is set. */ boolean hasTtl(); + /** * * @@ -58,6 +61,7 @@ public interface ExpirationPolicyOrBuilder * @return The ttl. */ com.google.protobuf.Duration getTtl(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSchemaRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSchemaRequest.java index 5a80fc97e..691454cd0 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSchemaRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSchemaRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.GetSchemaRequest} */ -public final class GetSchemaRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetSchemaRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.GetSchemaRequest) GetSchemaRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetSchemaRequest"); + } + // Use GetSchemaRequest.newBuilder() to construct. - private GetSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetSchemaRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private GetSchemaRequest() { view_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetSchemaRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_GetSchemaRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_GetSchemaRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -123,6 +132,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int VIEW_FIELD_NUMBER = 2; private int view_ = 0; + /** * * @@ -139,6 +149,7 @@ public com.google.protobuf.ByteString getNameBytes() { public int getViewValue() { return view_; } + /** * * @@ -171,8 +182,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (view_ != com.google.pubsub.v1.SchemaView.SCHEMA_VIEW_UNSPECIFIED.getNumber()) { output.writeEnum(2, view_); @@ -186,8 +197,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (view_ != com.google.pubsub.v1.SchemaView.SCHEMA_VIEW_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); @@ -265,38 +276,38 @@ public static com.google.pubsub.v1.GetSchemaRequest parseFrom( public static com.google.pubsub.v1.GetSchemaRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.GetSchemaRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.GetSchemaRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.GetSchemaRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.GetSchemaRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.GetSchemaRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -319,10 +330,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -332,7 +344,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.GetSchemaRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.GetSchemaRequest) com.google.pubsub.v1.GetSchemaRequestOrBuilder { @@ -342,7 +354,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_GetSchemaRequest_fieldAccessorTable @@ -354,7 +366,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.GetSchemaRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -408,39 +420,6 @@ private void buildPartial0(com.google.pubsub.v1.GetSchemaRequest 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.pubsub.v1.GetSchemaRequest) { @@ -519,6 +498,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -544,6 +524,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -569,6 +550,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -593,6 +575,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -613,6 +596,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -640,6 +624,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private int view_ = 0; + /** * * @@ -656,6 +641,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public int getViewValue() { return view_; } + /** * * @@ -675,6 +661,7 @@ public Builder setViewValue(int value) { onChanged(); return this; } + /** * * @@ -692,6 +679,7 @@ public com.google.pubsub.v1.SchemaView getView() { com.google.pubsub.v1.SchemaView result = com.google.pubsub.v1.SchemaView.forNumber(view_); return result == null ? com.google.pubsub.v1.SchemaView.UNRECOGNIZED : result; } + /** * * @@ -714,6 +702,7 @@ public Builder setView(com.google.pubsub.v1.SchemaView value) { onChanged(); return this; } + /** * * @@ -733,17 +722,6 @@ public Builder clearView() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.GetSchemaRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSchemaRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSchemaRequestOrBuilder.java index aca52209a..7f09aef11 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSchemaRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSchemaRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface GetSchemaRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.GetSchemaRequest) @@ -39,6 +41,7 @@ public interface GetSchemaRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -68,6 +71,7 @@ public interface GetSchemaRequestOrBuilder * @return The enum numeric value on the wire for view. */ int getViewValue(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java index dc0fb2a57..b8744fee0 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.GetSnapshotRequest} */ -public final class GetSnapshotRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetSnapshotRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.GetSnapshotRequest) GetSnapshotRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetSnapshotRequest"); + } + // Use GetSnapshotRequest.newBuilder() to construct. - private GetSnapshotRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetSnapshotRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private GetSnapshotRequest() { snapshot_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetSnapshotRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_GetSnapshotRequest_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object snapshot_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getSnapshot() { return s; } } + /** * * @@ -134,8 +143,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, snapshot_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snapshot_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, snapshot_); } getUnknownFields().writeTo(output); } @@ -146,8 +155,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, snapshot_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snapshot_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, snapshot_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -220,38 +229,38 @@ public static com.google.pubsub.v1.GetSnapshotRequest parseFrom( public static com.google.pubsub.v1.GetSnapshotRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.GetSnapshotRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.GetSnapshotRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.GetSnapshotRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.GetSnapshotRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.GetSnapshotRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -274,10 +283,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -287,7 +297,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.GetSnapshotRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.GetSnapshotRequest) com.google.pubsub.v1.GetSnapshotRequestOrBuilder { @@ -297,7 +307,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_GetSnapshotRequest_fieldAccessorTable @@ -309,7 +319,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.GetSnapshotRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -359,39 +369,6 @@ private void buildPartial0(com.google.pubsub.v1.GetSnapshotRequest 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.pubsub.v1.GetSnapshotRequest) { @@ -461,6 +438,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object snapshot_ = ""; + /** * * @@ -486,6 +464,7 @@ public java.lang.String getSnapshot() { return (java.lang.String) ref; } } + /** * * @@ -511,6 +490,7 @@ public com.google.protobuf.ByteString getSnapshotBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -535,6 +515,7 @@ public Builder setSnapshot(java.lang.String value) { onChanged(); return this; } + /** * * @@ -555,6 +536,7 @@ public Builder clearSnapshot() { onChanged(); return this; } + /** * * @@ -581,17 +563,6 @@ public Builder setSnapshotBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.GetSnapshotRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequestOrBuilder.java index 13775aea3..d818ff674 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSnapshotRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface GetSnapshotRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.GetSnapshotRequest) @@ -39,6 +41,7 @@ public interface GetSnapshotRequestOrBuilder * @return The snapshot. */ java.lang.String getSnapshot(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java index 8e40e7537..df1d38b06 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.GetSubscriptionRequest} */ -public final class GetSubscriptionRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetSubscriptionRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.GetSubscriptionRequest) GetSubscriptionRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetSubscriptionRequest"); + } + // Use GetSubscriptionRequest.newBuilder() to construct. - private GetSubscriptionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetSubscriptionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private GetSubscriptionRequest() { subscription_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetSubscriptionRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_GetSubscriptionRequest_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object subscription_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getSubscription() { return s; } } + /** * * @@ -134,8 +143,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); } getUnknownFields().writeTo(output); } @@ -146,8 +155,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -221,38 +230,38 @@ public static com.google.pubsub.v1.GetSubscriptionRequest parseFrom( public static com.google.pubsub.v1.GetSubscriptionRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.GetSubscriptionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.GetSubscriptionRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.GetSubscriptionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.GetSubscriptionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.GetSubscriptionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -275,10 +284,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -288,7 +298,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.GetSubscriptionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.GetSubscriptionRequest) com.google.pubsub.v1.GetSubscriptionRequestOrBuilder { @@ -298,7 +308,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_GetSubscriptionRequest_fieldAccessorTable @@ -310,7 +320,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.GetSubscriptionRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -360,39 +370,6 @@ private void buildPartial0(com.google.pubsub.v1.GetSubscriptionRequest 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.pubsub.v1.GetSubscriptionRequest) { @@ -462,6 +439,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object subscription_ = ""; + /** * * @@ -487,6 +465,7 @@ public java.lang.String getSubscription() { return (java.lang.String) ref; } } + /** * * @@ -512,6 +491,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -536,6 +516,7 @@ public Builder setSubscription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -556,6 +537,7 @@ public Builder clearSubscription() { onChanged(); return this; } + /** * * @@ -582,17 +564,6 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.GetSubscriptionRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequestOrBuilder.java index 0991d70f4..93a8ea4fa 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetSubscriptionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface GetSubscriptionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.GetSubscriptionRequest) @@ -39,6 +41,7 @@ public interface GetSubscriptionRequestOrBuilder * @return The subscription. */ java.lang.String getSubscription(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequest.java index 514c24e3f..215b1b7ce 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.GetTopicRequest} */ -public final class GetTopicRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetTopicRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.GetTopicRequest) GetTopicRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetTopicRequest"); + } + // Use GetTopicRequest.newBuilder() to construct. - private GetTopicRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetTopicRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private GetTopicRequest() { topic_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetTopicRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_GetTopicRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_GetTopicRequest_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object topic_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getTopic() { return s; } } + /** * * @@ -134,8 +143,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, topic_); } getUnknownFields().writeTo(output); } @@ -146,8 +155,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, topic_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -219,38 +228,38 @@ public static com.google.pubsub.v1.GetTopicRequest parseFrom( public static com.google.pubsub.v1.GetTopicRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.GetTopicRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.GetTopicRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.GetTopicRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.GetTopicRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.GetTopicRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -273,10 +282,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -286,7 +296,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.GetTopicRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.GetTopicRequest) com.google.pubsub.v1.GetTopicRequestOrBuilder { @@ -296,7 +306,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_GetTopicRequest_fieldAccessorTable @@ -308,7 +318,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.GetTopicRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -357,39 +367,6 @@ private void buildPartial0(com.google.pubsub.v1.GetTopicRequest 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.pubsub.v1.GetTopicRequest) { @@ -459,6 +436,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object topic_ = ""; + /** * * @@ -484,6 +462,7 @@ public java.lang.String getTopic() { return (java.lang.String) ref; } } + /** * * @@ -509,6 +488,7 @@ public com.google.protobuf.ByteString getTopicBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -533,6 +513,7 @@ public Builder setTopic(java.lang.String value) { onChanged(); return this; } + /** * * @@ -553,6 +534,7 @@ public Builder clearTopic() { onChanged(); return this; } + /** * * @@ -579,17 +561,6 @@ public Builder setTopicBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.GetTopicRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequestOrBuilder.java index 23d05e8cb..29713e8fc 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/GetTopicRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface GetTopicRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.GetTopicRequest) @@ -39,6 +41,7 @@ public interface GetTopicRequestOrBuilder * @return The topic. */ java.lang.String getTopic(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettings.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettings.java index 17e7384ee..2eb76d04b 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettings.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings} */ -public final class IngestionDataSourceSettings extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class IngestionDataSourceSettings extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings) IngestionDataSourceSettingsOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IngestionDataSourceSettings"); + } + // Use IngestionDataSourceSettings.newBuilder() to construct. - private IngestionDataSourceSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private IngestionDataSourceSettings(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private IngestionDataSourceSettings() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new IngestionDataSourceSettings(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_fieldAccessorTable @@ -81,6 +88,7 @@ public interface AwsKinesisOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -109,6 +117,7 @@ public interface AwsKinesisOrBuilder * @return The streamArn. */ java.lang.String getStreamArn(); + /** * * @@ -135,6 +144,7 @@ public interface AwsKinesisOrBuilder * @return The consumerArn. */ java.lang.String getConsumerArn(); + /** * * @@ -163,6 +173,7 @@ public interface AwsKinesisOrBuilder * @return The awsRoleArn. */ java.lang.String getAwsRoleArn(); + /** * * @@ -193,6 +204,7 @@ public interface AwsKinesisOrBuilder * @return The gcpServiceAccount. */ java.lang.String getGcpServiceAccount(); + /** * * @@ -209,6 +221,7 @@ public interface AwsKinesisOrBuilder */ com.google.protobuf.ByteString getGcpServiceAccountBytes(); } + /** * * @@ -218,13 +231,24 @@ public interface AwsKinesisOrBuilder * * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis} */ - public static final class AwsKinesis extends com.google.protobuf.GeneratedMessageV3 + public static final class AwsKinesis extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) AwsKinesisOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AwsKinesis"); + } + // Use AwsKinesis.newBuilder() to construct. - private AwsKinesis(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AwsKinesis(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -236,19 +260,13 @@ private AwsKinesis() { gcpServiceAccount_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AwsKinesis(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsKinesis_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsKinesis_fieldAccessorTable @@ -293,13 +311,13 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { *
            * Permission denied encountered while consuming data from Kinesis.
            * This can happen if:
    -       *   - The provided `aws_role_arn` does not exist or does not have the
    -       *     appropriate permissions attached.
    -       *   - The provided `aws_role_arn` is not set up properly for Identity
    -       *     Federation using `gcp_service_account`.
    -       *   - The Pub/Sub SA is not granted the
    -       *     `iam.serviceAccounts.getOpenIdToken` permission on
    -       *     `gcp_service_account`.
    +       * - The provided `aws_role_arn` does not exist or does not have the
    +       * appropriate permissions attached.
    +       * - The provided `aws_role_arn` is not set up properly for Identity
    +       * Federation using `gcp_service_account`.
    +       * - The Pub/Sub SA is not granted the
    +       * `iam.serviceAccounts.getOpenIdToken` permission on
    +       * `gcp_service_account`.
            * 
    * * KINESIS_PERMISSION_DENIED = 2; @@ -340,6 +358,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + /** * * @@ -350,6 +378,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -360,24 +389,26 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * ACTIVE = 1; */ public static final int ACTIVE_VALUE = 1; + /** * * *
            * Permission denied encountered while consuming data from Kinesis.
            * This can happen if:
    -       *   - The provided `aws_role_arn` does not exist or does not have the
    -       *     appropriate permissions attached.
    -       *   - The provided `aws_role_arn` is not set up properly for Identity
    -       *     Federation using `gcp_service_account`.
    -       *   - The Pub/Sub SA is not granted the
    -       *     `iam.serviceAccounts.getOpenIdToken` permission on
    -       *     `gcp_service_account`.
    +       * - The provided `aws_role_arn` does not exist or does not have the
    +       * appropriate permissions attached.
    +       * - The provided `aws_role_arn` is not set up properly for Identity
    +       * Federation using `gcp_service_account`.
    +       * - The Pub/Sub SA is not granted the
    +       * `iam.serviceAccounts.getOpenIdToken` permission on
    +       * `gcp_service_account`.
            * 
    * * KINESIS_PERMISSION_DENIED = 2; */ public static final int KINESIS_PERMISSION_DENIED_VALUE = 2; + /** * * @@ -390,6 +421,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * PUBLISH_PERMISSION_DENIED = 3; */ public static final int PUBLISH_PERMISSION_DENIED_VALUE = 3; + /** * * @@ -400,6 +432,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STREAM_NOT_FOUND = 4; */ public static final int STREAM_NOT_FOUND_VALUE = 4; + /** * * @@ -475,7 +508,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDescriptor() .getEnumTypes() .get(0); @@ -504,6 +537,7 @@ private State(int value) { public static final int STATE_FIELD_NUMBER = 1; private int state_ = 0; + /** * * @@ -522,6 +556,7 @@ private State(int value) { public int getStateValue() { return state_; } + /** * * @@ -549,6 +584,7 @@ public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State getStat @SuppressWarnings("serial") private volatile java.lang.Object streamArn_ = ""; + /** * * @@ -572,6 +608,7 @@ public java.lang.String getStreamArn() { return s; } } + /** * * @@ -600,6 +637,7 @@ public com.google.protobuf.ByteString getStreamArnBytes() { @SuppressWarnings("serial") private volatile java.lang.Object consumerArn_ = ""; + /** * * @@ -624,6 +662,7 @@ public java.lang.String getConsumerArn() { return s; } } + /** * * @@ -653,6 +692,7 @@ public com.google.protobuf.ByteString getConsumerArnBytes() { @SuppressWarnings("serial") private volatile java.lang.Object awsRoleArn_ = ""; + /** * * @@ -678,6 +718,7 @@ public java.lang.String getAwsRoleArn() { return s; } } + /** * * @@ -708,6 +749,7 @@ public com.google.protobuf.ByteString getAwsRoleArnBytes() { @SuppressWarnings("serial") private volatile java.lang.Object gcpServiceAccount_ = ""; + /** * * @@ -734,6 +776,7 @@ public java.lang.String getGcpServiceAccount() { return s; } } + /** * * @@ -780,17 +823,17 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, state_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(streamArn_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, streamArn_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(streamArn_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, streamArn_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consumerArn_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, consumerArn_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(consumerArn_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, consumerArn_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(awsRoleArn_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, awsRoleArn_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(awsRoleArn_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, awsRoleArn_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcpServiceAccount_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, gcpServiceAccount_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gcpServiceAccount_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, gcpServiceAccount_); } getUnknownFields().writeTo(output); } @@ -806,17 +849,17 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(streamArn_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, streamArn_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(streamArn_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, streamArn_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consumerArn_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, consumerArn_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(consumerArn_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, consumerArn_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(awsRoleArn_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, awsRoleArn_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(awsRoleArn_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, awsRoleArn_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcpServiceAccount_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, gcpServiceAccount_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gcpServiceAccount_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, gcpServiceAccount_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -902,38 +945,38 @@ public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseF public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -957,11 +1000,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -971,8 +1014,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisOrBuilder { @@ -982,7 +1024,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsKinesis_fieldAccessorTable @@ -994,7 +1036,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1062,41 +1104,6 @@ private void buildPartial0( } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) { @@ -1210,6 +1217,7 @@ public Builder mergeFrom( private int bitField0_; private int state_ = 0; + /** * * @@ -1228,6 +1236,7 @@ public Builder mergeFrom( public int getStateValue() { return state_; } + /** * * @@ -1249,6 +1258,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -1271,6 +1281,7 @@ public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State getStat ? com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State.UNRECOGNIZED : result; } + /** * * @@ -1296,6 +1307,7 @@ public Builder setState( onChanged(); return this; } + /** * * @@ -1318,6 +1330,7 @@ public Builder clearState() { } private java.lang.Object streamArn_ = ""; + /** * * @@ -1340,6 +1353,7 @@ public java.lang.String getStreamArn() { return (java.lang.String) ref; } } + /** * * @@ -1362,6 +1376,7 @@ public com.google.protobuf.ByteString getStreamArnBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1383,6 +1398,7 @@ public Builder setStreamArn(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1400,6 +1416,7 @@ public Builder clearStreamArn() { onChanged(); return this; } + /** * * @@ -1424,6 +1441,7 @@ public Builder setStreamArnBytes(com.google.protobuf.ByteString value) { } private java.lang.Object consumerArn_ = ""; + /** * * @@ -1447,6 +1465,7 @@ public java.lang.String getConsumerArn() { return (java.lang.String) ref; } } + /** * * @@ -1470,6 +1489,7 @@ public com.google.protobuf.ByteString getConsumerArnBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1492,6 +1512,7 @@ public Builder setConsumerArn(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1510,6 +1531,7 @@ public Builder clearConsumerArn() { onChanged(); return this; } + /** * * @@ -1535,6 +1557,7 @@ public Builder setConsumerArnBytes(com.google.protobuf.ByteString value) { } private java.lang.Object awsRoleArn_ = ""; + /** * * @@ -1559,6 +1582,7 @@ public java.lang.String getAwsRoleArn() { return (java.lang.String) ref; } } + /** * * @@ -1583,6 +1607,7 @@ public com.google.protobuf.ByteString getAwsRoleArnBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1606,6 +1631,7 @@ public Builder setAwsRoleArn(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1625,6 +1651,7 @@ public Builder clearAwsRoleArn() { onChanged(); return this; } + /** * * @@ -1651,6 +1678,7 @@ public Builder setAwsRoleArnBytes(com.google.protobuf.ByteString value) { } private java.lang.Object gcpServiceAccount_ = ""; + /** * * @@ -1676,6 +1704,7 @@ public java.lang.String getGcpServiceAccount() { return (java.lang.String) ref; } } + /** * * @@ -1701,6 +1730,7 @@ public com.google.protobuf.ByteString getGcpServiceAccountBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1725,6 +1755,7 @@ public Builder setGcpServiceAccount(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1745,6 +1776,7 @@ public Builder clearGcpServiceAccount() { onChanged(); return this; } + /** * * @@ -1771,18 +1803,6 @@ public Builder setGcpServiceAccountBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) } @@ -1856,6 +1876,7 @@ public interface CloudStorageOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -1886,6 +1907,7 @@ public interface CloudStorageOrBuilder * @return The bucket. */ java.lang.String getBucket(); + /** * * @@ -1915,6 +1937,7 @@ public interface CloudStorageOrBuilder * @return Whether the textFormat field is set. */ boolean hasTextFormat(); + /** * * @@ -1929,6 +1952,7 @@ public interface CloudStorageOrBuilder * @return The textFormat. */ com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat getTextFormat(); + /** * * @@ -1957,6 +1981,7 @@ public interface CloudStorageOrBuilder * @return Whether the avroFormat field is set. */ boolean hasAvroFormat(); + /** * * @@ -1971,6 +1996,7 @@ public interface CloudStorageOrBuilder * @return The avroFormat. */ com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat getAvroFormat(); + /** * * @@ -2001,6 +2027,7 @@ public interface CloudStorageOrBuilder * @return Whether the pubsubAvroFormat field is set. */ boolean hasPubsubAvroFormat(); + /** * * @@ -2018,6 +2045,7 @@ public interface CloudStorageOrBuilder */ com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat getPubsubAvroFormat(); + /** * * @@ -2049,6 +2077,7 @@ public interface CloudStorageOrBuilder * @return Whether the minimumObjectCreateTime field is set. */ boolean hasMinimumObjectCreateTime(); + /** * * @@ -2064,6 +2093,7 @@ public interface CloudStorageOrBuilder * @return The minimumObjectCreateTime. */ com.google.protobuf.Timestamp getMinimumObjectCreateTime(); + /** * * @@ -2092,6 +2122,7 @@ public interface CloudStorageOrBuilder * @return The matchGlob. */ java.lang.String getMatchGlob(); + /** * * @@ -2110,6 +2141,7 @@ public interface CloudStorageOrBuilder com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.InputFormatCase getInputFormatCase(); } + /** * * @@ -2119,13 +2151,24 @@ public interface CloudStorageOrBuilder * * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.CloudStorage} */ - public static final class CloudStorage extends com.google.protobuf.GeneratedMessageV3 + public static final class CloudStorage extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) CloudStorageOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CloudStorage"); + } + // Use CloudStorage.newBuilder() to construct. - private CloudStorage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CloudStorage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -2135,19 +2178,13 @@ private CloudStorage() { matchGlob_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CloudStorage(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_fieldAccessorTable @@ -2238,6 +2275,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + /** * * @@ -2248,6 +2295,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -2258,6 +2306,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * ACTIVE = 1; */ public static final int ACTIVE_VALUE = 1; + /** * * @@ -2274,6 +2323,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * CLOUD_STORAGE_PERMISSION_DENIED = 2; */ public static final int CLOUD_STORAGE_PERMISSION_DENIED_VALUE = 2; + /** * * @@ -2286,6 +2336,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * PUBLISH_PERMISSION_DENIED = 3; */ public static final int PUBLISH_PERMISSION_DENIED_VALUE = 3; + /** * * @@ -2296,6 +2347,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * BUCKET_NOT_FOUND = 4; */ public static final int BUCKET_NOT_FOUND_VALUE = 4; + /** * * @@ -2372,7 +2424,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDescriptor() .getEnumTypes() .get(0); @@ -2416,6 +2468,7 @@ public interface TextFormatOrBuilder * @return Whether the delimiter field is set. */ boolean hasDelimiter(); + /** * * @@ -2428,6 +2481,7 @@ public interface TextFormatOrBuilder * @return The delimiter. */ java.lang.String getDelimiter(); + /** * * @@ -2441,6 +2495,7 @@ public interface TextFormatOrBuilder */ com.google.protobuf.ByteString getDelimiterBytes(); } + /** * * @@ -2452,13 +2507,24 @@ public interface TextFormatOrBuilder * * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat} */ - public static final class TextFormat extends com.google.protobuf.GeneratedMessageV3 + public static final class TextFormat extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat) TextFormatOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TextFormat"); + } + // Use TextFormat.newBuilder() to construct. - private TextFormat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private TextFormat(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -2466,19 +2532,13 @@ private TextFormat() { delimiter_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextFormat(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_TextFormat_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_TextFormat_fieldAccessorTable @@ -2493,6 +2553,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object delimiter_ = ""; + /** * * @@ -2508,6 +2569,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasDelimiter() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2531,6 +2593,7 @@ public java.lang.String getDelimiter() { return s; } } + /** * * @@ -2570,7 +2633,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, delimiter_); + com.google.protobuf.GeneratedMessage.writeString(output, 1, delimiter_); } getUnknownFields().writeTo(output); } @@ -2582,7 +2645,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, delimiter_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, delimiter_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -2665,7 +2728,7 @@ public int hashCode() { public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat @@ -2673,13 +2736,13 @@ public int hashCode() { java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat @@ -2687,13 +2750,13 @@ public int hashCode() { java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat @@ -2701,7 +2764,7 @@ public int hashCode() { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2726,10 +2789,11 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -2742,7 +2806,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat) com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormatOrBuilder { @@ -2752,7 +2816,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_TextFormat_fieldAccessorTable @@ -2766,7 +2830,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2824,41 +2888,6 @@ private void buildPartial0( result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other @@ -2933,6 +2962,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object delimiter_ = ""; + /** * * @@ -2947,6 +2977,7 @@ public Builder mergeFrom( public boolean hasDelimiter() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2969,6 +3000,7 @@ public java.lang.String getDelimiter() { return (java.lang.String) ref; } } + /** * * @@ -2991,6 +3023,7 @@ public com.google.protobuf.ByteString getDelimiterBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3012,6 +3045,7 @@ public Builder setDelimiter(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3029,6 +3063,7 @@ public Builder clearDelimiter() { onChanged(); return this; } + /** * * @@ -3052,18 +3087,6 @@ public Builder setDelimiterBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat) } @@ -3124,6 +3147,7 @@ public interface AvroFormatOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -3135,31 +3159,36 @@ public interface AvroFormatOrBuilder * * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat} */ - public static final class AvroFormat extends com.google.protobuf.GeneratedMessageV3 + public static final class AvroFormat extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat) AvroFormatOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AvroFormat"); + } + // Use AvroFormat.newBuilder() to construct. - private AvroFormat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AvroFormat(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AvroFormat() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AvroFormat(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_AvroFormat_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_AvroFormat_fieldAccessorTable @@ -3265,7 +3294,7 @@ public int hashCode() { public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat @@ -3273,13 +3302,13 @@ public int hashCode() { java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat @@ -3287,13 +3316,13 @@ public int hashCode() { java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat @@ -3301,7 +3330,7 @@ public int hashCode() { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -3326,10 +3355,11 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -3342,7 +3372,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat) com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormatOrBuilder { @@ -3352,7 +3382,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_AvroFormat_fieldAccessorTable @@ -3366,7 +3396,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -3408,41 +3438,6 @@ public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat 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 @@ -3503,18 +3498,6 @@ public Builder mergeFrom( return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat) } @@ -3575,6 +3558,7 @@ public interface PubSubAvroFormatOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -3588,31 +3572,36 @@ public interface PubSubAvroFormatOrBuilder * Protobuf type {@code * google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat} */ - public static final class PubSubAvroFormat extends com.google.protobuf.GeneratedMessageV3 + public static final class PubSubAvroFormat extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat) PubSubAvroFormatOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PubSubAvroFormat"); + } + // Use PubSubAvroFormat.newBuilder() to construct. - private PubSubAvroFormat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PubSubAvroFormat(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private PubSubAvroFormat() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PubSubAvroFormat(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat_fieldAccessorTable @@ -3720,7 +3709,7 @@ public int hashCode() { public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat @@ -3728,13 +3717,13 @@ public int hashCode() { java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat @@ -3742,13 +3731,13 @@ public int hashCode() { java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat @@ -3756,7 +3745,7 @@ public int hashCode() { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -3782,10 +3771,11 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -3800,7 +3790,7 @@ protected Builder newBuilderForType( * google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat) com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormatOrBuilder { @@ -3810,7 +3800,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat_fieldAccessorTable @@ -3825,7 +3815,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -3869,41 +3859,6 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 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 @@ -3966,18 +3921,6 @@ public Builder mergeFrom( return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat) } @@ -4054,6 +3997,7 @@ public enum InputFormatCase private InputFormatCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -4090,6 +4034,7 @@ public InputFormatCase getInputFormatCase() { public static final int STATE_FIELD_NUMBER = 1; private int state_ = 0; + /** * * @@ -4108,6 +4053,7 @@ public InputFormatCase getInputFormatCase() { public int getStateValue() { return state_; } + /** * * @@ -4135,6 +4081,7 @@ public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State getSt @SuppressWarnings("serial") private volatile java.lang.Object bucket_ = ""; + /** * * @@ -4160,6 +4107,7 @@ public java.lang.String getBucket() { return s; } } + /** * * @@ -4187,6 +4135,7 @@ public com.google.protobuf.ByteString getBucketBytes() { } public static final int TEXT_FORMAT_FIELD_NUMBER = 3; + /** * * @@ -4204,6 +4153,7 @@ public com.google.protobuf.ByteString getBucketBytes() { public boolean hasTextFormat() { return inputFormatCase_ == 3; } + /** * * @@ -4227,6 +4177,7 @@ public boolean hasTextFormat() { return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat .getDefaultInstance(); } + /** * * @@ -4250,6 +4201,7 @@ public boolean hasTextFormat() { } public static final int AVRO_FORMAT_FIELD_NUMBER = 4; + /** * * @@ -4267,6 +4219,7 @@ public boolean hasTextFormat() { public boolean hasAvroFormat() { return inputFormatCase_ == 4; } + /** * * @@ -4290,6 +4243,7 @@ public boolean hasAvroFormat() { return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat .getDefaultInstance(); } + /** * * @@ -4313,6 +4267,7 @@ public boolean hasAvroFormat() { } public static final int PUBSUB_AVRO_FORMAT_FIELD_NUMBER = 5; + /** * * @@ -4332,6 +4287,7 @@ public boolean hasAvroFormat() { public boolean hasPubsubAvroFormat() { return inputFormatCase_ == 5; } + /** * * @@ -4357,6 +4313,7 @@ public boolean hasPubsubAvroFormat() { return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat .getDefaultInstance(); } + /** * * @@ -4383,6 +4340,7 @@ public boolean hasPubsubAvroFormat() { public static final int MINIMUM_OBJECT_CREATE_TIME_FIELD_NUMBER = 6; private com.google.protobuf.Timestamp minimumObjectCreateTime_; + /** * * @@ -4401,6 +4359,7 @@ public boolean hasPubsubAvroFormat() { public boolean hasMinimumObjectCreateTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -4421,6 +4380,7 @@ public com.google.protobuf.Timestamp getMinimumObjectCreateTime() { ? com.google.protobuf.Timestamp.getDefaultInstance() : minimumObjectCreateTime_; } + /** * * @@ -4444,6 +4404,7 @@ public com.google.protobuf.TimestampOrBuilder getMinimumObjectCreateTimeOrBuilde @SuppressWarnings("serial") private volatile java.lang.Object matchGlob_ = ""; + /** * * @@ -4469,6 +4430,7 @@ public java.lang.String getMatchGlob() { return s; } } + /** * * @@ -4514,8 +4476,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, state_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucket_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, bucket_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bucket_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, bucket_); } if (inputFormatCase_ == 3) { output.writeMessage( @@ -4538,8 +4500,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(6, getMinimumObjectCreateTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(matchGlob_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, matchGlob_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchGlob_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, matchGlob_); } getUnknownFields().writeTo(output); } @@ -4555,8 +4517,8 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucket_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, bucket_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bucket_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, bucket_); } if (inputFormatCase_ == 3) { size += @@ -4584,8 +4546,8 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 6, getMinimumObjectCreateTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(matchGlob_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, matchGlob_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchGlob_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, matchGlob_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -4703,38 +4665,38 @@ public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage pars public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -4758,11 +4720,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -4772,8 +4734,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.CloudStorage} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageOrBuilder { @@ -4783,7 +4744,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_fieldAccessorTable @@ -4797,14 +4758,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMinimumObjectCreateTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMinimumObjectCreateTimeFieldBuilder(); } } @@ -4906,48 +4867,13 @@ private void buildPartialOneofs( } @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) { - return mergeFrom((com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) other); - } else { - super.mergeFrom(other); - return this; - } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) { + return mergeFrom((com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) other); + } else { + super.mergeFrom(other); + return this; + } } public Builder mergeFrom( @@ -5032,27 +4958,30 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getTextFormatFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTextFormatFieldBuilder().getBuilder(), extensionRegistry); inputFormatCase_ = 3; break; } // case 26 case 34: { - input.readMessage(getAvroFormatFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetAvroFormatFieldBuilder().getBuilder(), extensionRegistry); inputFormatCase_ = 4; break; } // case 34 case 42: { input.readMessage( - getPubsubAvroFormatFieldBuilder().getBuilder(), extensionRegistry); + internalGetPubsubAvroFormatFieldBuilder().getBuilder(), extensionRegistry); inputFormatCase_ = 5; break; } // case 42 case 50: { input.readMessage( - getMinimumObjectCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + internalGetMinimumObjectCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000020; break; } // case 50 @@ -5096,6 +5025,7 @@ public Builder clearInputFormat() { private int bitField0_; private int state_ = 0; + /** * * @@ -5114,6 +5044,7 @@ public Builder clearInputFormat() { public int getStateValue() { return state_; } + /** * * @@ -5135,6 +5066,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -5157,6 +5089,7 @@ public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State getSt ? com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State.UNRECOGNIZED : result; } + /** * * @@ -5182,6 +5115,7 @@ public Builder setState( onChanged(); return this; } + /** * * @@ -5204,6 +5138,7 @@ public Builder clearState() { } private java.lang.Object bucket_ = ""; + /** * * @@ -5228,6 +5163,7 @@ public java.lang.String getBucket() { return (java.lang.String) ref; } } + /** * * @@ -5252,6 +5188,7 @@ public com.google.protobuf.ByteString getBucketBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -5275,6 +5212,7 @@ public Builder setBucket(java.lang.String value) { onChanged(); return this; } + /** * * @@ -5294,6 +5232,7 @@ public Builder clearBucket() { onChanged(); return this; } + /** * * @@ -5319,11 +5258,12 @@ public Builder setBucketBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.Builder, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormatOrBuilder> textFormatBuilder_; + /** * * @@ -5341,6 +5281,7 @@ public Builder setBucketBytes(com.google.protobuf.ByteString value) { public boolean hasTextFormat() { return inputFormatCase_ == 3; } + /** * * @@ -5372,6 +5313,7 @@ public boolean hasTextFormat() { .getDefaultInstance(); } } + /** * * @@ -5397,6 +5339,7 @@ public Builder setTextFormat( inputFormatCase_ = 3; return this; } + /** * * @@ -5420,6 +5363,7 @@ public Builder setTextFormat( inputFormatCase_ = 3; return this; } + /** * * @@ -5458,6 +5402,7 @@ public Builder mergeTextFormat( inputFormatCase_ = 3; return this; } + /** * * @@ -5485,6 +5430,7 @@ public Builder clearTextFormat() { } return this; } + /** * * @@ -5498,8 +5444,9 @@ public Builder clearTextFormat() { */ public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.Builder getTextFormatBuilder() { - return getTextFormatFieldBuilder().getBuilder(); + return internalGetTextFormatFieldBuilder().getBuilder(); } + /** * * @@ -5525,6 +5472,7 @@ public Builder clearTextFormat() { .getDefaultInstance(); } } + /** * * @@ -5536,11 +5484,11 @@ public Builder clearTextFormat() { * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat text_format = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.Builder, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormatOrBuilder> - getTextFormatFieldBuilder() { + internalGetTextFormatFieldBuilder() { if (textFormatBuilder_ == null) { if (!(inputFormatCase_ == 3)) { inputFormat_ = @@ -5548,7 +5496,7 @@ public Builder clearTextFormat() { .getDefaultInstance(); } textFormatBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.Builder, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage @@ -5564,11 +5512,12 @@ public Builder clearTextFormat() { return textFormatBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.Builder, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormatOrBuilder> avroFormatBuilder_; + /** * * @@ -5586,6 +5535,7 @@ public Builder clearTextFormat() { public boolean hasAvroFormat() { return inputFormatCase_ == 4; } + /** * * @@ -5617,6 +5567,7 @@ public boolean hasAvroFormat() { .getDefaultInstance(); } } + /** * * @@ -5642,6 +5593,7 @@ public Builder setAvroFormat( inputFormatCase_ = 4; return this; } + /** * * @@ -5665,6 +5617,7 @@ public Builder setAvroFormat( inputFormatCase_ = 4; return this; } + /** * * @@ -5703,6 +5656,7 @@ public Builder mergeAvroFormat( inputFormatCase_ = 4; return this; } + /** * * @@ -5730,6 +5684,7 @@ public Builder clearAvroFormat() { } return this; } + /** * * @@ -5743,8 +5698,9 @@ public Builder clearAvroFormat() { */ public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.Builder getAvroFormatBuilder() { - return getAvroFormatFieldBuilder().getBuilder(); + return internalGetAvroFormatFieldBuilder().getBuilder(); } + /** * * @@ -5770,6 +5726,7 @@ public Builder clearAvroFormat() { .getDefaultInstance(); } } + /** * * @@ -5781,11 +5738,11 @@ public Builder clearAvroFormat() { * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat avro_format = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.Builder, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormatOrBuilder> - getAvroFormatFieldBuilder() { + internalGetAvroFormatFieldBuilder() { if (avroFormatBuilder_ == null) { if (!(inputFormatCase_ == 4)) { inputFormat_ = @@ -5793,7 +5750,7 @@ public Builder clearAvroFormat() { .getDefaultInstance(); } avroFormatBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.Builder, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage @@ -5809,13 +5766,14 @@ public Builder clearAvroFormat() { return avroFormatBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat .Builder, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage .PubSubAvroFormatOrBuilder> pubsubAvroFormatBuilder_; + /** * * @@ -5835,6 +5793,7 @@ public Builder clearAvroFormat() { public boolean hasPubsubAvroFormat() { return inputFormatCase_ == 5; } + /** * * @@ -5868,6 +5827,7 @@ public boolean hasPubsubAvroFormat() { .getDefaultInstance(); } } + /** * * @@ -5895,6 +5855,7 @@ public Builder setPubsubAvroFormat( inputFormatCase_ = 5; return this; } + /** * * @@ -5920,6 +5881,7 @@ public Builder setPubsubAvroFormat( inputFormatCase_ = 5; return this; } + /** * * @@ -5962,6 +5924,7 @@ public Builder mergePubsubAvroFormat( inputFormatCase_ = 5; return this; } + /** * * @@ -5991,6 +5954,7 @@ public Builder clearPubsubAvroFormat() { } return this; } + /** * * @@ -6006,8 +5970,9 @@ public Builder clearPubsubAvroFormat() { */ public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.Builder getPubsubAvroFormatBuilder() { - return getPubsubAvroFormatFieldBuilder().getBuilder(); + return internalGetPubsubAvroFormatFieldBuilder().getBuilder(); } + /** * * @@ -6035,6 +6000,7 @@ public Builder clearPubsubAvroFormat() { .getDefaultInstance(); } } + /** * * @@ -6048,13 +6014,13 @@ public Builder clearPubsubAvroFormat() { * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat pubsub_avro_format = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat .Builder, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage .PubSubAvroFormatOrBuilder> - getPubsubAvroFormatFieldBuilder() { + internalGetPubsubAvroFormatFieldBuilder() { if (pubsubAvroFormatBuilder_ == null) { if (!(inputFormatCase_ == 5)) { inputFormat_ = @@ -6062,7 +6028,7 @@ public Builder clearPubsubAvroFormat() { .getDefaultInstance(); } pubsubAvroFormatBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat, com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat .Builder, @@ -6080,11 +6046,12 @@ public Builder clearPubsubAvroFormat() { } private com.google.protobuf.Timestamp minimumObjectCreateTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> minimumObjectCreateTimeBuilder_; + /** * * @@ -6102,6 +6069,7 @@ public Builder clearPubsubAvroFormat() { public boolean hasMinimumObjectCreateTime() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -6125,6 +6093,7 @@ public com.google.protobuf.Timestamp getMinimumObjectCreateTime() { return minimumObjectCreateTimeBuilder_.getMessage(); } } + /** * * @@ -6150,6 +6119,7 @@ public Builder setMinimumObjectCreateTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -6173,6 +6143,7 @@ public Builder setMinimumObjectCreateTime( onChanged(); return this; } + /** * * @@ -6203,6 +6174,7 @@ public Builder mergeMinimumObjectCreateTime(com.google.protobuf.Timestamp value) } return this; } + /** * * @@ -6225,6 +6197,7 @@ public Builder clearMinimumObjectCreateTime() { onChanged(); return this; } + /** * * @@ -6240,8 +6213,9 @@ public Builder clearMinimumObjectCreateTime() { public com.google.protobuf.Timestamp.Builder getMinimumObjectCreateTimeBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getMinimumObjectCreateTimeFieldBuilder().getBuilder(); + return internalGetMinimumObjectCreateTimeFieldBuilder().getBuilder(); } + /** * * @@ -6263,6 +6237,7 @@ public com.google.protobuf.TimestampOrBuilder getMinimumObjectCreateTimeOrBuilde : minimumObjectCreateTime_; } } + /** * * @@ -6275,14 +6250,14 @@ public com.google.protobuf.TimestampOrBuilder getMinimumObjectCreateTimeOrBuilde * .google.protobuf.Timestamp minimum_object_create_time = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getMinimumObjectCreateTimeFieldBuilder() { + internalGetMinimumObjectCreateTimeFieldBuilder() { if (minimumObjectCreateTimeBuilder_ == null) { minimumObjectCreateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -6293,6 +6268,7 @@ public com.google.protobuf.TimestampOrBuilder getMinimumObjectCreateTimeOrBuilde } private java.lang.Object matchGlob_ = ""; + /** * * @@ -6317,6 +6293,7 @@ public java.lang.String getMatchGlob() { return (java.lang.String) ref; } } + /** * * @@ -6341,6 +6318,7 @@ public com.google.protobuf.ByteString getMatchGlobBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -6364,6 +6342,7 @@ public Builder setMatchGlob(java.lang.String value) { onChanged(); return this; } + /** * * @@ -6383,6 +6362,7 @@ public Builder clearMatchGlob() { onChanged(); return this; } + /** * * @@ -6408,18 +6388,6 @@ public Builder setMatchGlobBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) } @@ -6475,306 +6443,6768 @@ public com.google.protobuf.Parser getParserForType() { } } - private int bitField0_; - private int sourceCase_ = 0; + public interface AzureEventHubsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private java.lang.Object source_; + /** + * + * + *
    +     * Output only. An output-only field that indicates the state of the Event
    +     * Hubs ingestion source.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); - public enum SourceCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - AWS_KINESIS(1), - CLOUD_STORAGE(2), - SOURCE_NOT_SET(0); - private final int value; + /** + * + * + *
    +     * Output only. An output-only field that indicates the state of the Event
    +     * Hubs ingestion source.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State getState(); - 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. - * @deprecated Use {@link #forNumber(int)} instead. + * + * + *
    +     * Optional. Name of the resource group within the azure subscription.
    +     * 
    + * + * string resource_group = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The resourceGroup. */ - @java.lang.Deprecated - public static SourceCase valueOf(int value) { - return forNumber(value); - } + java.lang.String getResourceGroup(); - public static SourceCase forNumber(int value) { - switch (value) { - case 1: - return AWS_KINESIS; - case 2: - return CLOUD_STORAGE; - case 0: - return SOURCE_NOT_SET; - default: - return null; - } - } + /** + * + * + *
    +     * Optional. Name of the resource group within the azure subscription.
    +     * 
    + * + * string resource_group = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for resourceGroup. + */ + com.google.protobuf.ByteString getResourceGroupBytes(); - public int getNumber() { - return this.value; - } - }; + /** + * + * + *
    +     * Optional. The name of the Event Hubs namespace.
    +     * 
    + * + * string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The namespace. + */ + java.lang.String getNamespace(); - public SourceCase getSourceCase() { - return SourceCase.forNumber(sourceCase_); - } + /** + * + * + *
    +     * Optional. The name of the Event Hubs namespace.
    +     * 
    + * + * string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for namespace. + */ + com.google.protobuf.ByteString getNamespaceBytes(); - public static final int AWS_KINESIS_FIELD_NUMBER = 1; - /** - * - * - *
    -   * Optional. Amazon Kinesis Data Streams.
    -   * 
    - * - * - * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the awsKinesis field is set. - */ - @java.lang.Override - public boolean hasAwsKinesis() { - return sourceCase_ == 1; - } - /** - * - * - *
    -   * Optional. Amazon Kinesis Data Streams.
    -   * 
    - * - * - * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The awsKinesis. - */ - @java.lang.Override - public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis getAwsKinesis() { - if (sourceCase_ == 1) { - return (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_; - } - return com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDefaultInstance(); - } - /** - * - * - *
    -   * Optional. Amazon Kinesis Data Streams.
    -   * 
    - * - * - * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisOrBuilder - getAwsKinesisOrBuilder() { - if (sourceCase_ == 1) { - return (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_; - } - return com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDefaultInstance(); - } + /** + * + * + *
    +     * Optional. The name of the Event Hub.
    +     * 
    + * + * string event_hub = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The eventHub. + */ + java.lang.String getEventHub(); - public static final int CLOUD_STORAGE_FIELD_NUMBER = 2; - /** - * - * - *
    -   * Optional. Cloud Storage.
    -   * 
    - * - * - * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the cloudStorage field is set. - */ - @java.lang.Override - public boolean hasCloudStorage() { - return sourceCase_ == 2; - } - /** - * - * - *
    -   * Optional. Cloud Storage.
    -   * 
    - * - * - * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The cloudStorage. - */ - @java.lang.Override - public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage getCloudStorage() { - if (sourceCase_ == 2) { - return (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_; - } - return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDefaultInstance(); - } - /** - * - * - *
    -   * Optional. Cloud Storage.
    -   * 
    - * - * - * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageOrBuilder - getCloudStorageOrBuilder() { - if (sourceCase_ == 2) { - return (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_; - } - return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDefaultInstance(); - } + /** + * + * + *
    +     * Optional. The name of the Event Hub.
    +     * 
    + * + * string event_hub = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for eventHub. + */ + com.google.protobuf.ByteString getEventHubBytes(); - public static final int PLATFORM_LOGS_SETTINGS_FIELD_NUMBER = 4; - private com.google.pubsub.v1.PlatformLogsSettings platformLogsSettings_; - /** - * - * - *
    -   * Optional. Platform Logs settings. If unset, no Platform Logs will be
    -   * generated.
    -   * 
    - * - * - * .google.pubsub.v1.PlatformLogsSettings platform_logs_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the platformLogsSettings field is set. - */ - @java.lang.Override - public boolean hasPlatformLogsSettings() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
    -   * Optional. Platform Logs settings. If unset, no Platform Logs will be
    -   * generated.
    -   * 
    - * - * - * .google.pubsub.v1.PlatformLogsSettings platform_logs_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The platformLogsSettings. - */ - @java.lang.Override - public com.google.pubsub.v1.PlatformLogsSettings getPlatformLogsSettings() { - return platformLogsSettings_ == null - ? com.google.pubsub.v1.PlatformLogsSettings.getDefaultInstance() - : platformLogsSettings_; + /** + * + * + *
    +     * Optional. The client id of the Azure application that is being used to
    +     * authenticate Pub/Sub.
    +     * 
    + * + * string client_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clientId. + */ + java.lang.String getClientId(); + + /** + * + * + *
    +     * Optional. The client id of the Azure application that is being used to
    +     * authenticate Pub/Sub.
    +     * 
    + * + * string client_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clientId. + */ + com.google.protobuf.ByteString getClientIdBytes(); + + /** + * + * + *
    +     * Optional. The tenant id of the Azure application that is being used to
    +     * authenticate Pub/Sub.
    +     * 
    + * + * string tenant_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The tenantId. + */ + java.lang.String getTenantId(); + + /** + * + * + *
    +     * Optional. The tenant id of the Azure application that is being used to
    +     * authenticate Pub/Sub.
    +     * 
    + * + * string tenant_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for tenantId. + */ + com.google.protobuf.ByteString getTenantIdBytes(); + + /** + * + * + *
    +     * Optional. The Azure subscription id.
    +     * 
    + * + * string subscription_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subscriptionId. + */ + java.lang.String getSubscriptionId(); + + /** + * + * + *
    +     * Optional. The Azure subscription id.
    +     * 
    + * + * string subscription_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subscriptionId. + */ + com.google.protobuf.ByteString getSubscriptionIdBytes(); + + /** + * + * + *
    +     * Optional. The GCP service account to be used for Federated Identity
    +     * authentication.
    +     * 
    + * + * string gcp_service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The gcpServiceAccount. + */ + java.lang.String getGcpServiceAccount(); + + /** + * + * + *
    +     * Optional. The GCP service account to be used for Federated Identity
    +     * authentication.
    +     * 
    + * + * string gcp_service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for gcpServiceAccount. + */ + com.google.protobuf.ByteString getGcpServiceAccountBytes(); } + /** * * *
    -   * Optional. Platform Logs settings. If unset, no Platform Logs will be
    -   * generated.
    +   * Ingestion settings for Azure Event Hubs.
        * 
    * - * - * .google.pubsub.v1.PlatformLogsSettings platform_logs_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; - * + * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} */ - @java.lang.Override - public com.google.pubsub.v1.PlatformLogsSettingsOrBuilder getPlatformLogsSettingsOrBuilder() { - return platformLogsSettings_ == null - ? com.google.pubsub.v1.PlatformLogsSettings.getDefaultInstance() - : platformLogsSettings_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } + public static final class AzureEventHubs extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) + AzureEventHubsOrBuilder { + private static final long serialVersionUID = 0L; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (sourceCase_ == 1) { - output.writeMessage(1, (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_); - } - if (sourceCase_ == 2) { - output.writeMessage( - 2, (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getPlatformLogsSettings()); + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AzureEventHubs"); } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - size = 0; - if (sourceCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_); - } - if (sourceCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPlatformLogsSettings()); + // Use AzureEventHubs.newBuilder() to construct. + private AzureEventHubs(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + private AzureEventHubs() { + state_ = 0; + resourceGroup_ = ""; + namespace_ = ""; + eventHub_ = ""; + clientId_ = ""; + tenantId_ = ""; + subscriptionId_ = ""; + gcpServiceAccount_ = ""; } - if (!(obj instanceof com.google.pubsub.v1.IngestionDataSourceSettings)) { - return super.equals(obj); + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AzureEventHubs_descriptor; } - com.google.pubsub.v1.IngestionDataSourceSettings other = - (com.google.pubsub.v1.IngestionDataSourceSettings) obj; - if (hasPlatformLogsSettings() != other.hasPlatformLogsSettings()) return false; - if (hasPlatformLogsSettings()) { - if (!getPlatformLogsSettings().equals(other.getPlatformLogsSettings())) return false; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AzureEventHubs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.class, + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.Builder.class); } - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 1: - if (!getAwsKinesis().equals(other.getAwsKinesis())) return false; - break; - case 2: - if (!getCloudStorage().equals(other.getCloudStorage())) return false; - break; + + /** + * + * + *
    +     * Possible states for managed ingestion from Event Hubs.
    +     * 
    + * + * Protobuf enum {@code google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +       * Default value. This value is unused.
    +       * 
    + * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
    +       * Ingestion is active.
    +       * 
    + * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
    +       * Permission denied encountered while consuming data from Event Hubs.
    +       * This can happen when `client_id`, or `tenant_id` are invalid. Or the
    +       * right permissions haven't been granted.
    +       * 
    + * + * EVENT_HUBS_PERMISSION_DENIED = 2; + */ + EVENT_HUBS_PERMISSION_DENIED(2), + /** + * + * + *
    +       * Permission denied encountered while publishing to the topic.
    +       * 
    + * + * PUBLISH_PERMISSION_DENIED = 3; + */ + PUBLISH_PERMISSION_DENIED(3), + /** + * + * + *
    +       * The provided Event Hubs namespace couldn't be found.
    +       * 
    + * + * NAMESPACE_NOT_FOUND = 4; + */ + NAMESPACE_NOT_FOUND(4), + /** + * + * + *
    +       * The provided Event Hub couldn't be found.
    +       * 
    + * + * EVENT_HUB_NOT_FOUND = 5; + */ + EVENT_HUB_NOT_FOUND(5), + /** + * + * + *
    +       * The provided Event Hubs subscription couldn't be found.
    +       * 
    + * + * SUBSCRIPTION_NOT_FOUND = 6; + */ + SUBSCRIPTION_NOT_FOUND(6), + /** + * + * + *
    +       * The provided Event Hubs resource group couldn't be found.
    +       * 
    + * + * RESOURCE_GROUP_NOT_FOUND = 7; + */ + RESOURCE_GROUP_NOT_FOUND(7), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
    +       * Default value. This value is unused.
    +       * 
    + * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +       * Ingestion is active.
    +       * 
    + * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + + /** + * + * + *
    +       * Permission denied encountered while consuming data from Event Hubs.
    +       * This can happen when `client_id`, or `tenant_id` are invalid. Or the
    +       * right permissions haven't been granted.
    +       * 
    + * + * EVENT_HUBS_PERMISSION_DENIED = 2; + */ + public static final int EVENT_HUBS_PERMISSION_DENIED_VALUE = 2; + + /** + * + * + *
    +       * Permission denied encountered while publishing to the topic.
    +       * 
    + * + * PUBLISH_PERMISSION_DENIED = 3; + */ + public static final int PUBLISH_PERMISSION_DENIED_VALUE = 3; + + /** + * + * + *
    +       * The provided Event Hubs namespace couldn't be found.
    +       * 
    + * + * NAMESPACE_NOT_FOUND = 4; + */ + public static final int NAMESPACE_NOT_FOUND_VALUE = 4; + + /** + * + * + *
    +       * The provided Event Hub couldn't be found.
    +       * 
    + * + * EVENT_HUB_NOT_FOUND = 5; + */ + public static final int EVENT_HUB_NOT_FOUND_VALUE = 5; + + /** + * + * + *
    +       * The provided Event Hubs subscription couldn't be found.
    +       * 
    + * + * SUBSCRIPTION_NOT_FOUND = 6; + */ + public static final int SUBSCRIPTION_NOT_FOUND_VALUE = 6; + + /** + * + * + *
    +       * The provided Event Hubs resource group couldn't be found.
    +       * 
    + * + * RESOURCE_GROUP_NOT_FOUND = 7; + */ + public static final int RESOURCE_GROUP_NOT_FOUND_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return EVENT_HUBS_PERMISSION_DENIED; + case 3: + return PUBLISH_PERMISSION_DENIED; + case 4: + return NAMESPACE_NOT_FOUND; + case 5: + return EVENT_HUB_NOT_FOUND; + case 6: + return SUBSCRIPTION_NOT_FOUND; + case 7: + return RESOURCE_GROUP_NOT_FOUND; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + + /** + * + * + *
    +     * Output only. An output-only field that indicates the state of the Event
    +     * Hubs ingestion source.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
    +     * Output only. An output-only field that indicates the state of the Event
    +     * Hubs ingestion source.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State getState() { + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State result = + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State.forNumber(state_); + return result == null + ? com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_GROUP_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceGroup_ = ""; + + /** + * + * + *
    +     * Optional. Name of the resource group within the azure subscription.
    +     * 
    + * + * string resource_group = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The resourceGroup. + */ + @java.lang.Override + public java.lang.String getResourceGroup() { + java.lang.Object ref = resourceGroup_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceGroup_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. Name of the resource group within the azure subscription.
    +     * 
    + * + * string resource_group = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for resourceGroup. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceGroupBytes() { + java.lang.Object ref = resourceGroup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAMESPACE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object namespace_ = ""; + + /** + * + * + *
    +     * Optional. The name of the Event Hubs namespace.
    +     * 
    + * + * string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The namespace. + */ + @java.lang.Override + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespace_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The name of the Event Hubs namespace.
    +     * 
    + * + * string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for namespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENT_HUB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object eventHub_ = ""; + + /** + * + * + *
    +     * Optional. The name of the Event Hub.
    +     * 
    + * + * string event_hub = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The eventHub. + */ + @java.lang.Override + public java.lang.String getEventHub() { + java.lang.Object ref = eventHub_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventHub_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The name of the Event Hub.
    +     * 
    + * + * string event_hub = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for eventHub. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventHubBytes() { + java.lang.Object ref = eventHub_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventHub_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLIENT_ID_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object clientId_ = ""; + + /** + * + * + *
    +     * Optional. The client id of the Azure application that is being used to
    +     * authenticate Pub/Sub.
    +     * 
    + * + * string client_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + java.lang.Object ref = clientId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientId_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The client id of the Azure application that is being used to
    +     * authenticate Pub/Sub.
    +     * 
    + * + * string client_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TENANT_ID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object tenantId_ = ""; + + /** + * + * + *
    +     * Optional. The tenant id of the Azure application that is being used to
    +     * authenticate Pub/Sub.
    +     * 
    + * + * string tenant_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The tenantId. + */ + @java.lang.Override + public java.lang.String getTenantId() { + java.lang.Object ref = tenantId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tenantId_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The tenant id of the Azure application that is being used to
    +     * authenticate Pub/Sub.
    +     * 
    + * + * string tenant_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for tenantId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTenantIdBytes() { + java.lang.Object ref = tenantId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tenantId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBSCRIPTION_ID_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object subscriptionId_ = ""; + + /** + * + * + *
    +     * Optional. The Azure subscription id.
    +     * 
    + * + * string subscription_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subscriptionId. + */ + @java.lang.Override + public java.lang.String getSubscriptionId() { + java.lang.Object ref = subscriptionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subscriptionId_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The Azure subscription id.
    +     * 
    + * + * string subscription_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subscriptionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubscriptionIdBytes() { + java.lang.Object ref = subscriptionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subscriptionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCP_SERVICE_ACCOUNT_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcpServiceAccount_ = ""; + + /** + * + * + *
    +     * Optional. The GCP service account to be used for Federated Identity
    +     * authentication.
    +     * 
    + * + * string gcp_service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The gcpServiceAccount. + */ + @java.lang.Override + public java.lang.String getGcpServiceAccount() { + java.lang.Object ref = gcpServiceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcpServiceAccount_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The GCP service account to be used for Federated Identity
    +     * authentication.
    +     * 
    + * + * string gcp_service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for gcpServiceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcpServiceAccountBytes() { + java.lang.Object ref = gcpServiceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcpServiceAccount_ = 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 (state_ + != com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceGroup_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, resourceGroup_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, namespace_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(eventHub_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, eventHub_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, clientId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenantId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, tenantId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscriptionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, subscriptionId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gcpServiceAccount_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, gcpServiceAccount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceGroup_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, resourceGroup_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, namespace_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(eventHub_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, eventHub_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, clientId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenantId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, tenantId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscriptionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, subscriptionId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gcpServiceAccount_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, gcpServiceAccount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs)) { + return super.equals(obj); + } + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs other = + (com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) obj; + + if (state_ != other.state_) return false; + if (!getResourceGroup().equals(other.getResourceGroup())) return false; + if (!getNamespace().equals(other.getNamespace())) return false; + if (!getEventHub().equals(other.getEventHub())) return false; + if (!getClientId().equals(other.getClientId())) return false; + if (!getTenantId().equals(other.getTenantId())) return false; + if (!getSubscriptionId().equals(other.getSubscriptionId())) return false; + if (!getGcpServiceAccount().equals(other.getGcpServiceAccount())) 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) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + RESOURCE_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getResourceGroup().hashCode(); + hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getNamespace().hashCode(); + hash = (37 * hash) + EVENT_HUB_FIELD_NUMBER; + hash = (53 * hash) + getEventHub().hashCode(); + hash = (37 * hash) + CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getClientId().hashCode(); + hash = (37 * hash) + TENANT_ID_FIELD_NUMBER; + hash = (53 * hash) + getTenantId().hashCode(); + hash = (37 * hash) + SUBSCRIPTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubscriptionId().hashCode(); + hash = (37 * hash) + GCP_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getGcpServiceAccount().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * Ingestion settings for Azure Event Hubs.
    +     * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AzureEventHubs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AzureEventHubs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.class, + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.Builder.class); + } + + // Construct using + // com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + resourceGroup_ = ""; + namespace_ = ""; + eventHub_ = ""; + clientId_ = ""; + tenantId_ = ""; + subscriptionId_ = ""; + gcpServiceAccount_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AzureEventHubs_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + getDefaultInstanceForType() { + return com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs build() { + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs buildPartial() { + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs result = + new com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceGroup_ = resourceGroup_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.namespace_ = namespace_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.eventHub_ = eventHub_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.clientId_ = clientId_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.tenantId_ = tenantId_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.subscriptionId_ = subscriptionId_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.gcpServiceAccount_ = gcpServiceAccount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) { + return mergeFrom((com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs other) { + if (other + == com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.getDefaultInstance()) + return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getResourceGroup().isEmpty()) { + resourceGroup_ = other.resourceGroup_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getNamespace().isEmpty()) { + namespace_ = other.namespace_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getEventHub().isEmpty()) { + eventHub_ = other.eventHub_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getClientId().isEmpty()) { + clientId_ = other.clientId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getTenantId().isEmpty()) { + tenantId_ = other.tenantId_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getSubscriptionId().isEmpty()) { + subscriptionId_ = other.subscriptionId_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getGcpServiceAccount().isEmpty()) { + gcpServiceAccount_ = other.gcpServiceAccount_; + bitField0_ |= 0x00000080; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + resourceGroup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + namespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + eventHub_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + clientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + tenantId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + subscriptionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + gcpServiceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int state_ = 0; + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the Event
    +       * Hubs ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the Event
    +       * Hubs ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the Event
    +       * Hubs ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State getState() { + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State result = + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State.forNumber(state_); + return result == null + ? com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the Event
    +       * Hubs ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the Event
    +       * Hubs ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceGroup_ = ""; + + /** + * + * + *
    +       * Optional. Name of the resource group within the azure subscription.
    +       * 
    + * + * string resource_group = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The resourceGroup. + */ + public java.lang.String getResourceGroup() { + java.lang.Object ref = resourceGroup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceGroup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. Name of the resource group within the azure subscription.
    +       * 
    + * + * string resource_group = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for resourceGroup. + */ + public com.google.protobuf.ByteString getResourceGroupBytes() { + java.lang.Object ref = resourceGroup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. Name of the resource group within the azure subscription.
    +       * 
    + * + * string resource_group = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The resourceGroup to set. + * @return This builder for chaining. + */ + public Builder setResourceGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceGroup_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. Name of the resource group within the azure subscription.
    +       * 
    + * + * string resource_group = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearResourceGroup() { + resourceGroup_ = getDefaultInstance().getResourceGroup(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. Name of the resource group within the azure subscription.
    +       * 
    + * + * string resource_group = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for resourceGroup to set. + * @return This builder for chaining. + */ + public Builder setResourceGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceGroup_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object namespace_ = ""; + + /** + * + * + *
    +       * Optional. The name of the Event Hubs namespace.
    +       * 
    + * + * string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The namespace. + */ + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The name of the Event Hubs namespace.
    +       * 
    + * + * string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for namespace. + */ + public com.google.protobuf.ByteString getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The name of the Event Hubs namespace.
    +       * 
    + * + * string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The namespace to set. + * @return This builder for chaining. + */ + public Builder setNamespace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + namespace_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The name of the Event Hubs namespace.
    +       * 
    + * + * string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNamespace() { + namespace_ = getDefaultInstance().getNamespace(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The name of the Event Hubs namespace.
    +       * 
    + * + * string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for namespace to set. + * @return This builder for chaining. + */ + public Builder setNamespaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + namespace_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object eventHub_ = ""; + + /** + * + * + *
    +       * Optional. The name of the Event Hub.
    +       * 
    + * + * string event_hub = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The eventHub. + */ + public java.lang.String getEventHub() { + java.lang.Object ref = eventHub_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventHub_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The name of the Event Hub.
    +       * 
    + * + * string event_hub = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for eventHub. + */ + public com.google.protobuf.ByteString getEventHubBytes() { + java.lang.Object ref = eventHub_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventHub_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The name of the Event Hub.
    +       * 
    + * + * string event_hub = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The eventHub to set. + * @return This builder for chaining. + */ + public Builder setEventHub(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + eventHub_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The name of the Event Hub.
    +       * 
    + * + * string event_hub = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEventHub() { + eventHub_ = getDefaultInstance().getEventHub(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The name of the Event Hub.
    +       * 
    + * + * string event_hub = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for eventHub to set. + * @return This builder for chaining. + */ + public Builder setEventHubBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + eventHub_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object clientId_ = ""; + + /** + * + * + *
    +       * Optional. The client id of the Azure application that is being used to
    +       * authenticate Pub/Sub.
    +       * 
    + * + * string client_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clientId. + */ + public java.lang.String getClientId() { + java.lang.Object ref = clientId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The client id of the Azure application that is being used to
    +       * authenticate Pub/Sub.
    +       * 
    + * + * string client_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clientId. + */ + public com.google.protobuf.ByteString getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The client id of the Azure application that is being used to
    +       * authenticate Pub/Sub.
    +       * 
    + * + * string client_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The clientId to set. + * @return This builder for chaining. + */ + public Builder setClientId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clientId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The client id of the Azure application that is being used to
    +       * authenticate Pub/Sub.
    +       * 
    + * + * string client_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearClientId() { + clientId_ = getDefaultInstance().getClientId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The client id of the Azure application that is being used to
    +       * authenticate Pub/Sub.
    +       * 
    + * + * string client_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for clientId to set. + * @return This builder for chaining. + */ + public Builder setClientIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clientId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object tenantId_ = ""; + + /** + * + * + *
    +       * Optional. The tenant id of the Azure application that is being used to
    +       * authenticate Pub/Sub.
    +       * 
    + * + * string tenant_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The tenantId. + */ + public java.lang.String getTenantId() { + java.lang.Object ref = tenantId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tenantId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The tenant id of the Azure application that is being used to
    +       * authenticate Pub/Sub.
    +       * 
    + * + * string tenant_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for tenantId. + */ + public com.google.protobuf.ByteString getTenantIdBytes() { + java.lang.Object ref = tenantId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tenantId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The tenant id of the Azure application that is being used to
    +       * authenticate Pub/Sub.
    +       * 
    + * + * string tenant_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The tenantId to set. + * @return This builder for chaining. + */ + public Builder setTenantId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tenantId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The tenant id of the Azure application that is being used to
    +       * authenticate Pub/Sub.
    +       * 
    + * + * string tenant_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTenantId() { + tenantId_ = getDefaultInstance().getTenantId(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The tenant id of the Azure application that is being used to
    +       * authenticate Pub/Sub.
    +       * 
    + * + * string tenant_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for tenantId to set. + * @return This builder for chaining. + */ + public Builder setTenantIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tenantId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object subscriptionId_ = ""; + + /** + * + * + *
    +       * Optional. The Azure subscription id.
    +       * 
    + * + * string subscription_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subscriptionId. + */ + public java.lang.String getSubscriptionId() { + java.lang.Object ref = subscriptionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subscriptionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The Azure subscription id.
    +       * 
    + * + * string subscription_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subscriptionId. + */ + public com.google.protobuf.ByteString getSubscriptionIdBytes() { + java.lang.Object ref = subscriptionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subscriptionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The Azure subscription id.
    +       * 
    + * + * string subscription_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The subscriptionId to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subscriptionId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The Azure subscription id.
    +       * 
    + * + * string subscription_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSubscriptionId() { + subscriptionId_ = getDefaultInstance().getSubscriptionId(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The Azure subscription id.
    +       * 
    + * + * string subscription_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for subscriptionId to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subscriptionId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object gcpServiceAccount_ = ""; + + /** + * + * + *
    +       * Optional. The GCP service account to be used for Federated Identity
    +       * authentication.
    +       * 
    + * + * string gcp_service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The gcpServiceAccount. + */ + public java.lang.String getGcpServiceAccount() { + java.lang.Object ref = gcpServiceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcpServiceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The GCP service account to be used for Federated Identity
    +       * authentication.
    +       * 
    + * + * string gcp_service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for gcpServiceAccount. + */ + public com.google.protobuf.ByteString getGcpServiceAccountBytes() { + java.lang.Object ref = gcpServiceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcpServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The GCP service account to be used for Federated Identity
    +       * authentication.
    +       * 
    + * + * string gcp_service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The gcpServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setGcpServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcpServiceAccount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The GCP service account to be used for Federated Identity
    +       * authentication.
    +       * 
    + * + * string gcp_service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearGcpServiceAccount() { + gcpServiceAccount_ = getDefaultInstance().getGcpServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The GCP service account to be used for Federated Identity
    +       * authentication.
    +       * 
    + * + * string gcp_service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for gcpServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setGcpServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcpServiceAccount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) + private static final com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs(); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureEventHubs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AwsMskOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Output only. An output-only field that indicates the state of the Amazon
    +     * MSK ingestion source.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
    +     * Output only. An output-only field that indicates the state of the Amazon
    +     * MSK ingestion source.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State getState(); + + /** + * + * + *
    +     * Required. The Amazon Resource Name (ARN) that uniquely identifies the
    +     * cluster.
    +     * 
    + * + * string cluster_arn = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterArn. + */ + java.lang.String getClusterArn(); + + /** + * + * + *
    +     * Required. The Amazon Resource Name (ARN) that uniquely identifies the
    +     * cluster.
    +     * 
    + * + * string cluster_arn = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterArn. + */ + com.google.protobuf.ByteString getClusterArnBytes(); + + /** + * + * + *
    +     * Required. The name of the topic in the Amazon MSK cluster that Pub/Sub
    +     * will import from.
    +     * 
    + * + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The topic. + */ + java.lang.String getTopic(); + + /** + * + * + *
    +     * Required. The name of the topic in the Amazon MSK cluster that Pub/Sub
    +     * will import from.
    +     * 
    + * + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for topic. + */ + com.google.protobuf.ByteString getTopicBytes(); + + /** + * + * + *
    +     * Required. AWS role ARN to be used for Federated Identity authentication
    +     * with Amazon MSK. Check the Pub/Sub docs for how to set up this role and
    +     * the required permissions that need to be attached to it.
    +     * 
    + * + * string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The awsRoleArn. + */ + java.lang.String getAwsRoleArn(); + + /** + * + * + *
    +     * Required. AWS role ARN to be used for Federated Identity authentication
    +     * with Amazon MSK. Check the Pub/Sub docs for how to set up this role and
    +     * the required permissions that need to be attached to it.
    +     * 
    + * + * string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for awsRoleArn. + */ + com.google.protobuf.ByteString getAwsRoleArnBytes(); + + /** + * + * + *
    +     * Required. The GCP service account to be used for Federated Identity
    +     * authentication with Amazon MSK (via a `AssumeRoleWithWebIdentity` call
    +     * for the provided role). The `aws_role_arn` must be set up with
    +     * `accounts.google.com:sub` equals to this service account number.
    +     * 
    + * + * string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcpServiceAccount. + */ + java.lang.String getGcpServiceAccount(); + + /** + * + * + *
    +     * Required. The GCP service account to be used for Federated Identity
    +     * authentication with Amazon MSK (via a `AssumeRoleWithWebIdentity` call
    +     * for the provided role). The `aws_role_arn` must be set up with
    +     * `accounts.google.com:sub` equals to this service account number.
    +     * 
    + * + * string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcpServiceAccount. + */ + com.google.protobuf.ByteString getGcpServiceAccountBytes(); + } + + /** + * + * + *
    +   * Ingestion settings for Amazon MSK.
    +   * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} + */ + public static final class AwsMsk extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) + AwsMskOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AwsMsk"); + } + + // Use AwsMsk.newBuilder() to construct. + private AwsMsk(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AwsMsk() { + state_ = 0; + clusterArn_ = ""; + topic_ = ""; + awsRoleArn_ = ""; + gcpServiceAccount_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsMsk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsMsk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.class, + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.Builder.class); + } + + /** + * + * + *
    +     * Possible states for managed ingestion from Amazon MSK.
    +     * 
    + * + * Protobuf enum {@code google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +       * Default value. This value is unused.
    +       * 
    + * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
    +       * Ingestion is active.
    +       * 
    + * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
    +       * Permission denied encountered while consuming data from Amazon MSK.
    +       * 
    + * + * MSK_PERMISSION_DENIED = 2; + */ + MSK_PERMISSION_DENIED(2), + /** + * + * + *
    +       * Permission denied encountered while publishing to the topic.
    +       * 
    + * + * PUBLISH_PERMISSION_DENIED = 3; + */ + PUBLISH_PERMISSION_DENIED(3), + /** + * + * + *
    +       * The provided MSK cluster wasn't found.
    +       * 
    + * + * CLUSTER_NOT_FOUND = 4; + */ + CLUSTER_NOT_FOUND(4), + /** + * + * + *
    +       * The provided topic wasn't found.
    +       * 
    + * + * TOPIC_NOT_FOUND = 5; + */ + TOPIC_NOT_FOUND(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
    +       * Default value. This value is unused.
    +       * 
    + * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +       * Ingestion is active.
    +       * 
    + * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + + /** + * + * + *
    +       * Permission denied encountered while consuming data from Amazon MSK.
    +       * 
    + * + * MSK_PERMISSION_DENIED = 2; + */ + public static final int MSK_PERMISSION_DENIED_VALUE = 2; + + /** + * + * + *
    +       * Permission denied encountered while publishing to the topic.
    +       * 
    + * + * PUBLISH_PERMISSION_DENIED = 3; + */ + public static final int PUBLISH_PERMISSION_DENIED_VALUE = 3; + + /** + * + * + *
    +       * The provided MSK cluster wasn't found.
    +       * 
    + * + * CLUSTER_NOT_FOUND = 4; + */ + public static final int CLUSTER_NOT_FOUND_VALUE = 4; + + /** + * + * + *
    +       * The provided topic wasn't found.
    +       * 
    + * + * TOPIC_NOT_FOUND = 5; + */ + public static final int TOPIC_NOT_FOUND_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return MSK_PERMISSION_DENIED; + case 3: + return PUBLISH_PERMISSION_DENIED; + case 4: + return CLUSTER_NOT_FOUND; + case 5: + return TOPIC_NOT_FOUND; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + + /** + * + * + *
    +     * Output only. An output-only field that indicates the state of the Amazon
    +     * MSK ingestion source.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
    +     * Output only. An output-only field that indicates the state of the Amazon
    +     * MSK ingestion source.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State getState() { + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State result = + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State.forNumber(state_); + return result == null + ? com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State.UNRECOGNIZED + : result; + } + + public static final int CLUSTER_ARN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object clusterArn_ = ""; + + /** + * + * + *
    +     * Required. The Amazon Resource Name (ARN) that uniquely identifies the
    +     * cluster.
    +     * 
    + * + * string cluster_arn = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterArn. + */ + @java.lang.Override + public java.lang.String getClusterArn() { + java.lang.Object ref = clusterArn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterArn_ = s; + return s; + } + } + + /** + * + * + *
    +     * Required. The Amazon Resource Name (ARN) that uniquely identifies the
    +     * cluster.
    +     * 
    + * + * string cluster_arn = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterArn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterArnBytes() { + java.lang.Object ref = clusterArn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOPIC_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object topic_ = ""; + + /** + * + * + *
    +     * Required. The name of the topic in the Amazon MSK cluster that Pub/Sub
    +     * will import from.
    +     * 
    + * + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The topic. + */ + @java.lang.Override + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } + } + + /** + * + * + *
    +     * Required. The name of the topic in the Amazon MSK cluster that Pub/Sub
    +     * will import from.
    +     * 
    + * + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for topic. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AWS_ROLE_ARN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object awsRoleArn_ = ""; + + /** + * + * + *
    +     * Required. AWS role ARN to be used for Federated Identity authentication
    +     * with Amazon MSK. Check the Pub/Sub docs for how to set up this role and
    +     * the required permissions that need to be attached to it.
    +     * 
    + * + * string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The awsRoleArn. + */ + @java.lang.Override + public java.lang.String getAwsRoleArn() { + java.lang.Object ref = awsRoleArn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + awsRoleArn_ = s; + return s; + } + } + + /** + * + * + *
    +     * Required. AWS role ARN to be used for Federated Identity authentication
    +     * with Amazon MSK. Check the Pub/Sub docs for how to set up this role and
    +     * the required permissions that need to be attached to it.
    +     * 
    + * + * string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for awsRoleArn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAwsRoleArnBytes() { + java.lang.Object ref = awsRoleArn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + awsRoleArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCP_SERVICE_ACCOUNT_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcpServiceAccount_ = ""; + + /** + * + * + *
    +     * Required. The GCP service account to be used for Federated Identity
    +     * authentication with Amazon MSK (via a `AssumeRoleWithWebIdentity` call
    +     * for the provided role). The `aws_role_arn` must be set up with
    +     * `accounts.google.com:sub` equals to this service account number.
    +     * 
    + * + * string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcpServiceAccount. + */ + @java.lang.Override + public java.lang.String getGcpServiceAccount() { + java.lang.Object ref = gcpServiceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcpServiceAccount_ = s; + return s; + } + } + + /** + * + * + *
    +     * Required. The GCP service account to be used for Federated Identity
    +     * authentication with Amazon MSK (via a `AssumeRoleWithWebIdentity` call
    +     * for the provided role). The `aws_role_arn` must be set up with
    +     * `accounts.google.com:sub` equals to this service account number.
    +     * 
    + * + * string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcpServiceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcpServiceAccountBytes() { + java.lang.Object ref = gcpServiceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcpServiceAccount_ = 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 (state_ + != com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterArn_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, clusterArn_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, topic_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(awsRoleArn_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, awsRoleArn_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gcpServiceAccount_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, gcpServiceAccount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterArn_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, clusterArn_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, topic_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(awsRoleArn_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, awsRoleArn_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gcpServiceAccount_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, gcpServiceAccount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk)) { + return super.equals(obj); + } + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk other = + (com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) obj; + + if (state_ != other.state_) return false; + if (!getClusterArn().equals(other.getClusterArn())) return false; + if (!getTopic().equals(other.getTopic())) return false; + if (!getAwsRoleArn().equals(other.getAwsRoleArn())) return false; + if (!getGcpServiceAccount().equals(other.getGcpServiceAccount())) 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) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + CLUSTER_ARN_FIELD_NUMBER; + hash = (53 * hash) + getClusterArn().hashCode(); + hash = (37 * hash) + TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getTopic().hashCode(); + hash = (37 * hash) + AWS_ROLE_ARN_FIELD_NUMBER; + hash = (53 * hash) + getAwsRoleArn().hashCode(); + hash = (37 * hash) + GCP_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getGcpServiceAccount().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * Ingestion settings for Amazon MSK.
    +     * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsMsk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsMsk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.class, + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.Builder.class); + } + + // Construct using com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + clusterArn_ = ""; + topic_ = ""; + awsRoleArn_ = ""; + gcpServiceAccount_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsMsk_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk getDefaultInstanceForType() { + return com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk build() { + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk buildPartial() { + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk result = + new com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clusterArn_ = clusterArn_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.topic_ = topic_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.awsRoleArn_ = awsRoleArn_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.gcpServiceAccount_ = gcpServiceAccount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) { + return mergeFrom((com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk other) { + if (other == com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.getDefaultInstance()) + return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getClusterArn().isEmpty()) { + clusterArn_ = other.clusterArn_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTopic().isEmpty()) { + topic_ = other.topic_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getAwsRoleArn().isEmpty()) { + awsRoleArn_ = other.awsRoleArn_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getGcpServiceAccount().isEmpty()) { + gcpServiceAccount_ = other.gcpServiceAccount_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + clusterArn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + topic_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + awsRoleArn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + gcpServiceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int state_ = 0; + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the Amazon
    +       * MSK ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the Amazon
    +       * MSK ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the Amazon
    +       * MSK ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State getState() { + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State result = + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State.forNumber(state_); + return result == null + ? com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the Amazon
    +       * MSK ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the Amazon
    +       * MSK ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object clusterArn_ = ""; + + /** + * + * + *
    +       * Required. The Amazon Resource Name (ARN) that uniquely identifies the
    +       * cluster.
    +       * 
    + * + * string cluster_arn = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterArn. + */ + public java.lang.String getClusterArn() { + java.lang.Object ref = clusterArn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterArn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Required. The Amazon Resource Name (ARN) that uniquely identifies the
    +       * cluster.
    +       * 
    + * + * string cluster_arn = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterArn. + */ + public com.google.protobuf.ByteString getClusterArnBytes() { + java.lang.Object ref = clusterArn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Required. The Amazon Resource Name (ARN) that uniquely identifies the
    +       * cluster.
    +       * 
    + * + * string cluster_arn = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The clusterArn to set. + * @return This builder for chaining. + */ + public Builder setClusterArn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clusterArn_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The Amazon Resource Name (ARN) that uniquely identifies the
    +       * cluster.
    +       * 
    + * + * string cluster_arn = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearClusterArn() { + clusterArn_ = getDefaultInstance().getClusterArn(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The Amazon Resource Name (ARN) that uniquely identifies the
    +       * cluster.
    +       * 
    + * + * string cluster_arn = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for clusterArn to set. + * @return This builder for chaining. + */ + public Builder setClusterArnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clusterArn_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object topic_ = ""; + + /** + * + * + *
    +       * Required. The name of the topic in the Amazon MSK cluster that Pub/Sub
    +       * will import from.
    +       * 
    + * + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The topic. + */ + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Required. The name of the topic in the Amazon MSK cluster that Pub/Sub
    +       * will import from.
    +       * 
    + * + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for topic. + */ + public com.google.protobuf.ByteString getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Required. The name of the topic in the Amazon MSK cluster that Pub/Sub
    +       * will import from.
    +       * 
    + * + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The topic to set. + * @return This builder for chaining. + */ + public Builder setTopic(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + topic_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The name of the topic in the Amazon MSK cluster that Pub/Sub
    +       * will import from.
    +       * 
    + * + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTopic() { + topic_ = getDefaultInstance().getTopic(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The name of the topic in the Amazon MSK cluster that Pub/Sub
    +       * will import from.
    +       * 
    + * + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for topic to set. + * @return This builder for chaining. + */ + public Builder setTopicBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + topic_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object awsRoleArn_ = ""; + + /** + * + * + *
    +       * Required. AWS role ARN to be used for Federated Identity authentication
    +       * with Amazon MSK. Check the Pub/Sub docs for how to set up this role and
    +       * the required permissions that need to be attached to it.
    +       * 
    + * + * string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The awsRoleArn. + */ + public java.lang.String getAwsRoleArn() { + java.lang.Object ref = awsRoleArn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + awsRoleArn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Required. AWS role ARN to be used for Federated Identity authentication
    +       * with Amazon MSK. Check the Pub/Sub docs for how to set up this role and
    +       * the required permissions that need to be attached to it.
    +       * 
    + * + * string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for awsRoleArn. + */ + public com.google.protobuf.ByteString getAwsRoleArnBytes() { + java.lang.Object ref = awsRoleArn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + awsRoleArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Required. AWS role ARN to be used for Federated Identity authentication
    +       * with Amazon MSK. Check the Pub/Sub docs for how to set up this role and
    +       * the required permissions that need to be attached to it.
    +       * 
    + * + * string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The awsRoleArn to set. + * @return This builder for chaining. + */ + public Builder setAwsRoleArn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + awsRoleArn_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. AWS role ARN to be used for Federated Identity authentication
    +       * with Amazon MSK. Check the Pub/Sub docs for how to set up this role and
    +       * the required permissions that need to be attached to it.
    +       * 
    + * + * string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAwsRoleArn() { + awsRoleArn_ = getDefaultInstance().getAwsRoleArn(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. AWS role ARN to be used for Federated Identity authentication
    +       * with Amazon MSK. Check the Pub/Sub docs for how to set up this role and
    +       * the required permissions that need to be attached to it.
    +       * 
    + * + * string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for awsRoleArn to set. + * @return This builder for chaining. + */ + public Builder setAwsRoleArnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + awsRoleArn_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object gcpServiceAccount_ = ""; + + /** + * + * + *
    +       * Required. The GCP service account to be used for Federated Identity
    +       * authentication with Amazon MSK (via a `AssumeRoleWithWebIdentity` call
    +       * for the provided role). The `aws_role_arn` must be set up with
    +       * `accounts.google.com:sub` equals to this service account number.
    +       * 
    + * + * string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcpServiceAccount. + */ + public java.lang.String getGcpServiceAccount() { + java.lang.Object ref = gcpServiceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcpServiceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Required. The GCP service account to be used for Federated Identity
    +       * authentication with Amazon MSK (via a `AssumeRoleWithWebIdentity` call
    +       * for the provided role). The `aws_role_arn` must be set up with
    +       * `accounts.google.com:sub` equals to this service account number.
    +       * 
    + * + * string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcpServiceAccount. + */ + public com.google.protobuf.ByteString getGcpServiceAccountBytes() { + java.lang.Object ref = gcpServiceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcpServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Required. The GCP service account to be used for Federated Identity
    +       * authentication with Amazon MSK (via a `AssumeRoleWithWebIdentity` call
    +       * for the provided role). The `aws_role_arn` must be set up with
    +       * `accounts.google.com:sub` equals to this service account number.
    +       * 
    + * + * string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The gcpServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setGcpServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcpServiceAccount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The GCP service account to be used for Federated Identity
    +       * authentication with Amazon MSK (via a `AssumeRoleWithWebIdentity` call
    +       * for the provided role). The `aws_role_arn` must be set up with
    +       * `accounts.google.com:sub` equals to this service account number.
    +       * 
    + * + * string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGcpServiceAccount() { + gcpServiceAccount_ = getDefaultInstance().getGcpServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The GCP service account to be used for Federated Identity
    +       * authentication with Amazon MSK (via a `AssumeRoleWithWebIdentity` call
    +       * for the provided role). The `aws_role_arn` must be set up with
    +       * `accounts.google.com:sub` equals to this service account number.
    +       * 
    + * + * string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for gcpServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setGcpServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcpServiceAccount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) + private static final com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk(); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsMsk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConfluentCloudOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Output only. An output-only field that indicates the state of the
    +     * Confluent Cloud ingestion source.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
    +     * Output only. An output-only field that indicates the state of the
    +     * Confluent Cloud ingestion source.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State getState(); + + /** + * + * + *
    +     * Required. The address of the bootstrap server. The format is url:port.
    +     * 
    + * + * string bootstrap_server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bootstrapServer. + */ + java.lang.String getBootstrapServer(); + + /** + * + * + *
    +     * Required. The address of the bootstrap server. The format is url:port.
    +     * 
    + * + * string bootstrap_server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bootstrapServer. + */ + com.google.protobuf.ByteString getBootstrapServerBytes(); + + /** + * + * + *
    +     * Required. The id of the cluster.
    +     * 
    + * + * string cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterId. + */ + java.lang.String getClusterId(); + + /** + * + * + *
    +     * Required. The id of the cluster.
    +     * 
    + * + * string cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterId. + */ + com.google.protobuf.ByteString getClusterIdBytes(); + + /** + * + * + *
    +     * Required. The name of the topic in the Confluent Cloud cluster that
    +     * Pub/Sub will import from.
    +     * 
    + * + * string topic = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The topic. + */ + java.lang.String getTopic(); + + /** + * + * + *
    +     * Required. The name of the topic in the Confluent Cloud cluster that
    +     * Pub/Sub will import from.
    +     * 
    + * + * string topic = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for topic. + */ + com.google.protobuf.ByteString getTopicBytes(); + + /** + * + * + *
    +     * Required. The id of the identity pool to be used for Federated Identity
    +     * authentication with Confluent Cloud. See
    +     * https://docs.confluent.io/cloud/current/security/authenticate/workload-identities/identity-providers/oauth/identity-pools.html#add-oauth-identity-pools.
    +     * 
    + * + * string identity_pool_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The identityPoolId. + */ + java.lang.String getIdentityPoolId(); + + /** + * + * + *
    +     * Required. The id of the identity pool to be used for Federated Identity
    +     * authentication with Confluent Cloud. See
    +     * https://docs.confluent.io/cloud/current/security/authenticate/workload-identities/identity-providers/oauth/identity-pools.html#add-oauth-identity-pools.
    +     * 
    + * + * string identity_pool_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for identityPoolId. + */ + com.google.protobuf.ByteString getIdentityPoolIdBytes(); + + /** + * + * + *
    +     * Required. The GCP service account to be used for Federated Identity
    +     * authentication with `identity_pool_id`.
    +     * 
    + * + * string gcp_service_account = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcpServiceAccount. + */ + java.lang.String getGcpServiceAccount(); + + /** + * + * + *
    +     * Required. The GCP service account to be used for Federated Identity
    +     * authentication with `identity_pool_id`.
    +     * 
    + * + * string gcp_service_account = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcpServiceAccount. + */ + com.google.protobuf.ByteString getGcpServiceAccountBytes(); + } + + /** + * + * + *
    +   * Ingestion settings for Confluent Cloud.
    +   * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} + */ + public static final class ConfluentCloud extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) + ConfluentCloudOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ConfluentCloud"); + } + + // Use ConfluentCloud.newBuilder() to construct. + private ConfluentCloud(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ConfluentCloud() { + state_ = 0; + bootstrapServer_ = ""; + clusterId_ = ""; + topic_ = ""; + identityPoolId_ = ""; + gcpServiceAccount_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_ConfluentCloud_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_ConfluentCloud_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.class, + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.Builder.class); + } + + /** + * + * + *
    +     * Possible states for managed ingestion from Confluent Cloud.
    +     * 
    + * + * Protobuf enum {@code google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +       * Default value. This value is unused.
    +       * 
    + * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
    +       * Ingestion is active.
    +       * 
    + * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
    +       * Permission denied encountered while consuming data from Confluent
    +       * Cloud.
    +       * 
    + * + * CONFLUENT_CLOUD_PERMISSION_DENIED = 2; + */ + CONFLUENT_CLOUD_PERMISSION_DENIED(2), + /** + * + * + *
    +       * Permission denied encountered while publishing to the topic.
    +       * 
    + * + * PUBLISH_PERMISSION_DENIED = 3; + */ + PUBLISH_PERMISSION_DENIED(3), + /** + * + * + *
    +       * The provided bootstrap server address is unreachable.
    +       * 
    + * + * UNREACHABLE_BOOTSTRAP_SERVER = 4; + */ + UNREACHABLE_BOOTSTRAP_SERVER(4), + /** + * + * + *
    +       * The provided cluster wasn't found.
    +       * 
    + * + * CLUSTER_NOT_FOUND = 5; + */ + CLUSTER_NOT_FOUND(5), + /** + * + * + *
    +       * The provided topic wasn't found.
    +       * 
    + * + * TOPIC_NOT_FOUND = 6; + */ + TOPIC_NOT_FOUND(6), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
    +       * Default value. This value is unused.
    +       * 
    + * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +       * Ingestion is active.
    +       * 
    + * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + + /** + * + * + *
    +       * Permission denied encountered while consuming data from Confluent
    +       * Cloud.
    +       * 
    + * + * CONFLUENT_CLOUD_PERMISSION_DENIED = 2; + */ + public static final int CONFLUENT_CLOUD_PERMISSION_DENIED_VALUE = 2; + + /** + * + * + *
    +       * Permission denied encountered while publishing to the topic.
    +       * 
    + * + * PUBLISH_PERMISSION_DENIED = 3; + */ + public static final int PUBLISH_PERMISSION_DENIED_VALUE = 3; + + /** + * + * + *
    +       * The provided bootstrap server address is unreachable.
    +       * 
    + * + * UNREACHABLE_BOOTSTRAP_SERVER = 4; + */ + public static final int UNREACHABLE_BOOTSTRAP_SERVER_VALUE = 4; + + /** + * + * + *
    +       * The provided cluster wasn't found.
    +       * 
    + * + * CLUSTER_NOT_FOUND = 5; + */ + public static final int CLUSTER_NOT_FOUND_VALUE = 5; + + /** + * + * + *
    +       * The provided topic wasn't found.
    +       * 
    + * + * TOPIC_NOT_FOUND = 6; + */ + public static final int TOPIC_NOT_FOUND_VALUE = 6; + + 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 State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return CONFLUENT_CLOUD_PERMISSION_DENIED; + case 3: + return PUBLISH_PERMISSION_DENIED; + case 4: + return UNREACHABLE_BOOTSTRAP_SERVER; + case 5: + return CLUSTER_NOT_FOUND; + case 6: + return TOPIC_NOT_FOUND; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + + /** + * + * + *
    +     * Output only. An output-only field that indicates the state of the
    +     * Confluent Cloud ingestion source.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
    +     * Output only. An output-only field that indicates the state of the
    +     * Confluent Cloud ingestion source.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State getState() { + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State result = + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State.forNumber(state_); + return result == null + ? com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State.UNRECOGNIZED + : result; + } + + public static final int BOOTSTRAP_SERVER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object bootstrapServer_ = ""; + + /** + * + * + *
    +     * Required. The address of the bootstrap server. The format is url:port.
    +     * 
    + * + * string bootstrap_server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bootstrapServer. + */ + @java.lang.Override + public java.lang.String getBootstrapServer() { + java.lang.Object ref = bootstrapServer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bootstrapServer_ = s; + return s; + } + } + + /** + * + * + *
    +     * Required. The address of the bootstrap server. The format is url:port.
    +     * 
    + * + * string bootstrap_server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bootstrapServer. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBootstrapServerBytes() { + java.lang.Object ref = bootstrapServer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bootstrapServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object clusterId_ = ""; + + /** + * + * + *
    +     * Required. The id of the cluster.
    +     * 
    + * + * string cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterId. + */ + @java.lang.Override + public java.lang.String getClusterId() { + java.lang.Object ref = clusterId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterId_ = s; + return s; + } + } + + /** + * + * + *
    +     * Required. The id of the cluster.
    +     * 
    + * + * string cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterIdBytes() { + java.lang.Object ref = clusterId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOPIC_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object topic_ = ""; + + /** + * + * + *
    +     * Required. The name of the topic in the Confluent Cloud cluster that
    +     * Pub/Sub will import from.
    +     * 
    + * + * string topic = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The topic. + */ + @java.lang.Override + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } + } + + /** + * + * + *
    +     * Required. The name of the topic in the Confluent Cloud cluster that
    +     * Pub/Sub will import from.
    +     * 
    + * + * string topic = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for topic. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IDENTITY_POOL_ID_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object identityPoolId_ = ""; + + /** + * + * + *
    +     * Required. The id of the identity pool to be used for Federated Identity
    +     * authentication with Confluent Cloud. See
    +     * https://docs.confluent.io/cloud/current/security/authenticate/workload-identities/identity-providers/oauth/identity-pools.html#add-oauth-identity-pools.
    +     * 
    + * + * string identity_pool_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The identityPoolId. + */ + @java.lang.Override + public java.lang.String getIdentityPoolId() { + java.lang.Object ref = identityPoolId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + identityPoolId_ = s; + return s; + } + } + + /** + * + * + *
    +     * Required. The id of the identity pool to be used for Federated Identity
    +     * authentication with Confluent Cloud. See
    +     * https://docs.confluent.io/cloud/current/security/authenticate/workload-identities/identity-providers/oauth/identity-pools.html#add-oauth-identity-pools.
    +     * 
    + * + * string identity_pool_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for identityPoolId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdentityPoolIdBytes() { + java.lang.Object ref = identityPoolId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identityPoolId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCP_SERVICE_ACCOUNT_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcpServiceAccount_ = ""; + + /** + * + * + *
    +     * Required. The GCP service account to be used for Federated Identity
    +     * authentication with `identity_pool_id`.
    +     * 
    + * + * string gcp_service_account = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcpServiceAccount. + */ + @java.lang.Override + public java.lang.String getGcpServiceAccount() { + java.lang.Object ref = gcpServiceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcpServiceAccount_ = s; + return s; + } + } + + /** + * + * + *
    +     * Required. The GCP service account to be used for Federated Identity
    +     * authentication with `identity_pool_id`.
    +     * 
    + * + * string gcp_service_account = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcpServiceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcpServiceAccountBytes() { + java.lang.Object ref = gcpServiceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcpServiceAccount_ = 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 (state_ + != com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bootstrapServer_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, bootstrapServer_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, clusterId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, topic_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(identityPoolId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, identityPoolId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gcpServiceAccount_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, gcpServiceAccount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bootstrapServer_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, bootstrapServer_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, clusterId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, topic_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(identityPoolId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, identityPoolId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gcpServiceAccount_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, gcpServiceAccount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud)) { + return super.equals(obj); + } + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud other = + (com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) obj; + + if (state_ != other.state_) return false; + if (!getBootstrapServer().equals(other.getBootstrapServer())) return false; + if (!getClusterId().equals(other.getClusterId())) return false; + if (!getTopic().equals(other.getTopic())) return false; + if (!getIdentityPoolId().equals(other.getIdentityPoolId())) return false; + if (!getGcpServiceAccount().equals(other.getGcpServiceAccount())) 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) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + BOOTSTRAP_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getBootstrapServer().hashCode(); + hash = (37 * hash) + CLUSTER_ID_FIELD_NUMBER; + hash = (53 * hash) + getClusterId().hashCode(); + hash = (37 * hash) + TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getTopic().hashCode(); + hash = (37 * hash) + IDENTITY_POOL_ID_FIELD_NUMBER; + hash = (53 * hash) + getIdentityPoolId().hashCode(); + hash = (37 * hash) + GCP_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getGcpServiceAccount().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * Ingestion settings for Confluent Cloud.
    +     * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloudOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_ConfluentCloud_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_ConfluentCloud_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.class, + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.Builder.class); + } + + // Construct using + // com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + bootstrapServer_ = ""; + clusterId_ = ""; + topic_ = ""; + identityPoolId_ = ""; + gcpServiceAccount_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_ConfluentCloud_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + getDefaultInstanceForType() { + return com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud build() { + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud buildPartial() { + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud result = + new com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.bootstrapServer_ = bootstrapServer_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.clusterId_ = clusterId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.topic_ = topic_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.identityPoolId_ = identityPoolId_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.gcpServiceAccount_ = gcpServiceAccount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) { + return mergeFrom((com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud other) { + if (other + == com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.getDefaultInstance()) + return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getBootstrapServer().isEmpty()) { + bootstrapServer_ = other.bootstrapServer_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getClusterId().isEmpty()) { + clusterId_ = other.clusterId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTopic().isEmpty()) { + topic_ = other.topic_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getIdentityPoolId().isEmpty()) { + identityPoolId_ = other.identityPoolId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getGcpServiceAccount().isEmpty()) { + gcpServiceAccount_ = other.gcpServiceAccount_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + bootstrapServer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + clusterId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + topic_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + identityPoolId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + gcpServiceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int state_ = 0; + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the
    +       * Confluent Cloud ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the
    +       * Confluent Cloud ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the
    +       * Confluent Cloud ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State getState() { + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State result = + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State.forNumber(state_); + return result == null + ? com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the
    +       * Confluent Cloud ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Output only. An output-only field that indicates the state of the
    +       * Confluent Cloud ingestion source.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object bootstrapServer_ = ""; + + /** + * + * + *
    +       * Required. The address of the bootstrap server. The format is url:port.
    +       * 
    + * + * string bootstrap_server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bootstrapServer. + */ + public java.lang.String getBootstrapServer() { + java.lang.Object ref = bootstrapServer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bootstrapServer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Required. The address of the bootstrap server. The format is url:port.
    +       * 
    + * + * string bootstrap_server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bootstrapServer. + */ + public com.google.protobuf.ByteString getBootstrapServerBytes() { + java.lang.Object ref = bootstrapServer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bootstrapServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Required. The address of the bootstrap server. The format is url:port.
    +       * 
    + * + * string bootstrap_server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bootstrapServer to set. + * @return This builder for chaining. + */ + public Builder setBootstrapServer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bootstrapServer_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The address of the bootstrap server. The format is url:port.
    +       * 
    + * + * string bootstrap_server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBootstrapServer() { + bootstrapServer_ = getDefaultInstance().getBootstrapServer(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The address of the bootstrap server. The format is url:port.
    +       * 
    + * + * string bootstrap_server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for bootstrapServer to set. + * @return This builder for chaining. + */ + public Builder setBootstrapServerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + bootstrapServer_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object clusterId_ = ""; + + /** + * + * + *
    +       * Required. The id of the cluster.
    +       * 
    + * + * string cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterId. + */ + public java.lang.String getClusterId() { + java.lang.Object ref = clusterId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Required. The id of the cluster.
    +       * 
    + * + * string cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterId. + */ + public com.google.protobuf.ByteString getClusterIdBytes() { + java.lang.Object ref = clusterId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Required. The id of the cluster.
    +       * 
    + * + * string cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The clusterId to set. + * @return This builder for chaining. + */ + public Builder setClusterId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clusterId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The id of the cluster.
    +       * 
    + * + * string cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearClusterId() { + clusterId_ = getDefaultInstance().getClusterId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The id of the cluster.
    +       * 
    + * + * string cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for clusterId to set. + * @return This builder for chaining. + */ + public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clusterId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object topic_ = ""; + + /** + * + * + *
    +       * Required. The name of the topic in the Confluent Cloud cluster that
    +       * Pub/Sub will import from.
    +       * 
    + * + * string topic = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The topic. + */ + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Required. The name of the topic in the Confluent Cloud cluster that
    +       * Pub/Sub will import from.
    +       * 
    + * + * string topic = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for topic. + */ + public com.google.protobuf.ByteString getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Required. The name of the topic in the Confluent Cloud cluster that
    +       * Pub/Sub will import from.
    +       * 
    + * + * string topic = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The topic to set. + * @return This builder for chaining. + */ + public Builder setTopic(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + topic_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The name of the topic in the Confluent Cloud cluster that
    +       * Pub/Sub will import from.
    +       * 
    + * + * string topic = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTopic() { + topic_ = getDefaultInstance().getTopic(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The name of the topic in the Confluent Cloud cluster that
    +       * Pub/Sub will import from.
    +       * 
    + * + * string topic = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for topic to set. + * @return This builder for chaining. + */ + public Builder setTopicBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + topic_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object identityPoolId_ = ""; + + /** + * + * + *
    +       * Required. The id of the identity pool to be used for Federated Identity
    +       * authentication with Confluent Cloud. See
    +       * https://docs.confluent.io/cloud/current/security/authenticate/workload-identities/identity-providers/oauth/identity-pools.html#add-oauth-identity-pools.
    +       * 
    + * + * string identity_pool_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The identityPoolId. + */ + public java.lang.String getIdentityPoolId() { + java.lang.Object ref = identityPoolId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + identityPoolId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Required. The id of the identity pool to be used for Federated Identity
    +       * authentication with Confluent Cloud. See
    +       * https://docs.confluent.io/cloud/current/security/authenticate/workload-identities/identity-providers/oauth/identity-pools.html#add-oauth-identity-pools.
    +       * 
    + * + * string identity_pool_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for identityPoolId. + */ + public com.google.protobuf.ByteString getIdentityPoolIdBytes() { + java.lang.Object ref = identityPoolId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identityPoolId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Required. The id of the identity pool to be used for Federated Identity
    +       * authentication with Confluent Cloud. See
    +       * https://docs.confluent.io/cloud/current/security/authenticate/workload-identities/identity-providers/oauth/identity-pools.html#add-oauth-identity-pools.
    +       * 
    + * + * string identity_pool_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The identityPoolId to set. + * @return This builder for chaining. + */ + public Builder setIdentityPoolId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + identityPoolId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The id of the identity pool to be used for Federated Identity
    +       * authentication with Confluent Cloud. See
    +       * https://docs.confluent.io/cloud/current/security/authenticate/workload-identities/identity-providers/oauth/identity-pools.html#add-oauth-identity-pools.
    +       * 
    + * + * string identity_pool_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearIdentityPoolId() { + identityPoolId_ = getDefaultInstance().getIdentityPoolId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The id of the identity pool to be used for Federated Identity
    +       * authentication with Confluent Cloud. See
    +       * https://docs.confluent.io/cloud/current/security/authenticate/workload-identities/identity-providers/oauth/identity-pools.html#add-oauth-identity-pools.
    +       * 
    + * + * string identity_pool_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for identityPoolId to set. + * @return This builder for chaining. + */ + public Builder setIdentityPoolIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + identityPoolId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object gcpServiceAccount_ = ""; + + /** + * + * + *
    +       * Required. The GCP service account to be used for Federated Identity
    +       * authentication with `identity_pool_id`.
    +       * 
    + * + * string gcp_service_account = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcpServiceAccount. + */ + public java.lang.String getGcpServiceAccount() { + java.lang.Object ref = gcpServiceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcpServiceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Required. The GCP service account to be used for Federated Identity
    +       * authentication with `identity_pool_id`.
    +       * 
    + * + * string gcp_service_account = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcpServiceAccount. + */ + public com.google.protobuf.ByteString getGcpServiceAccountBytes() { + java.lang.Object ref = gcpServiceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcpServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Required. The GCP service account to be used for Federated Identity
    +       * authentication with `identity_pool_id`.
    +       * 
    + * + * string gcp_service_account = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The gcpServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setGcpServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcpServiceAccount_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The GCP service account to be used for Federated Identity
    +       * authentication with `identity_pool_id`.
    +       * 
    + * + * string gcp_service_account = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGcpServiceAccount() { + gcpServiceAccount_ = getDefaultInstance().getGcpServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The GCP service account to be used for Federated Identity
    +       * authentication with `identity_pool_id`.
    +       * 
    + * + * string gcp_service_account = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for gcpServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setGcpServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcpServiceAccount_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) + private static final com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud(); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfluentCloud parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AWS_KINESIS(1), + CLOUD_STORAGE(2), + AZURE_EVENT_HUBS(3), + AWS_MSK(5), + CONFLUENT_CLOUD(6), + SOURCE_NOT_SET(0); + private final int value; + + 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. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: + return AWS_KINESIS; + case 2: + return CLOUD_STORAGE; + case 3: + return AZURE_EVENT_HUBS; + case 5: + return AWS_MSK; + case 6: + return CONFLUENT_CLOUD; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int AWS_KINESIS_FIELD_NUMBER = 1; + + /** + * + * + *
    +   * Optional. Amazon Kinesis Data Streams.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the awsKinesis field is set. + */ + @java.lang.Override + public boolean hasAwsKinesis() { + return sourceCase_ == 1; + } + + /** + * + * + *
    +   * Optional. Amazon Kinesis Data Streams.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The awsKinesis. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis getAwsKinesis() { + if (sourceCase_ == 1) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. Amazon Kinesis Data Streams.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisOrBuilder + getAwsKinesisOrBuilder() { + if (sourceCase_ == 1) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDefaultInstance(); + } + + public static final int CLOUD_STORAGE_FIELD_NUMBER = 2; + + /** + * + * + *
    +   * Optional. Cloud Storage.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cloudStorage field is set. + */ + @java.lang.Override + public boolean hasCloudStorage() { + return sourceCase_ == 2; + } + + /** + * + * + *
    +   * Optional. Cloud Storage.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cloudStorage. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage getCloudStorage() { + if (sourceCase_ == 2) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. Cloud Storage.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageOrBuilder + getCloudStorageOrBuilder() { + if (sourceCase_ == 2) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDefaultInstance(); + } + + public static final int AZURE_EVENT_HUBS_FIELD_NUMBER = 3; + + /** + * + * + *
    +   * Optional. Azure Event Hubs.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the azureEventHubs field is set. + */ + @java.lang.Override + public boolean hasAzureEventHubs() { + return sourceCase_ == 3; + } + + /** + * + * + *
    +   * Optional. Azure Event Hubs.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The azureEventHubs. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs getAzureEventHubs() { + if (sourceCase_ == 3) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. Azure Event Hubs.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubsOrBuilder + getAzureEventHubsOrBuilder() { + if (sourceCase_ == 3) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.getDefaultInstance(); + } + + public static final int AWS_MSK_FIELD_NUMBER = 5; + + /** + * + * + *
    +   * Optional. Amazon MSK.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the awsMsk field is set. + */ + @java.lang.Override + public boolean hasAwsMsk() { + return sourceCase_ == 5; + } + + /** + * + * + *
    +   * Optional. Amazon MSK.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The awsMsk. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk getAwsMsk() { + if (sourceCase_ == 5) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. Amazon MSK.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsMskOrBuilder getAwsMskOrBuilder() { + if (sourceCase_ == 5) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.getDefaultInstance(); + } + + public static final int CONFLUENT_CLOUD_FIELD_NUMBER = 6; + + /** + * + * + *
    +   * Optional. Confluent Cloud.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the confluentCloud field is set. + */ + @java.lang.Override + public boolean hasConfluentCloud() { + return sourceCase_ == 6; + } + + /** + * + * + *
    +   * Optional. Confluent Cloud.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The confluentCloud. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud getConfluentCloud() { + if (sourceCase_ == 6) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. Confluent Cloud.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloudOrBuilder + getConfluentCloudOrBuilder() { + if (sourceCase_ == 6) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.getDefaultInstance(); + } + + public static final int PLATFORM_LOGS_SETTINGS_FIELD_NUMBER = 4; + private com.google.pubsub.v1.PlatformLogsSettings platformLogsSettings_; + + /** + * + * + *
    +   * Optional. Platform Logs settings. If unset, no Platform Logs will be
    +   * generated.
    +   * 
    + * + * + * .google.pubsub.v1.PlatformLogsSettings platform_logs_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the platformLogsSettings field is set. + */ + @java.lang.Override + public boolean hasPlatformLogsSettings() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Optional. Platform Logs settings. If unset, no Platform Logs will be
    +   * generated.
    +   * 
    + * + * + * .google.pubsub.v1.PlatformLogsSettings platform_logs_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The platformLogsSettings. + */ + @java.lang.Override + public com.google.pubsub.v1.PlatformLogsSettings getPlatformLogsSettings() { + return platformLogsSettings_ == null + ? com.google.pubsub.v1.PlatformLogsSettings.getDefaultInstance() + : platformLogsSettings_; + } + + /** + * + * + *
    +   * Optional. Platform Logs settings. If unset, no Platform Logs will be
    +   * generated.
    +   * 
    + * + * + * .google.pubsub.v1.PlatformLogsSettings platform_logs_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.PlatformLogsSettingsOrBuilder getPlatformLogsSettingsOrBuilder() { + return platformLogsSettings_ == null + ? com.google.pubsub.v1.PlatformLogsSettings.getDefaultInstance() + : platformLogsSettings_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (sourceCase_ == 1) { + output.writeMessage(1, (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_); + } + if (sourceCase_ == 2) { + output.writeMessage( + 2, (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_); + } + if (sourceCase_ == 3) { + output.writeMessage( + 3, (com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) source_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getPlatformLogsSettings()); + } + if (sourceCase_ == 5) { + output.writeMessage(5, (com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) source_); + } + if (sourceCase_ == 6) { + output.writeMessage( + 6, (com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) source_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_); + } + if (sourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_); + } + if (sourceCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) source_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPlatformLogsSettings()); + } + if (sourceCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) source_); + } + if (sourceCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) source_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.IngestionDataSourceSettings)) { + return super.equals(obj); + } + com.google.pubsub.v1.IngestionDataSourceSettings other = + (com.google.pubsub.v1.IngestionDataSourceSettings) obj; + + if (hasPlatformLogsSettings() != other.hasPlatformLogsSettings()) return false; + if (hasPlatformLogsSettings()) { + if (!getPlatformLogsSettings().equals(other.getPlatformLogsSettings())) return false; + } + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 1: + if (!getAwsKinesis().equals(other.getAwsKinesis())) return false; + break; + case 2: + if (!getCloudStorage().equals(other.getCloudStorage())) return false; + break; + case 3: + if (!getAzureEventHubs().equals(other.getAzureEventHubs())) return false; + break; + case 5: + if (!getAwsMsk().equals(other.getAwsMsk())) return false; + break; + case 6: + if (!getConfluentCloud().equals(other.getConfluentCloud())) return false; + break; case 0: default: } @@ -6802,6 +13232,18 @@ public int hashCode() { hash = (37 * hash) + CLOUD_STORAGE_FIELD_NUMBER; hash = (53 * hash) + getCloudStorage().hashCode(); break; + case 3: + hash = (37 * hash) + AZURE_EVENT_HUBS_FIELD_NUMBER; + hash = (53 * hash) + getAzureEventHubs().hashCode(); + break; + case 5: + hash = (37 * hash) + AWS_MSK_FIELD_NUMBER; + hash = (53 * hash) + getAwsMsk().hashCode(); + break; + case 6: + hash = (37 * hash) + CONFLUENT_CLOUD_FIELD_NUMBER; + hash = (53 * hash) + getConfluentCloud().hashCode(); + break; case 0: default: } @@ -6847,444 +13289,1198 @@ public static com.google.pubsub.v1.IngestionDataSourceSettings parseFrom( public static com.google.pubsub.v1.IngestionDataSourceSettings parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionDataSourceSettings parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionDataSourceSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.pubsub.v1.IngestionDataSourceSettings parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.pubsub.v1.IngestionDataSourceSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * Settings for an ingestion data source on a topic.
    +   * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings) + com.google.pubsub.v1.IngestionDataSourceSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionDataSourceSettings.class, + com.google.pubsub.v1.IngestionDataSourceSettings.Builder.class); + } + + // Construct using com.google.pubsub.v1.IngestionDataSourceSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPlatformLogsSettingsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (awsKinesisBuilder_ != null) { + awsKinesisBuilder_.clear(); + } + if (cloudStorageBuilder_ != null) { + cloudStorageBuilder_.clear(); + } + if (azureEventHubsBuilder_ != null) { + azureEventHubsBuilder_.clear(); + } + if (awsMskBuilder_ != null) { + awsMskBuilder_.clear(); + } + if (confluentCloudBuilder_ != null) { + confluentCloudBuilder_.clear(); + } + platformLogsSettings_ = null; + if (platformLogsSettingsBuilder_ != null) { + platformLogsSettingsBuilder_.dispose(); + platformLogsSettingsBuilder_ = null; + } + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings getDefaultInstanceForType() { + return com.google.pubsub.v1.IngestionDataSourceSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings build() { + com.google.pubsub.v1.IngestionDataSourceSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings buildPartial() { + com.google.pubsub.v1.IngestionDataSourceSettings result = + new com.google.pubsub.v1.IngestionDataSourceSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.pubsub.v1.IngestionDataSourceSettings result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.platformLogsSettings_ = + platformLogsSettingsBuilder_ == null + ? platformLogsSettings_ + : platformLogsSettingsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.pubsub.v1.IngestionDataSourceSettings result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + if (sourceCase_ == 1 && awsKinesisBuilder_ != null) { + result.source_ = awsKinesisBuilder_.build(); + } + if (sourceCase_ == 2 && cloudStorageBuilder_ != null) { + result.source_ = cloudStorageBuilder_.build(); + } + if (sourceCase_ == 3 && azureEventHubsBuilder_ != null) { + result.source_ = azureEventHubsBuilder_.build(); + } + if (sourceCase_ == 5 && awsMskBuilder_ != null) { + result.source_ = awsMskBuilder_.build(); + } + if (sourceCase_ == 6 && confluentCloudBuilder_ != null) { + result.source_ = confluentCloudBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.IngestionDataSourceSettings) { + return mergeFrom((com.google.pubsub.v1.IngestionDataSourceSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.IngestionDataSourceSettings other) { + if (other == com.google.pubsub.v1.IngestionDataSourceSettings.getDefaultInstance()) + return this; + if (other.hasPlatformLogsSettings()) { + mergePlatformLogsSettings(other.getPlatformLogsSettings()); + } + switch (other.getSourceCase()) { + case AWS_KINESIS: + { + mergeAwsKinesis(other.getAwsKinesis()); + break; + } + case CLOUD_STORAGE: + { + mergeCloudStorage(other.getCloudStorage()); + break; + } + case AZURE_EVENT_HUBS: + { + mergeAzureEventHubs(other.getAzureEventHubs()); + break; + } + case AWS_MSK: + { + mergeAwsMsk(other.getAwsMsk()); + break; + } + case CONFLUENT_CLOUD: + { + mergeConfluentCloud(other.getConfluentCloud()); + break; + } + case SOURCE_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( + internalGetAwsKinesisFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCloudStorageFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetAzureEventHubsFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetPlatformLogsSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 34 + case 42: + { + input.readMessage(internalGetAwsMskFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetConfluentCloudFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 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 sourceCase_ = 0; + private java.lang.Object source_; - public static com.google.pubsub.v1.IngestionDataSourceSettings parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } - public static com.google.pubsub.v1.IngestionDataSourceSettings parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } - public static com.google.pubsub.v1.IngestionDataSourceSettings parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + private int bitField0_; - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis, + com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisOrBuilder> + awsKinesisBuilder_; - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
    +     * Optional. Amazon Kinesis Data Streams.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the awsKinesis field is set. + */ + @java.lang.Override + public boolean hasAwsKinesis() { + return sourceCase_ == 1; + } - public static Builder newBuilder(com.google.pubsub.v1.IngestionDataSourceSettings prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
    +     * Optional. Amazon Kinesis Data Streams.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The awsKinesis. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis getAwsKinesis() { + if (awsKinesisBuilder_ == null) { + if (sourceCase_ == 1) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDefaultInstance(); + } else { + if (sourceCase_ == 1) { + return awsKinesisBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDefaultInstance(); + } + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
    +     * Optional. Amazon Kinesis Data Streams.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAwsKinesis( + com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis value) { + if (awsKinesisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + awsKinesisBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
    -   * Settings for an ingestion data source on a topic.
    -   * 
    - * - * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionDataSourceSettings) - com.google.pubsub.v1.IngestionDataSourceSettingsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor; + /** + * + * + *
    +     * Optional. Amazon Kinesis Data Streams.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAwsKinesis( + com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.Builder builderForValue) { + if (awsKinesisBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + awsKinesisBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 1; + return this; } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_IngestionDataSourceSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.IngestionDataSourceSettings.class, - com.google.pubsub.v1.IngestionDataSourceSettings.Builder.class); + /** + * + * + *
    +     * Optional. Amazon Kinesis Data Streams.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAwsKinesis( + com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis value) { + if (awsKinesisBuilder_ == null) { + if (sourceCase_ == 1 + && source_ + != com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis + .getDefaultInstance()) { + source_ = + com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.newBuilder( + (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 1) { + awsKinesisBuilder_.mergeFrom(value); + } else { + awsKinesisBuilder_.setMessage(value); + } + } + sourceCase_ = 1; + return this; } - // Construct using com.google.pubsub.v1.IngestionDataSourceSettings.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + /** + * + * + *
    +     * Optional. Amazon Kinesis Data Streams.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAwsKinesis() { + if (awsKinesisBuilder_ == null) { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + } + awsKinesisBuilder_.clear(); + } + return this; } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + /** + * + * + *
    +     * Optional. Amazon Kinesis Data Streams.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.Builder + getAwsKinesisBuilder() { + return internalGetAwsKinesisFieldBuilder().getBuilder(); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPlatformLogsSettingsFieldBuilder(); + /** + * + * + *
    +     * Optional. Amazon Kinesis Data Streams.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisOrBuilder + getAwsKinesisOrBuilder() { + if ((sourceCase_ == 1) && (awsKinesisBuilder_ != null)) { + return awsKinesisBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 1) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDefaultInstance(); } } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (awsKinesisBuilder_ != null) { - awsKinesisBuilder_.clear(); - } - if (cloudStorageBuilder_ != null) { - cloudStorageBuilder_.clear(); - } - platformLogsSettings_ = null; - if (platformLogsSettingsBuilder_ != null) { - platformLogsSettingsBuilder_.dispose(); - platformLogsSettingsBuilder_ = null; + /** + * + * + *
    +     * Optional. Amazon Kinesis Data Streams.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis, + com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisOrBuilder> + internalGetAwsKinesisFieldBuilder() { + if (awsKinesisBuilder_ == null) { + if (!(sourceCase_ == 1)) { + source_ = + com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDefaultInstance(); + } + awsKinesisBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis, + com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisOrBuilder>( + (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_, + getParentForChildren(), + isClean()); + source_ = null; } - sourceCase_ = 0; - source_ = null; - return this; + sourceCase_ = 1; + onChanged(); + return awsKinesisBuilder_; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor; - } + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage, + com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageOrBuilder> + cloudStorageBuilder_; + /** + * + * + *
    +     * Optional. Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cloudStorage field is set. + */ @java.lang.Override - public com.google.pubsub.v1.IngestionDataSourceSettings getDefaultInstanceForType() { - return com.google.pubsub.v1.IngestionDataSourceSettings.getDefaultInstance(); + public boolean hasCloudStorage() { + return sourceCase_ == 2; } + /** + * + * + *
    +     * Optional. Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cloudStorage. + */ @java.lang.Override - public com.google.pubsub.v1.IngestionDataSourceSettings build() { - com.google.pubsub.v1.IngestionDataSourceSettings result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage getCloudStorage() { + if (cloudStorageBuilder_ == null) { + if (sourceCase_ == 2) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDefaultInstance(); + } else { + if (sourceCase_ == 2) { + return cloudStorageBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDefaultInstance(); } - return result; } - @java.lang.Override - public com.google.pubsub.v1.IngestionDataSourceSettings buildPartial() { - com.google.pubsub.v1.IngestionDataSourceSettings result = - new com.google.pubsub.v1.IngestionDataSourceSettings(this); - if (bitField0_ != 0) { - buildPartial0(result); + /** + * + * + *
    +     * Optional. Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCloudStorage( + com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage value) { + if (cloudStorageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + cloudStorageBuilder_.setMessage(value); } - buildPartialOneofs(result); - onBuilt(); - return result; + sourceCase_ = 2; + return this; } - private void buildPartial0(com.google.pubsub.v1.IngestionDataSourceSettings result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.platformLogsSettings_ = - platformLogsSettingsBuilder_ == null - ? platformLogsSettings_ - : platformLogsSettingsBuilder_.build(); - to_bitField0_ |= 0x00000001; + /** + * + * + *
    +     * Optional. Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCloudStorage( + com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.Builder builderForValue) { + if (cloudStorageBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + cloudStorageBuilder_.setMessage(builderForValue.build()); } - result.bitField0_ |= to_bitField0_; + sourceCase_ = 2; + return this; } - private void buildPartialOneofs(com.google.pubsub.v1.IngestionDataSourceSettings result) { - result.sourceCase_ = sourceCase_; - result.source_ = this.source_; - if (sourceCase_ == 1 && awsKinesisBuilder_ != null) { - result.source_ = awsKinesisBuilder_.build(); - } - if (sourceCase_ == 2 && cloudStorageBuilder_ != null) { - result.source_ = cloudStorageBuilder_.build(); + /** + * + * + *
    +     * Optional. Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCloudStorage( + com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage value) { + if (cloudStorageBuilder_ == null) { + if (sourceCase_ == 2 + && source_ + != com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + .getDefaultInstance()) { + source_ = + com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.newBuilder( + (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 2) { + cloudStorageBuilder_.mergeFrom(value); + } else { + cloudStorageBuilder_.setMessage(value); + } } + sourceCase_ = 2; + return this; } - @java.lang.Override - public Builder clone() { - return super.clone(); + /** + * + * + *
    +     * Optional. Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCloudStorage() { + if (cloudStorageBuilder_ == null) { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + } + cloudStorageBuilder_.clear(); + } + return this; } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + /** + * + * + *
    +     * Optional. Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.Builder + getCloudStorageBuilder() { + return internalGetCloudStorageFieldBuilder().getBuilder(); } + /** + * + * + *
    +     * Optional. Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageOrBuilder + getCloudStorageOrBuilder() { + if ((sourceCase_ == 2) && (cloudStorageBuilder_ != null)) { + return cloudStorageBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 2) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDefaultInstance(); + } } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + /** + * + * + *
    +     * Optional. Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage, + com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageOrBuilder> + internalGetCloudStorageFieldBuilder() { + if (cloudStorageBuilder_ == null) { + if (!(sourceCase_ == 2)) { + source_ = + com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDefaultInstance(); + } + cloudStorageBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage, + com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageOrBuilder>( + (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 2; + onChanged(); + return cloudStorageBuilder_; } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs, + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubsOrBuilder> + azureEventHubsBuilder_; + /** + * + * + *
    +     * Optional. Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the azureEventHubs field is set. + */ @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + public boolean hasAzureEventHubs() { + return sourceCase_ == 3; } + /** + * + * + *
    +     * Optional. Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The azureEventHubs. + */ @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.IngestionDataSourceSettings) { - return mergeFrom((com.google.pubsub.v1.IngestionDataSourceSettings) other); + public com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs getAzureEventHubs() { + if (azureEventHubsBuilder_ == null) { + if (sourceCase_ == 3) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.getDefaultInstance(); } else { - super.mergeFrom(other); - return this; + if (sourceCase_ == 3) { + return azureEventHubsBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.getDefaultInstance(); } } - public Builder mergeFrom(com.google.pubsub.v1.IngestionDataSourceSettings other) { - if (other == com.google.pubsub.v1.IngestionDataSourceSettings.getDefaultInstance()) - return this; - if (other.hasPlatformLogsSettings()) { - mergePlatformLogsSettings(other.getPlatformLogsSettings()); - } - switch (other.getSourceCase()) { - case AWS_KINESIS: - { - mergeAwsKinesis(other.getAwsKinesis()); - break; - } - case CLOUD_STORAGE: - { - mergeCloudStorage(other.getCloudStorage()); - break; - } - case SOURCE_NOT_SET: - { - break; - } + /** + * + * + *
    +     * Optional. Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAzureEventHubs( + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs value) { + if (azureEventHubsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + azureEventHubsBuilder_.setMessage(value); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); + sourceCase_ = 3; return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
    +     * Optional. Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAzureEventHubs( + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.Builder builderForValue) { + if (azureEventHubsBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + azureEventHubsBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 3; + 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(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getAwsKinesisFieldBuilder().getBuilder(), extensionRegistry); - sourceCase_ = 1; - break; - } // case 10 - case 18: - { - input.readMessage(getCloudStorageFieldBuilder().getBuilder(), extensionRegistry); - sourceCase_ = 2; - break; - } // case 18 - case 34: - { - input.readMessage( - getPlatformLogsSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { + /** + * + * + *
    +     * Optional. Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAzureEventHubs( + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs value) { + if (azureEventHubsBuilder_ == null) { + if (sourceCase_ == 3 + && source_ + != com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + .getDefaultInstance()) { + source_ = + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.newBuilder( + (com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } onChanged(); - } // finally + } else { + if (sourceCase_ == 3) { + azureEventHubsBuilder_.mergeFrom(value); + } else { + azureEventHubsBuilder_.setMessage(value); + } + } + sourceCase_ = 3; + return this; + } + + /** + * + * + *
    +     * Optional. Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAzureEventHubs() { + if (azureEventHubsBuilder_ == null) { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + } + azureEventHubsBuilder_.clear(); + } return this; } - private int sourceCase_ = 0; - private java.lang.Object source_; + /** + * + * + *
    +     * Optional. Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.Builder + getAzureEventHubsBuilder() { + return internalGetAzureEventHubsFieldBuilder().getBuilder(); + } - public SourceCase getSourceCase() { - return SourceCase.forNumber(sourceCase_); + /** + * + * + *
    +     * Optional. Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubsOrBuilder + getAzureEventHubsOrBuilder() { + if ((sourceCase_ == 3) && (azureEventHubsBuilder_ != null)) { + return azureEventHubsBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 3) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) source_; + } + return com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.getDefaultInstance(); + } } - public Builder clearSource() { - sourceCase_ = 0; - source_ = null; + /** + * + * + *
    +     * Optional. Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs, + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubsOrBuilder> + internalGetAzureEventHubsFieldBuilder() { + if (azureEventHubsBuilder_ == null) { + if (!(sourceCase_ == 3)) { + source_ = + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.getDefaultInstance(); + } + azureEventHubsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs, + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubsOrBuilder>( + (com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 3; onChanged(); - return this; + return azureEventHubsBuilder_; } - private int bitField0_; + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk, + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMskOrBuilder> + awsMskBuilder_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis, - com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.Builder, - com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisOrBuilder> - awsKinesisBuilder_; /** * * *
    -     * Optional. Amazon Kinesis Data Streams.
    +     * Optional. Amazon MSK.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the awsKinesis field is set. + * @return Whether the awsMsk field is set. */ @java.lang.Override - public boolean hasAwsKinesis() { - return sourceCase_ == 1; + public boolean hasAwsMsk() { + return sourceCase_ == 5; } + /** * * *
    -     * Optional. Amazon Kinesis Data Streams.
    +     * Optional. Amazon MSK.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The awsKinesis. + * @return The awsMsk. */ @java.lang.Override - public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis getAwsKinesis() { - if (awsKinesisBuilder_ == null) { - if (sourceCase_ == 1) { - return (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_; + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk getAwsMsk() { + if (awsMskBuilder_ == null) { + if (sourceCase_ == 5) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) source_; } - return com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDefaultInstance(); + return com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.getDefaultInstance(); } else { - if (sourceCase_ == 1) { - return awsKinesisBuilder_.getMessage(); + if (sourceCase_ == 5) { + return awsMskBuilder_.getMessage(); } - return com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDefaultInstance(); + return com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.getDefaultInstance(); } } + /** * * *
    -     * Optional. Amazon Kinesis Data Streams.
    +     * Optional. Amazon MSK.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setAwsKinesis( - com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis value) { - if (awsKinesisBuilder_ == null) { + public Builder setAwsMsk(com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk value) { + if (awsMskBuilder_ == null) { if (value == null) { throw new NullPointerException(); } source_ = value; onChanged(); } else { - awsKinesisBuilder_.setMessage(value); + awsMskBuilder_.setMessage(value); } - sourceCase_ = 1; + sourceCase_ = 5; return this; } + /** * * *
    -     * Optional. Amazon Kinesis Data Streams.
    +     * Optional. Amazon MSK.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setAwsKinesis( - com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.Builder builderForValue) { - if (awsKinesisBuilder_ == null) { + public Builder setAwsMsk( + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.Builder builderForValue) { + if (awsMskBuilder_ == null) { source_ = builderForValue.build(); onChanged(); } else { - awsKinesisBuilder_.setMessage(builderForValue.build()); + awsMskBuilder_.setMessage(builderForValue.build()); } - sourceCase_ = 1; + sourceCase_ = 5; return this; } + /** * * *
    -     * Optional. Amazon Kinesis Data Streams.
    +     * Optional. Amazon MSK.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeAwsKinesis( - com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis value) { - if (awsKinesisBuilder_ == null) { - if (sourceCase_ == 1 + public Builder mergeAwsMsk(com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk value) { + if (awsMskBuilder_ == null) { + if (sourceCase_ == 5 && source_ - != com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - .getDefaultInstance()) { + != com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.getDefaultInstance()) { source_ = - com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.newBuilder( - (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_) + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.newBuilder( + (com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) source_) .mergeFrom(value) .buildPartial(); } else { @@ -7292,233 +14488,239 @@ public Builder mergeAwsKinesis( } onChanged(); } else { - if (sourceCase_ == 1) { - awsKinesisBuilder_.mergeFrom(value); + if (sourceCase_ == 5) { + awsMskBuilder_.mergeFrom(value); } else { - awsKinesisBuilder_.setMessage(value); + awsMskBuilder_.setMessage(value); } } - sourceCase_ = 1; + sourceCase_ = 5; return this; } + /** * * *
    -     * Optional. Amazon Kinesis Data Streams.
    +     * Optional. Amazon MSK.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearAwsKinesis() { - if (awsKinesisBuilder_ == null) { - if (sourceCase_ == 1) { + public Builder clearAwsMsk() { + if (awsMskBuilder_ == null) { + if (sourceCase_ == 5) { sourceCase_ = 0; source_ = null; onChanged(); } } else { - if (sourceCase_ == 1) { + if (sourceCase_ == 5) { sourceCase_ = 0; source_ = null; } - awsKinesisBuilder_.clear(); + awsMskBuilder_.clear(); } return this; } + /** * * *
    -     * Optional. Amazon Kinesis Data Streams.
    +     * Optional. Amazon MSK.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.Builder - getAwsKinesisBuilder() { - return getAwsKinesisFieldBuilder().getBuilder(); + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.Builder getAwsMskBuilder() { + return internalGetAwsMskFieldBuilder().getBuilder(); } + /** * * *
    -     * Optional. Amazon Kinesis Data Streams.
    +     * Optional. Amazon MSK.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisOrBuilder - getAwsKinesisOrBuilder() { - if ((sourceCase_ == 1) && (awsKinesisBuilder_ != null)) { - return awsKinesisBuilder_.getMessageOrBuilder(); + public com.google.pubsub.v1.IngestionDataSourceSettings.AwsMskOrBuilder getAwsMskOrBuilder() { + if ((sourceCase_ == 5) && (awsMskBuilder_ != null)) { + return awsMskBuilder_.getMessageOrBuilder(); } else { - if (sourceCase_ == 1) { - return (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_; + if (sourceCase_ == 5) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) source_; } - return com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDefaultInstance(); + return com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.getDefaultInstance(); } } + /** * * *
    -     * Optional. Amazon Kinesis Data Streams.
    +     * Optional. Amazon MSK.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis aws_kinesis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis, - com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.Builder, - com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisOrBuilder> - getAwsKinesisFieldBuilder() { - if (awsKinesisBuilder_ == null) { - if (!(sourceCase_ == 1)) { - source_ = - com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDefaultInstance(); - } - awsKinesisBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis, - com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.Builder, - com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisOrBuilder>( - (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) source_, + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk, + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMskOrBuilder> + internalGetAwsMskFieldBuilder() { + if (awsMskBuilder_ == null) { + if (!(sourceCase_ == 5)) { + source_ = com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.getDefaultInstance(); + } + awsMskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk, + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMskOrBuilder>( + (com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) source_, getParentForChildren(), isClean()); source_ = null; } - sourceCase_ = 1; + sourceCase_ = 5; onChanged(); - return awsKinesisBuilder_; + return awsMskBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage, - com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.Builder, - com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageOrBuilder> - cloudStorageBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud, + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloudOrBuilder> + confluentCloudBuilder_; + /** * * *
    -     * Optional. Cloud Storage.
    +     * Optional. Confluent Cloud.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the cloudStorage field is set. + * @return Whether the confluentCloud field is set. */ @java.lang.Override - public boolean hasCloudStorage() { - return sourceCase_ == 2; + public boolean hasConfluentCloud() { + return sourceCase_ == 6; } + /** * * *
    -     * Optional. Cloud Storage.
    +     * Optional. Confluent Cloud.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The cloudStorage. + * @return The confluentCloud. */ @java.lang.Override - public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage getCloudStorage() { - if (cloudStorageBuilder_ == null) { - if (sourceCase_ == 2) { - return (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_; + public com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud getConfluentCloud() { + if (confluentCloudBuilder_ == null) { + if (sourceCase_ == 6) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) source_; } - return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDefaultInstance(); + return com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.getDefaultInstance(); } else { - if (sourceCase_ == 2) { - return cloudStorageBuilder_.getMessage(); + if (sourceCase_ == 6) { + return confluentCloudBuilder_.getMessage(); } - return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDefaultInstance(); + return com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.getDefaultInstance(); } } + /** * * *
    -     * Optional. Cloud Storage.
    +     * Optional. Confluent Cloud.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setCloudStorage( - com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage value) { - if (cloudStorageBuilder_ == null) { + public Builder setConfluentCloud( + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud value) { + if (confluentCloudBuilder_ == null) { if (value == null) { throw new NullPointerException(); } source_ = value; onChanged(); } else { - cloudStorageBuilder_.setMessage(value); + confluentCloudBuilder_.setMessage(value); } - sourceCase_ = 2; + sourceCase_ = 6; return this; } + /** * * *
    -     * Optional. Cloud Storage.
    +     * Optional. Confluent Cloud.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setCloudStorage( - com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.Builder builderForValue) { - if (cloudStorageBuilder_ == null) { + public Builder setConfluentCloud( + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.Builder builderForValue) { + if (confluentCloudBuilder_ == null) { source_ = builderForValue.build(); onChanged(); } else { - cloudStorageBuilder_.setMessage(builderForValue.build()); + confluentCloudBuilder_.setMessage(builderForValue.build()); } - sourceCase_ = 2; + sourceCase_ = 6; return this; } + /** * * *
    -     * Optional. Cloud Storage.
    +     * Optional. Confluent Cloud.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeCloudStorage( - com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage value) { - if (cloudStorageBuilder_ == null) { - if (sourceCase_ == 2 + public Builder mergeConfluentCloud( + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud value) { + if (confluentCloudBuilder_ == null) { + if (sourceCase_ == 6 && source_ - != com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + != com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud .getDefaultInstance()) { source_ = - com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.newBuilder( - (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_) + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.newBuilder( + (com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) source_) .mergeFrom(value) .buildPartial(); } else { @@ -7526,122 +14728,127 @@ public Builder mergeCloudStorage( } onChanged(); } else { - if (sourceCase_ == 2) { - cloudStorageBuilder_.mergeFrom(value); + if (sourceCase_ == 6) { + confluentCloudBuilder_.mergeFrom(value); } else { - cloudStorageBuilder_.setMessage(value); + confluentCloudBuilder_.setMessage(value); } } - sourceCase_ = 2; + sourceCase_ = 6; return this; } + /** * * *
    -     * Optional. Cloud Storage.
    +     * Optional. Confluent Cloud.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearCloudStorage() { - if (cloudStorageBuilder_ == null) { - if (sourceCase_ == 2) { + public Builder clearConfluentCloud() { + if (confluentCloudBuilder_ == null) { + if (sourceCase_ == 6) { sourceCase_ = 0; source_ = null; onChanged(); } } else { - if (sourceCase_ == 2) { + if (sourceCase_ == 6) { sourceCase_ = 0; source_ = null; } - cloudStorageBuilder_.clear(); + confluentCloudBuilder_.clear(); } return this; } + /** * * *
    -     * Optional. Cloud Storage.
    +     * Optional. Confluent Cloud.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.Builder - getCloudStorageBuilder() { - return getCloudStorageFieldBuilder().getBuilder(); + public com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.Builder + getConfluentCloudBuilder() { + return internalGetConfluentCloudFieldBuilder().getBuilder(); } + /** * * *
    -     * Optional. Cloud Storage.
    +     * Optional. Confluent Cloud.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageOrBuilder - getCloudStorageOrBuilder() { - if ((sourceCase_ == 2) && (cloudStorageBuilder_ != null)) { - return cloudStorageBuilder_.getMessageOrBuilder(); + public com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloudOrBuilder + getConfluentCloudOrBuilder() { + if ((sourceCase_ == 6) && (confluentCloudBuilder_ != null)) { + return confluentCloudBuilder_.getMessageOrBuilder(); } else { - if (sourceCase_ == 2) { - return (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_; + if (sourceCase_ == 6) { + return (com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) source_; } - return com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDefaultInstance(); + return com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.getDefaultInstance(); } } + /** * * *
    -     * Optional. Cloud Storage.
    +     * Optional. Confluent Cloud.
          * 
    * * - * .google.pubsub.v1.IngestionDataSourceSettings.CloudStorage cloud_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage, - com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.Builder, - com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageOrBuilder> - getCloudStorageFieldBuilder() { - if (cloudStorageBuilder_ == null) { - if (!(sourceCase_ == 2)) { + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud, + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloudOrBuilder> + internalGetConfluentCloudFieldBuilder() { + if (confluentCloudBuilder_ == null) { + if (!(sourceCase_ == 6)) { source_ = - com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.getDefaultInstance(); - } - cloudStorageBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage, - com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.Builder, - com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageOrBuilder>( - (com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) source_, + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.getDefaultInstance(); + } + confluentCloudBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud, + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.Builder, + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloudOrBuilder>( + (com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) source_, getParentForChildren(), isClean()); source_ = null; } - sourceCase_ = 2; + sourceCase_ = 6; onChanged(); - return cloudStorageBuilder_; + return confluentCloudBuilder_; } private com.google.pubsub.v1.PlatformLogsSettings platformLogsSettings_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PlatformLogsSettings, com.google.pubsub.v1.PlatformLogsSettings.Builder, com.google.pubsub.v1.PlatformLogsSettingsOrBuilder> platformLogsSettingsBuilder_; + /** * * @@ -7657,8 +14864,9 @@ public Builder clearCloudStorage() { * @return Whether the platformLogsSettings field is set. */ public boolean hasPlatformLogsSettings() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -7682,6 +14890,7 @@ public com.google.pubsub.v1.PlatformLogsSettings getPlatformLogsSettings() { return platformLogsSettingsBuilder_.getMessage(); } } + /** * * @@ -7703,10 +14912,11 @@ public Builder setPlatformLogsSettings(com.google.pubsub.v1.PlatformLogsSettings } else { platformLogsSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000020; onChanged(); return this; } + /** * * @@ -7726,10 +14936,11 @@ public Builder setPlatformLogsSettings( } else { platformLogsSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000020; onChanged(); return this; } + /** * * @@ -7744,7 +14955,7 @@ public Builder setPlatformLogsSettings( */ public Builder mergePlatformLogsSettings(com.google.pubsub.v1.PlatformLogsSettings value) { if (platformLogsSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) + if (((bitField0_ & 0x00000020) != 0) && platformLogsSettings_ != null && platformLogsSettings_ != com.google.pubsub.v1.PlatformLogsSettings.getDefaultInstance()) { @@ -7756,11 +14967,12 @@ public Builder mergePlatformLogsSettings(com.google.pubsub.v1.PlatformLogsSettin platformLogsSettingsBuilder_.mergeFrom(value); } if (platformLogsSettings_ != null) { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000020; onChanged(); } return this; } + /** * * @@ -7774,7 +14986,7 @@ public Builder mergePlatformLogsSettings(com.google.pubsub.v1.PlatformLogsSettin * */ public Builder clearPlatformLogsSettings() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000020); platformLogsSettings_ = null; if (platformLogsSettingsBuilder_ != null) { platformLogsSettingsBuilder_.dispose(); @@ -7783,6 +14995,7 @@ public Builder clearPlatformLogsSettings() { onChanged(); return this; } + /** * * @@ -7796,10 +15009,11 @@ public Builder clearPlatformLogsSettings() { * */ public com.google.pubsub.v1.PlatformLogsSettings.Builder getPlatformLogsSettingsBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000020; onChanged(); - return getPlatformLogsSettingsFieldBuilder().getBuilder(); + return internalGetPlatformLogsSettingsFieldBuilder().getBuilder(); } + /** * * @@ -7821,6 +15035,7 @@ public com.google.pubsub.v1.PlatformLogsSettingsOrBuilder getPlatformLogsSetting : platformLogsSettings_; } } + /** * * @@ -7833,14 +15048,14 @@ public com.google.pubsub.v1.PlatformLogsSettingsOrBuilder getPlatformLogsSetting * .google.pubsub.v1.PlatformLogsSettings platform_logs_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PlatformLogsSettings, com.google.pubsub.v1.PlatformLogsSettings.Builder, com.google.pubsub.v1.PlatformLogsSettingsOrBuilder> - getPlatformLogsSettingsFieldBuilder() { + internalGetPlatformLogsSettingsFieldBuilder() { if (platformLogsSettingsBuilder_ == null) { platformLogsSettingsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PlatformLogsSettings, com.google.pubsub.v1.PlatformLogsSettings.Builder, com.google.pubsub.v1.PlatformLogsSettingsOrBuilder>( @@ -7850,17 +15065,6 @@ public com.google.pubsub.v1.PlatformLogsSettingsOrBuilder getPlatformLogsSetting return platformLogsSettingsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionDataSourceSettings) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettingsOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettingsOrBuilder.java index 28c04d607..9e641bb67 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettingsOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettingsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface IngestionDataSourceSettingsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionDataSourceSettings) @@ -38,6 +40,7 @@ public interface IngestionDataSourceSettingsOrBuilder * @return Whether the awsKinesis field is set. */ boolean hasAwsKinesis(); + /** * * @@ -52,6 +55,7 @@ public interface IngestionDataSourceSettingsOrBuilder * @return The awsKinesis. */ com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis getAwsKinesis(); + /** * * @@ -79,6 +83,7 @@ public interface IngestionDataSourceSettingsOrBuilder * @return Whether the cloudStorage field is set. */ boolean hasCloudStorage(); + /** * * @@ -93,6 +98,7 @@ public interface IngestionDataSourceSettingsOrBuilder * @return The cloudStorage. */ com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage getCloudStorage(); + /** * * @@ -106,6 +112,137 @@ public interface IngestionDataSourceSettingsOrBuilder */ com.google.pubsub.v1.IngestionDataSourceSettings.CloudStorageOrBuilder getCloudStorageOrBuilder(); + /** + * + * + *
    +   * Optional. Azure Event Hubs.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the azureEventHubs field is set. + */ + boolean hasAzureEventHubs(); + + /** + * + * + *
    +   * Optional. Azure Event Hubs.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The azureEventHubs. + */ + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs getAzureEventHubs(); + + /** + * + * + *
    +   * Optional. Azure Event Hubs.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs azure_event_hubs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubsOrBuilder + getAzureEventHubsOrBuilder(); + + /** + * + * + *
    +   * Optional. Amazon MSK.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the awsMsk field is set. + */ + boolean hasAwsMsk(); + + /** + * + * + *
    +   * Optional. Amazon MSK.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The awsMsk. + */ + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk getAwsMsk(); + + /** + * + * + *
    +   * Optional. Amazon MSK.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.AwsMsk aws_msk = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionDataSourceSettings.AwsMskOrBuilder getAwsMskOrBuilder(); + + /** + * + * + *
    +   * Optional. Confluent Cloud.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the confluentCloud field is set. + */ + boolean hasConfluentCloud(); + + /** + * + * + *
    +   * Optional. Confluent Cloud.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The confluentCloud. + */ + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud getConfluentCloud(); + + /** + * + * + *
    +   * Optional. Confluent Cloud.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud confluent_cloud = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloudOrBuilder + getConfluentCloudOrBuilder(); + /** * * @@ -121,6 +258,7 @@ public interface IngestionDataSourceSettingsOrBuilder * @return Whether the platformLogsSettings field is set. */ boolean hasPlatformLogsSettings(); + /** * * @@ -136,6 +274,7 @@ public interface IngestionDataSourceSettingsOrBuilder * @return The platformLogsSettings. */ com.google.pubsub.v1.PlatformLogsSettings getPlatformLogsSettings(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEvent.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEvent.java index 98eefa8aa..6fde71fb1 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEvent.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent} */ -public final class IngestionFailureEvent extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class IngestionFailureEvent extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionFailureEvent) IngestionFailureEventOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IngestionFailureEvent"); + } + // Use IngestionFailureEvent.newBuilder() to construct. - private IngestionFailureEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private IngestionFailureEvent(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private IngestionFailureEvent() { errorMessage_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new IngestionFailureEvent(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionFailureEvent_fieldAccessorTable @@ -69,6 +76,7 @@ public interface ApiViolationReasonOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -85,31 +93,36 @@ public interface ApiViolationReasonOrBuilder * * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} */ - public static final class ApiViolationReason extends com.google.protobuf.GeneratedMessageV3 + public static final class ApiViolationReason extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) ApiViolationReasonOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ApiViolationReason"); + } + // Use ApiViolationReason.newBuilder() to construct. - private ApiViolationReason(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ApiViolationReason(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ApiViolationReason() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ApiViolationReason(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionFailureEvent_ApiViolationReason_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionFailureEvent_ApiViolationReason_fieldAccessorTable @@ -210,38 +223,38 @@ public static com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason pars public static com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -265,11 +278,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -286,8 +299,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder { @@ -297,7 +309,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionFailureEvent_ApiViolationReason_fieldAccessorTable @@ -309,7 +321,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -348,41 +360,6 @@ public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason buildPartia 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.pubsub.v1.IngestionFailureEvent.ApiViolationReason) { @@ -441,18 +418,6 @@ public Builder mergeFrom( return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) } @@ -512,6 +477,7 @@ public interface AvroFailureReasonOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -522,31 +488,36 @@ public interface AvroFailureReasonOrBuilder * * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} */ - public static final class AvroFailureReason extends com.google.protobuf.GeneratedMessageV3 + public static final class AvroFailureReason extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) AvroFailureReasonOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AvroFailureReason"); + } + // Use AvroFailureReason.newBuilder() to construct. - private AvroFailureReason(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AvroFailureReason(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AvroFailureReason() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AvroFailureReason(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionFailureEvent_AvroFailureReason_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionFailureEvent_AvroFailureReason_fieldAccessorTable @@ -647,38 +618,38 @@ public static com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason parse public static com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -702,11 +673,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -717,8 +688,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonOrBuilder { @@ -728,7 +698,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_IngestionFailureEvent_AvroFailureReason_fieldAccessorTable @@ -740,7 +710,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -779,41 +749,6 @@ public com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason buildPartial return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) { @@ -871,18 +806,6 @@ public Builder mergeFrom( return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) } @@ -938,500 +861,453 @@ public com.google.protobuf.Parser getParserForType() { } } - public interface CloudStorageFailureOrBuilder + public interface SchemaViolationReasonOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
    -     * Optional. Name of the Cloud Storage bucket used for ingestion.
    -     * 
    - * - * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bucket. - */ - java.lang.String getBucket(); - /** - * - * - *
    -     * Optional. Name of the Cloud Storage bucket used for ingestion.
    -     * 
    - * - * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for bucket. - */ - com.google.protobuf.ByteString getBucketBytes(); - - /** - * - * - *
    -     * Optional. Name of the Cloud Storage object which contained the section
    -     * that couldn't be ingested.
    -     * 
    - * - * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The objectName. - */ - java.lang.String getObjectName(); - /** - * - * - *
    -     * Optional. Name of the Cloud Storage object which contained the section
    -     * that couldn't be ingested.
    -     * 
    - * - * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for objectName. - */ - com.google.protobuf.ByteString getObjectNameBytes(); - - /** - * - * - *
    -     * Optional. Generation of the Cloud Storage object which contained the
    -     * section that couldn't be ingested.
    -     * 
    - * - * int64 object_generation = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The objectGeneration. - */ - long getObjectGeneration(); - - /** - * - * - *
    -     * Optional. Failure encountered when parsing an Avro file.
    -     * 
    - * - * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the avroFailureReason field is set. - */ - boolean hasAvroFailureReason(); - /** - * - * - *
    -     * Optional. Failure encountered when parsing an Avro file.
    -     * 
    - * - * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The avroFailureReason. - */ - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason getAvroFailureReason(); - /** - * - * - *
    -     * Optional. Failure encountered when parsing an Avro file.
    -     * 
    - * - * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonOrBuilder - getAvroFailureReasonOrBuilder(); - - /** - * - * - *
    -     * Optional. The Pub/Sub API limits prevented the desired message from
    -     * being published.
    -     * 
    - * - * - * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the apiViolationReason field is set. - */ - boolean hasApiViolationReason(); - /** - * - * - *
    -     * Optional. The Pub/Sub API limits prevented the desired message from
    -     * being published.
    -     * 
    - * - * - * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The apiViolationReason. - */ - com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason(); - /** - * - * - *
    -     * Optional. The Pub/Sub API limits prevented the desired message from
    -     * being published.
    -     * 
    - * - * - * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder - getApiViolationReasonOrBuilder(); + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) + com.google.protobuf.MessageOrBuilder {} - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.ReasonCase getReasonCase(); - } /** * * *
    -   * Failure when ingesting from a Cloud Storage source.
    +   * Set when a Pub/Sub message fails to get published due to a schema
    +   * validation violation.
        * 
    * - * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} + * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason} */ - public static final class CloudStorageFailure extends com.google.protobuf.GeneratedMessageV3 + public static final class SchemaViolationReason extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) - CloudStorageFailureOrBuilder { + // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) + SchemaViolationReasonOrBuilder { private static final long serialVersionUID = 0L; - // Use CloudStorageFailure.newBuilder() to construct. - private CloudStorageFailure(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CloudStorageFailure() { - bucket_ = ""; - objectName_ = ""; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SchemaViolationReason"); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CloudStorageFailure(); + // Use SchemaViolationReason.newBuilder() to construct. + private SchemaViolationReason(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } + private SchemaViolationReason() {} + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_descriptor; + .internal_static_google_pubsub_v1_IngestionFailureEvent_SchemaViolationReason_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_fieldAccessorTable + .internal_static_google_pubsub_v1_IngestionFailureEvent_SchemaViolationReason_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.class, - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.Builder.class); + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.class, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder.class); } - private int reasonCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object reason_; + private byte memoizedIsInitialized = -1; - public enum ReasonCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - AVRO_FAILURE_REASON(5), - API_VIOLATION_REASON(6), - REASON_NOT_SET(0); - private final int value; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - private ReasonCase(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 ReasonCase valueOf(int value) { - return forNumber(value); - } + memoizedIsInitialized = 1; + return true; + } - public static ReasonCase forNumber(int value) { - switch (value) { - case 5: - return AVRO_FAILURE_REASON; - case 6: - return API_VIOLATION_REASON; - case 0: - return REASON_NOT_SET; - default: - return null; - } - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } - public int getNumber() { - return this.value; - } - }; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - public ReasonCase getReasonCase() { - return ReasonCase.forNumber(reasonCase_); + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - public static final int BUCKET_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object bucket_ = ""; - /** - * - * - *
    -     * Optional. Name of the Cloud Storage bucket used for ingestion.
    -     * 
    - * - * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bucket. - */ @java.lang.Override - public java.lang.String getBucket() { - java.lang.Object ref = bucket_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - bucket_ = s; - return s; + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } + if (!(obj instanceof com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason)) { + return super.equals(obj); + } + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason other = + (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - /** - * - * - *
    -     * Optional. Name of the Cloud Storage bucket used for ingestion.
    -     * 
    - * - * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for bucket. - */ + @java.lang.Override - public com.google.protobuf.ByteString getBucketBytes() { - java.lang.Object ref = bucket_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - bucket_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + 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 final int OBJECT_NAME_FIELD_NUMBER = 2; + public static com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - @SuppressWarnings("serial") - private volatile java.lang.Object objectName_ = ""; - /** - * - * - *
    -     * Optional. Name of the Cloud Storage object which contained the section
    -     * that couldn't be ingested.
    -     * 
    - * - * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The objectName. - */ @java.lang.Override - public java.lang.String getObjectName() { - java.lang.Object ref = objectName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - objectName_ = s; - return s; - } + public Builder newBuilderForType() { + return newBuilder(); } - /** - * - * - *
    -     * Optional. Name of the Cloud Storage object which contained the section
    -     * that couldn't be ingested.
    -     * 
    - * - * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for objectName. - */ + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override - public com.google.protobuf.ByteString getObjectNameBytes() { - java.lang.Object ref = objectName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - objectName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - public static final int OBJECT_GENERATION_FIELD_NUMBER = 3; - private long objectGeneration_ = 0L; - /** - * - * - *
    -     * Optional. Generation of the Cloud Storage object which contained the
    -     * section that couldn't be ingested.
    -     * 
    - * - * int64 object_generation = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The objectGeneration. - */ @java.lang.Override - public long getObjectGeneration() { - return objectGeneration_; + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - public static final int AVRO_FAILURE_REASON_FIELD_NUMBER = 5; /** * * *
    -     * Optional. Failure encountered when parsing an Avro file.
    +     * Set when a Pub/Sub message fails to get published due to a schema
    +     * validation violation.
          * 
    * - * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the avroFailureReason field is set. + * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason} */ - @java.lang.Override - public boolean hasAvroFailureReason() { - return reasonCase_ == 5; - } - /** - * - * - *
    -     * Optional. Failure encountered when parsing an Avro file.
    -     * 
    - * - * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The avroFailureReason. - */ - @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason getAvroFailureReason() { - if (reasonCase_ == 5) { - return (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_; + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_SchemaViolationReason_descriptor; } - return com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.getDefaultInstance(); - } - /** - * - * - *
    -     * Optional. Failure encountered when parsing an Avro file.
    -     * 
    - * - * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonOrBuilder - getAvroFailureReasonOrBuilder() { - if (reasonCase_ == 5) { - return (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_; + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_SchemaViolationReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.class, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder.class); } - return com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.getDefaultInstance(); + + // Construct using + // com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_SchemaViolationReason_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + getDefaultInstanceForType() { + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason build() { + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason buildPartial() { + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason result = + new com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) { + return mergeFrom( + (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason other) { + if (other + == com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) + private static final com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason(); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchemaViolationReason parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; } - public static final int API_VIOLATION_REASON_FIELD_NUMBER = 6; - /** - * - * - *
    -     * Optional. The Pub/Sub API limits prevented the desired message from
    -     * being published.
    -     * 
    - * - * - * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the apiViolationReason field is set. - */ @java.lang.Override - public boolean hasApiViolationReason() { - return reasonCase_ == 6; + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - /** - * - * - *
    -     * Optional. The Pub/Sub API limits prevented the desired message from
    -     * being published.
    -     * 
    - * - * - * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The apiViolationReason. - */ + @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason() { - if (reasonCase_ == 6) { - return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; - } - return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - /** - * - * - *
    -     * Optional. The Pub/Sub API limits prevented the desired message from
    -     * being published.
    -     * 
    - * - * - * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ + } + + public interface MessageTransformationFailureReasonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +   * Set when a Pub/Sub message fails to get published due to a message
    +   * transformation error.
    +   * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason} + */ + public static final class MessageTransformationFailureReason + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + MessageTransformationFailureReasonOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MessageTransformationFailureReason"); + } + + // Use MessageTransformationFailureReason.newBuilder() to construct. + private MessageTransformationFailureReason( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MessageTransformationFailureReason() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_MessageTransformationFailureReason_descriptor; + } + @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder - getApiViolationReasonOrBuilder() { - if (reasonCase_ == 6) { - return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; - } - return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_MessageTransformationFailureReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.class, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder + .class); } private byte memoizedIsInitialized = -1; @@ -1448,23 +1324,6 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucket_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bucket_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectName_); - } - if (objectGeneration_ != 0L) { - output.writeInt64(3, objectGeneration_); - } - if (reasonCase_ == 5) { - output.writeMessage( - 5, (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_); - } - if (reasonCase_ == 6) { - output.writeMessage( - 6, (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_); - } getUnknownFields().writeTo(output); } @@ -1474,25 +1333,6 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucket_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, bucket_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectName_); - } - if (objectGeneration_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, objectGeneration_); - } - if (reasonCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_); - } - if (reasonCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_); - } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1503,26 +1343,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure)) { + if (!(obj + instanceof + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason)) { return super.equals(obj); } - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure other = - (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) obj; + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason other = + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) obj; - if (!getBucket().equals(other.getBucket())) return false; - if (!getObjectName().equals(other.getObjectName())) return false; - if (getObjectGeneration() != other.getObjectGeneration()) return false; - if (!getReasonCase().equals(other.getReasonCase())) return false; - switch (reasonCase_) { - case 5: - if (!getAvroFailureReason().equals(other.getAvroFailureReason())) return false; - break; - case 6: - if (!getApiViolationReason().equals(other.getApiViolationReason())) return false; - break; - case 0: - default: - } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1534,98 +1362,86 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BUCKET_FIELD_NUMBER; - hash = (53 * hash) + getBucket().hashCode(); - hash = (37 * hash) + OBJECT_NAME_FIELD_NUMBER; - hash = (53 * hash) + getObjectName().hashCode(); - hash = (37 * hash) + OBJECT_GENERATION_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getObjectGeneration()); - switch (reasonCase_) { - case 5: - hash = (37 * hash) + AVRO_FAILURE_REASON_FIELD_NUMBER; - hash = (53 * hash) + getAvroFailureReason().hashCode(); - break; - case 6: - hash = (37 * hash) + API_VIOLATION_REASON_FIELD_NUMBER; - hash = (53 * hash) + getApiViolationReason().hashCode(); - break; - case 0: - default: - } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + public static com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + public static com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + public static com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1639,7 +1455,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure prototype) { + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -1649,80 +1465,73 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * *
    -     * Failure when ingesting from a Cloud Storage source.
    +     * Set when a Pub/Sub message fails to get published due to a message
    +     * transformation error.
          * 
    * - * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} + * Protobuf type {@code + * google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureOrBuilder { + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_descriptor; + .internal_static_google_pubsub_v1_IngestionFailureEvent_MessageTransformationFailureReason_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_fieldAccessorTable + .internal_static_google_pubsub_v1_IngestionFailureEvent_MessageTransformationFailureReason_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.class, - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.Builder.class); + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.class, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .Builder.class); } - // Construct using com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.newBuilder() + // Construct using + // com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); - bitField0_ = 0; - bucket_ = ""; - objectName_ = ""; - objectGeneration_ = 0L; - if (avroFailureReasonBuilder_ != null) { - avroFailureReasonBuilder_.clear(); - } - if (apiViolationReasonBuilder_ != null) { - apiViolationReasonBuilder_.clear(); - } - reasonCase_ = 0; - reason_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_descriptor; + .internal_static_google_pubsub_v1_IngestionFailureEvent_MessageTransformationFailureReason_descriptor; } @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason getDefaultInstanceForType() { - return com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance(); + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); } @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure build() { - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure result = buildPartial(); + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason build() { + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1730,82 +1539,22 @@ public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure build() { } @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure buildPartial() { - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure result = - new com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + buildPartial() { + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason result = + new com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason(this); onBuilt(); return result; } - private void buildPartial0( - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.bucket_ = bucket_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.objectName_ = objectName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.objectGeneration_ = objectGeneration_; - } - } - - private void buildPartialOneofs( - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure result) { - result.reasonCase_ = reasonCase_; - result.reason_ = this.reason_; - if (reasonCase_ == 5 && avroFailureReasonBuilder_ != null) { - result.reason_ = avroFailureReasonBuilder_.build(); - } - if (reasonCase_ == 6 && apiViolationReasonBuilder_ != null) { - result.reason_ = apiViolationReasonBuilder_.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.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) { - return mergeFrom((com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) other); + if (other + instanceof + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) { + return mergeFrom( + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + other); } else { super.mergeFrom(other); return this; @@ -1813,39 +1562,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure other) { + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason other) { if (other - == com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance()) - return this; - if (!other.getBucket().isEmpty()) { - bucket_ = other.bucket_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getObjectName().isEmpty()) { - objectName_ = other.objectName_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.getObjectGeneration() != 0L) { - setObjectGeneration(other.getObjectGeneration()); - } - switch (other.getReasonCase()) { - case AVRO_FAILURE_REASON: - { - mergeAvroFailureReason(other.getAvroFailureReason()); - break; - } - case API_VIOLATION_REASON: - { - mergeApiViolationReason(other.getApiViolationReason()); - break; - } - case REASON_NOT_SET: - { - break; - } - } + == com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1872,38 +1592,6 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - bucket_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - objectName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - objectGeneration_ = input.readInt64(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 42: - { - input.readMessage( - getAvroFailureReasonFieldBuilder().getBuilder(), extensionRegistry); - reasonCase_ = 5; - break; - } // case 42 - case 50: - { - input.readMessage( - getApiViolationReasonFieldBuilder().getBuilder(), extensionRegistry); - reasonCase_ = 6; - break; - } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1921,412 +1609,11733 @@ public Builder mergeFrom( return this; } - private int reasonCase_ = 0; - private java.lang.Object reason_; + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + } - public ReasonCase getReasonCase() { - return ReasonCase.forNumber(reasonCase_); - } + // @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + private static final com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReason + DEFAULT_INSTANCE; - public Builder clearReason() { - reasonCase_ = 0; - reason_ = null; - onChanged(); - return this; - } + static { + DEFAULT_INSTANCE = + new com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason(); + } - private int bitField0_; + public static com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MessageTransformationFailureReason parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CloudStorageFailureOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Optional. Name of the Cloud Storage bucket used for ingestion.
    +     * 
    + * + * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bucket. + */ + java.lang.String getBucket(); + + /** + * + * + *
    +     * Optional. Name of the Cloud Storage bucket used for ingestion.
    +     * 
    + * + * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for bucket. + */ + com.google.protobuf.ByteString getBucketBytes(); + + /** + * + * + *
    +     * Optional. Name of the Cloud Storage object which contained the section
    +     * that couldn't be ingested.
    +     * 
    + * + * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The objectName. + */ + java.lang.String getObjectName(); + + /** + * + * + *
    +     * Optional. Name of the Cloud Storage object which contained the section
    +     * that couldn't be ingested.
    +     * 
    + * + * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for objectName. + */ + com.google.protobuf.ByteString getObjectNameBytes(); + + /** + * + * + *
    +     * Optional. Generation of the Cloud Storage object which contained the
    +     * section that couldn't be ingested.
    +     * 
    + * + * int64 object_generation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The objectGeneration. + */ + long getObjectGeneration(); + + /** + * + * + *
    +     * Optional. Failure encountered when parsing an Avro file.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avroFailureReason field is set. + */ + boolean hasAvroFailureReason(); + + /** + * + * + *
    +     * Optional. Failure encountered when parsing an Avro file.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avroFailureReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason getAvroFailureReason(); + + /** + * + * + *
    +     * Optional. Failure encountered when parsing an Avro file.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonOrBuilder + getAvroFailureReasonOrBuilder(); + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + boolean hasApiViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + boolean hasSchemaViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason getSchemaViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the messageTransformationFailureReason field is set. + */ + boolean hasMessageTransformationFailureReason(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The messageTransformationFailureReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder(); + + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.ReasonCase getReasonCase(); + } + + /** + * + * + *
    +   * Failure when ingesting from a Cloud Storage source.
    +   * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} + */ + public static final class CloudStorageFailure extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) + CloudStorageFailureOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CloudStorageFailure"); + } + + // Use CloudStorageFailure.newBuilder() to construct. + private CloudStorageFailure(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CloudStorageFailure() { + bucket_ = ""; + objectName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.class, + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.Builder.class); + } + + private int reasonCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object reason_; + + public enum ReasonCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AVRO_FAILURE_REASON(5), + API_VIOLATION_REASON(6), + SCHEMA_VIOLATION_REASON(7), + MESSAGE_TRANSFORMATION_FAILURE_REASON(8), + REASON_NOT_SET(0); + private final int value; + + private ReasonCase(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 ReasonCase valueOf(int value) { + return forNumber(value); + } + + public static ReasonCase forNumber(int value) { + switch (value) { + case 5: + return AVRO_FAILURE_REASON; + case 6: + return API_VIOLATION_REASON; + case 7: + return SCHEMA_VIOLATION_REASON; + case 8: + return MESSAGE_TRANSFORMATION_FAILURE_REASON; + case 0: + return REASON_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ReasonCase getReasonCase() { + return ReasonCase.forNumber(reasonCase_); + } + + public static final int BUCKET_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object bucket_ = ""; + + /** + * + * + *
    +     * Optional. Name of the Cloud Storage bucket used for ingestion.
    +     * 
    + * + * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bucket. + */ + @java.lang.Override + public java.lang.String getBucket() { + java.lang.Object ref = bucket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucket_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. Name of the Cloud Storage bucket used for ingestion.
    +     * 
    + * + * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for bucket. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBucketBytes() { + java.lang.Object ref = bucket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OBJECT_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object objectName_ = ""; + + /** + * + * + *
    +     * Optional. Name of the Cloud Storage object which contained the section
    +     * that couldn't be ingested.
    +     * 
    + * + * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The objectName. + */ + @java.lang.Override + public java.lang.String getObjectName() { + java.lang.Object ref = objectName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + objectName_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. Name of the Cloud Storage object which contained the section
    +     * that couldn't be ingested.
    +     * 
    + * + * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for objectName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getObjectNameBytes() { + java.lang.Object ref = objectName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + objectName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OBJECT_GENERATION_FIELD_NUMBER = 3; + private long objectGeneration_ = 0L; + + /** + * + * + *
    +     * Optional. Generation of the Cloud Storage object which contained the
    +     * section that couldn't be ingested.
    +     * 
    + * + * int64 object_generation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The objectGeneration. + */ + @java.lang.Override + public long getObjectGeneration() { + return objectGeneration_; + } + + public static final int AVRO_FAILURE_REASON_FIELD_NUMBER = 5; + + /** + * + * + *
    +     * Optional. Failure encountered when parsing an Avro file.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avroFailureReason field is set. + */ + @java.lang.Override + public boolean hasAvroFailureReason() { + return reasonCase_ == 5; + } + + /** + * + * + *
    +     * Optional. Failure encountered when parsing an Avro file.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avroFailureReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason getAvroFailureReason() { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. Failure encountered when parsing an Avro file.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonOrBuilder + getAvroFailureReasonOrBuilder() { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.getDefaultInstance(); + } + + public static final int API_VIOLATION_REASON_FIELD_NUMBER = 6; + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + @java.lang.Override + public boolean hasApiViolationReason() { + return reasonCase_ == 6; + } + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason() { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder() { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + + public static final int SCHEMA_VIOLATION_REASON_FIELD_NUMBER = 7; + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + @java.lang.Override + public boolean hasSchemaViolationReason() { + return reasonCase_ == 7; + } + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + getSchemaViolationReason() { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder() { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.getDefaultInstance(); + } + + public static final int MESSAGE_TRANSFORMATION_FAILURE_REASON_FIELD_NUMBER = 8; + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the messageTransformationFailureReason field is set. + */ + @java.lang.Override + public boolean hasMessageTransformationFailureReason() { + return reasonCase_ == 8; + } + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The messageTransformationFailureReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason() { + if (reasonCase_ == 8) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder() { + if (reasonCase_ == 8) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bucket_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, bucket_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(objectName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, objectName_); + } + if (objectGeneration_ != 0L) { + output.writeInt64(3, objectGeneration_); + } + if (reasonCase_ == 5) { + output.writeMessage( + 5, (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_); + } + if (reasonCase_ == 6) { + output.writeMessage( + 6, (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_); + } + if (reasonCase_ == 7) { + output.writeMessage( + 7, (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_); + } + if (reasonCase_ == 8) { + output.writeMessage( + 8, + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bucket_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, bucket_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(objectName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, objectName_); + } + if (objectGeneration_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, objectGeneration_); + } + if (reasonCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_); + } + if (reasonCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_); + } + if (reasonCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_); + } + if (reasonCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure)) { + return super.equals(obj); + } + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure other = + (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) obj; + + if (!getBucket().equals(other.getBucket())) return false; + if (!getObjectName().equals(other.getObjectName())) return false; + if (getObjectGeneration() != other.getObjectGeneration()) return false; + if (!getReasonCase().equals(other.getReasonCase())) return false; + switch (reasonCase_) { + case 5: + if (!getAvroFailureReason().equals(other.getAvroFailureReason())) return false; + break; + case 6: + if (!getApiViolationReason().equals(other.getApiViolationReason())) return false; + break; + case 7: + if (!getSchemaViolationReason().equals(other.getSchemaViolationReason())) return false; + break; + case 8: + if (!getMessageTransformationFailureReason() + .equals(other.getMessageTransformationFailureReason())) 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) + BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getBucket().hashCode(); + hash = (37 * hash) + OBJECT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getObjectName().hashCode(); + hash = (37 * hash) + OBJECT_GENERATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getObjectGeneration()); + switch (reasonCase_) { + case 5: + hash = (37 * hash) + AVRO_FAILURE_REASON_FIELD_NUMBER; + hash = (53 * hash) + getAvroFailureReason().hashCode(); + break; + case 6: + hash = (37 * hash) + API_VIOLATION_REASON_FIELD_NUMBER; + hash = (53 * hash) + getApiViolationReason().hashCode(); + break; + case 7: + hash = (37 * hash) + SCHEMA_VIOLATION_REASON_FIELD_NUMBER; + hash = (53 * hash) + getSchemaViolationReason().hashCode(); + break; + case 8: + hash = (37 * hash) + MESSAGE_TRANSFORMATION_FAILURE_REASON_FIELD_NUMBER; + hash = (53 * hash) + getMessageTransformationFailureReason().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * Failure when ingesting from a Cloud Storage source.
    +     * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.class, + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.Builder.class); + } + + // Construct using com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bucket_ = ""; + objectName_ = ""; + objectGeneration_ = 0L; + if (avroFailureReasonBuilder_ != null) { + avroFailureReasonBuilder_.clear(); + } + if (apiViolationReasonBuilder_ != null) { + apiViolationReasonBuilder_.clear(); + } + if (schemaViolationReasonBuilder_ != null) { + schemaViolationReasonBuilder_.clear(); + } + if (messageTransformationFailureReasonBuilder_ != null) { + messageTransformationFailureReasonBuilder_.clear(); + } + reasonCase_ = 0; + reason_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + getDefaultInstanceForType() { + return com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure build() { + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure buildPartial() { + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure result = + new com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bucket_ = bucket_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.objectName_ = objectName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.objectGeneration_ = objectGeneration_; + } + } + + private void buildPartialOneofs( + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure result) { + result.reasonCase_ = reasonCase_; + result.reason_ = this.reason_; + if (reasonCase_ == 5 && avroFailureReasonBuilder_ != null) { + result.reason_ = avroFailureReasonBuilder_.build(); + } + if (reasonCase_ == 6 && apiViolationReasonBuilder_ != null) { + result.reason_ = apiViolationReasonBuilder_.build(); + } + if (reasonCase_ == 7 && schemaViolationReasonBuilder_ != null) { + result.reason_ = schemaViolationReasonBuilder_.build(); + } + if (reasonCase_ == 8 && messageTransformationFailureReasonBuilder_ != null) { + result.reason_ = messageTransformationFailureReasonBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) { + return mergeFrom((com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure other) { + if (other + == com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance()) + return this; + if (!other.getBucket().isEmpty()) { + bucket_ = other.bucket_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getObjectName().isEmpty()) { + objectName_ = other.objectName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getObjectGeneration() != 0L) { + setObjectGeneration(other.getObjectGeneration()); + } + switch (other.getReasonCase()) { + case AVRO_FAILURE_REASON: + { + mergeAvroFailureReason(other.getAvroFailureReason()); + break; + } + case API_VIOLATION_REASON: + { + mergeApiViolationReason(other.getApiViolationReason()); + break; + } + case SCHEMA_VIOLATION_REASON: + { + mergeSchemaViolationReason(other.getSchemaViolationReason()); + break; + } + case MESSAGE_TRANSFORMATION_FAILURE_REASON: + { + mergeMessageTransformationFailureReason( + other.getMessageTransformationFailureReason()); + break; + } + case REASON_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: + { + bucket_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + objectName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + objectGeneration_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 42: + { + input.readMessage( + internalGetAvroFailureReasonFieldBuilder().getBuilder(), extensionRegistry); + reasonCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetApiViolationReasonFieldBuilder().getBuilder(), extensionRegistry); + reasonCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetSchemaViolationReasonFieldBuilder().getBuilder(), + extensionRegistry); + reasonCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetMessageTransformationFailureReasonFieldBuilder().getBuilder(), + extensionRegistry); + reasonCase_ = 8; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int reasonCase_ = 0; + private java.lang.Object reason_; + + public ReasonCase getReasonCase() { + return ReasonCase.forNumber(reasonCase_); + } + + public Builder clearReason() { + reasonCase_ = 0; + reason_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object bucket_ = ""; + + /** + * + * + *
    +       * Optional. Name of the Cloud Storage bucket used for ingestion.
    +       * 
    + * + * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bucket. + */ + public java.lang.String getBucket() { + java.lang.Object ref = bucket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. Name of the Cloud Storage bucket used for ingestion.
    +       * 
    + * + * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for bucket. + */ + public com.google.protobuf.ByteString getBucketBytes() { + java.lang.Object ref = bucket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. Name of the Cloud Storage bucket used for ingestion.
    +       * 
    + * + * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bucket to set. + * @return This builder for chaining. + */ + public Builder setBucket(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bucket_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. Name of the Cloud Storage bucket used for ingestion.
    +       * 
    + * + * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearBucket() { + bucket_ = getDefaultInstance().getBucket(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. Name of the Cloud Storage bucket used for ingestion.
    +       * 
    + * + * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for bucket to set. + * @return This builder for chaining. + */ + public Builder setBucketBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + bucket_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object objectName_ = ""; + + /** + * + * + *
    +       * Optional. Name of the Cloud Storage object which contained the section
    +       * that couldn't be ingested.
    +       * 
    + * + * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The objectName. + */ + public java.lang.String getObjectName() { + java.lang.Object ref = objectName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + objectName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. Name of the Cloud Storage object which contained the section
    +       * that couldn't be ingested.
    +       * 
    + * + * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for objectName. + */ + public com.google.protobuf.ByteString getObjectNameBytes() { + java.lang.Object ref = objectName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + objectName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. Name of the Cloud Storage object which contained the section
    +       * that couldn't be ingested.
    +       * 
    + * + * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The objectName to set. + * @return This builder for chaining. + */ + public Builder setObjectName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + objectName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. Name of the Cloud Storage object which contained the section
    +       * that couldn't be ingested.
    +       * 
    + * + * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearObjectName() { + objectName_ = getDefaultInstance().getObjectName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. Name of the Cloud Storage object which contained the section
    +       * that couldn't be ingested.
    +       * 
    + * + * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for objectName to set. + * @return This builder for chaining. + */ + public Builder setObjectNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + objectName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long objectGeneration_; + + /** + * + * + *
    +       * Optional. Generation of the Cloud Storage object which contained the
    +       * section that couldn't be ingested.
    +       * 
    + * + * int64 object_generation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The objectGeneration. + */ + @java.lang.Override + public long getObjectGeneration() { + return objectGeneration_; + } + + /** + * + * + *
    +       * Optional. Generation of the Cloud Storage object which contained the
    +       * section that couldn't be ingested.
    +       * 
    + * + * int64 object_generation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The objectGeneration to set. + * @return This builder for chaining. + */ + public Builder setObjectGeneration(long value) { + + objectGeneration_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. Generation of the Cloud Storage object which contained the
    +       * section that couldn't be ingested.
    +       * 
    + * + * int64 object_generation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearObjectGeneration() { + bitField0_ = (bitField0_ & ~0x00000004); + objectGeneration_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonOrBuilder> + avroFailureReasonBuilder_; + + /** + * + * + *
    +       * Optional. Failure encountered when parsing an Avro file.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avroFailureReason field is set. + */ + @java.lang.Override + public boolean hasAvroFailureReason() { + return reasonCase_ == 5; + } + + /** + * + * + *
    +       * Optional. Failure encountered when parsing an Avro file.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avroFailureReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason getAvroFailureReason() { + if (avroFailureReasonBuilder_ == null) { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.getDefaultInstance(); + } else { + if (reasonCase_ == 5) { + return avroFailureReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. Failure encountered when parsing an Avro file.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAvroFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason value) { + if (avroFailureReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); + } else { + avroFailureReasonBuilder_.setMessage(value); + } + reasonCase_ = 5; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when parsing an Avro file.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAvroFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.Builder builderForValue) { + if (avroFailureReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + avroFailureReasonBuilder_.setMessage(builderForValue.build()); + } + reasonCase_ = 5; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when parsing an Avro file.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAvroFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason value) { + if (avroFailureReasonBuilder_ == null) { + if (reasonCase_ == 5 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 5) { + avroFailureReasonBuilder_.mergeFrom(value); + } else { + avroFailureReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 5; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when parsing an Avro file.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAvroFailureReason() { + if (avroFailureReasonBuilder_ == null) { + if (reasonCase_ == 5) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 5) { + reasonCase_ = 0; + reason_ = null; + } + avroFailureReasonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when parsing an Avro file.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.Builder + getAvroFailureReasonBuilder() { + return internalGetAvroFailureReasonFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Optional. Failure encountered when parsing an Avro file.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonOrBuilder + getAvroFailureReasonOrBuilder() { + if ((reasonCase_ == 5) && (avroFailureReasonBuilder_ != null)) { + return avroFailureReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. Failure encountered when parsing an Avro file.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonOrBuilder> + internalGetAvroFailureReasonFieldBuilder() { + if (avroFailureReasonBuilder_ == null) { + if (!(reasonCase_ == 5)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.getDefaultInstance(); + } + avroFailureReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 5; + onChanged(); + return avroFailureReasonBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder> + apiViolationReasonBuilder_; + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + @java.lang.Override + public boolean hasApiViolationReason() { + return reasonCase_ == 6; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason() { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } else { + if (reasonCase_ == 6) { + return apiViolationReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason value) { + if (apiViolationReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); + } else { + apiViolationReasonBuilder_.setMessage(value); + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder builderForValue) { + if (apiViolationReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + apiViolationReasonBuilder_.setMessage(builderForValue.build()); + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason value) { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 6 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 6) { + apiViolationReasonBuilder_.mergeFrom(value); + } else { + apiViolationReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearApiViolationReason() { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 6) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 6) { + reasonCase_ = 0; + reason_ = null; + } + apiViolationReasonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder + getApiViolationReasonBuilder() { + return internalGetApiViolationReasonFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder() { + if ((reasonCase_ == 6) && (apiViolationReasonBuilder_ != null)) { + return apiViolationReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder> + internalGetApiViolationReasonFieldBuilder() { + if (apiViolationReasonBuilder_ == null) { + if (!(reasonCase_ == 6)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + apiViolationReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 6; + onChanged(); + return apiViolationReasonBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder> + schemaViolationReasonBuilder_; + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + @java.lang.Override + public boolean hasSchemaViolationReason() { + return reasonCase_ == 7; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + getSchemaViolationReason() { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } else { + if (reasonCase_ == 7) { + return schemaViolationReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason value) { + if (schemaViolationReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); + } else { + schemaViolationReasonBuilder_.setMessage(value); + } + reasonCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder + builderForValue) { + if (schemaViolationReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + schemaViolationReasonBuilder_.setMessage(builderForValue.build()); + } + reasonCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason value) { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 7 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 7) { + schemaViolationReasonBuilder_.mergeFrom(value); + } else { + schemaViolationReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSchemaViolationReason() { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 7) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 7) { + reasonCase_ = 0; + reason_ = null; + } + schemaViolationReasonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder + getSchemaViolationReasonBuilder() { + return internalGetSchemaViolationReasonFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder() { + if ((reasonCase_ == 7) && (schemaViolationReasonBuilder_ != null)) { + return schemaViolationReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder> + internalGetSchemaViolationReasonFieldBuilder() { + if (schemaViolationReasonBuilder_ == null) { + if (!(reasonCase_ == 7)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } + schemaViolationReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 7; + onChanged(); + return schemaViolationReasonBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder> + messageTransformationFailureReasonBuilder_; + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the messageTransformationFailureReason field is set. + */ + @java.lang.Override + public boolean hasMessageTransformationFailureReason() { + return reasonCase_ == 8; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The messageTransformationFailureReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason() { + if (messageTransformationFailureReasonBuilder_ == null) { + if (reasonCase_ == 8) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } else { + if (reasonCase_ == 8) { + return messageTransformationFailureReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason value) { + if (messageTransformationFailureReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); + } else { + messageTransformationFailureReasonBuilder_.setMessage(value); + } + reasonCase_ = 8; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder + builderForValue) { + if (messageTransformationFailureReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + messageTransformationFailureReasonBuilder_.setMessage(builderForValue.build()); + } + reasonCase_ = 8; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason value) { + if (messageTransformationFailureReasonBuilder_ == null) { + if (reasonCase_ == 8 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReason) + reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 8) { + messageTransformationFailureReasonBuilder_.mergeFrom(value); + } else { + messageTransformationFailureReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 8; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMessageTransformationFailureReason() { + if (messageTransformationFailureReasonBuilder_ == null) { + if (reasonCase_ == 8) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 8) { + reasonCase_ = 0; + reason_ = null; + } + messageTransformationFailureReasonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder + getMessageTransformationFailureReasonBuilder() { + return internalGetMessageTransformationFailureReasonFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder() { + if ((reasonCase_ == 8) && (messageTransformationFailureReasonBuilder_ != null)) { + return messageTransformationFailureReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 8) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder> + internalGetMessageTransformationFailureReasonFieldBuilder() { + if (messageTransformationFailureReasonBuilder_ == null) { + if (!(reasonCase_ == 8)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + messageTransformationFailureReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 8; + onChanged(); + return messageTransformationFailureReasonBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) + private static final com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure(); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudStorageFailure parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AwsMskFailureReasonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Optional. The ARN of the cluster of the topic being ingested from.
    +     * 
    + * + * string cluster_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterArn. + */ + java.lang.String getClusterArn(); + + /** + * + * + *
    +     * Optional. The ARN of the cluster of the topic being ingested from.
    +     * 
    + * + * string cluster_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterArn. + */ + com.google.protobuf.ByteString getClusterArnBytes(); + + /** + * + * + *
    +     * Optional. The name of the Kafka topic being ingested from.
    +     * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kafkaTopic. + */ + java.lang.String getKafkaTopic(); + + /** + * + * + *
    +     * Optional. The name of the Kafka topic being ingested from.
    +     * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kafkaTopic. + */ + com.google.protobuf.ByteString getKafkaTopicBytes(); + + /** + * + * + *
    +     * Optional. The partition ID of the message that failed to be ingested.
    +     * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The partitionId. + */ + long getPartitionId(); + + /** + * + * + *
    +     * Optional. The offset within the partition of the message that failed to
    +     * be ingested.
    +     * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The offset. + */ + long getOffset(); + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + boolean hasApiViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + boolean hasSchemaViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason getSchemaViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the messageTransformationFailureReason field is set. + */ + boolean hasMessageTransformationFailureReason(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The messageTransformationFailureReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder(); + + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.ReasonCase getReasonCase(); + } + + /** + * + * + *
    +   * Failure when ingesting from an Amazon MSK source.
    +   * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} + */ + public static final class AwsMskFailureReason extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) + AwsMskFailureReasonOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AwsMskFailureReason"); + } + + // Use AwsMskFailureReason.newBuilder() to construct. + private AwsMskFailureReason(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AwsMskFailureReason() { + clusterArn_ = ""; + kafkaTopic_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AwsMskFailureReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AwsMskFailureReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.class, + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.Builder.class); + } + + private int reasonCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object reason_; + + public enum ReasonCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + API_VIOLATION_REASON(5), + SCHEMA_VIOLATION_REASON(6), + MESSAGE_TRANSFORMATION_FAILURE_REASON(7), + REASON_NOT_SET(0); + private final int value; + + private ReasonCase(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 ReasonCase valueOf(int value) { + return forNumber(value); + } + + public static ReasonCase forNumber(int value) { + switch (value) { + case 5: + return API_VIOLATION_REASON; + case 6: + return SCHEMA_VIOLATION_REASON; + case 7: + return MESSAGE_TRANSFORMATION_FAILURE_REASON; + case 0: + return REASON_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ReasonCase getReasonCase() { + return ReasonCase.forNumber(reasonCase_); + } + + public static final int CLUSTER_ARN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object clusterArn_ = ""; + + /** + * + * + *
    +     * Optional. The ARN of the cluster of the topic being ingested from.
    +     * 
    + * + * string cluster_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterArn. + */ + @java.lang.Override + public java.lang.String getClusterArn() { + java.lang.Object ref = clusterArn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterArn_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The ARN of the cluster of the topic being ingested from.
    +     * 
    + * + * string cluster_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterArn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterArnBytes() { + java.lang.Object ref = clusterArn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KAFKA_TOPIC_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object kafkaTopic_ = ""; + + /** + * + * + *
    +     * Optional. The name of the Kafka topic being ingested from.
    +     * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kafkaTopic. + */ + @java.lang.Override + public java.lang.String getKafkaTopic() { + java.lang.Object ref = kafkaTopic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kafkaTopic_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The name of the Kafka topic being ingested from.
    +     * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kafkaTopic. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKafkaTopicBytes() { + java.lang.Object ref = kafkaTopic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kafkaTopic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARTITION_ID_FIELD_NUMBER = 3; + private long partitionId_ = 0L; + + /** + * + * + *
    +     * Optional. The partition ID of the message that failed to be ingested.
    +     * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The partitionId. + */ + @java.lang.Override + public long getPartitionId() { + return partitionId_; + } + + public static final int OFFSET_FIELD_NUMBER = 4; + private long offset_ = 0L; + + /** + * + * + *
    +     * Optional. The offset within the partition of the message that failed to
    +     * be ingested.
    +     * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + + public static final int API_VIOLATION_REASON_FIELD_NUMBER = 5; + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + @java.lang.Override + public boolean hasApiViolationReason() { + return reasonCase_ == 5; + } + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason() { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder() { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + + public static final int SCHEMA_VIOLATION_REASON_FIELD_NUMBER = 6; + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + @java.lang.Override + public boolean hasSchemaViolationReason() { + return reasonCase_ == 6; + } + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + getSchemaViolationReason() { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder() { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.getDefaultInstance(); + } + + public static final int MESSAGE_TRANSFORMATION_FAILURE_REASON_FIELD_NUMBER = 7; + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the messageTransformationFailureReason field is set. + */ + @java.lang.Override + public boolean hasMessageTransformationFailureReason() { + return reasonCase_ == 7; + } + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The messageTransformationFailureReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason() { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder() { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterArn_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, clusterArn_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kafkaTopic_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, kafkaTopic_); + } + if (partitionId_ != 0L) { + output.writeInt64(3, partitionId_); + } + if (offset_ != 0L) { + output.writeInt64(4, offset_); + } + if (reasonCase_ == 5) { + output.writeMessage( + 5, (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_); + } + if (reasonCase_ == 6) { + output.writeMessage( + 6, (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_); + } + if (reasonCase_ == 7) { + output.writeMessage( + 7, + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterArn_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, clusterArn_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kafkaTopic_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kafkaTopic_); + } + if (partitionId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, partitionId_); + } + if (offset_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, offset_); + } + if (reasonCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_); + } + if (reasonCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_); + } + if (reasonCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason)) { + return super.equals(obj); + } + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason other = + (com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) obj; + + if (!getClusterArn().equals(other.getClusterArn())) return false; + if (!getKafkaTopic().equals(other.getKafkaTopic())) return false; + if (getPartitionId() != other.getPartitionId()) return false; + if (getOffset() != other.getOffset()) return false; + if (!getReasonCase().equals(other.getReasonCase())) return false; + switch (reasonCase_) { + case 5: + if (!getApiViolationReason().equals(other.getApiViolationReason())) return false; + break; + case 6: + if (!getSchemaViolationReason().equals(other.getSchemaViolationReason())) return false; + break; + case 7: + if (!getMessageTransformationFailureReason() + .equals(other.getMessageTransformationFailureReason())) 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) + CLUSTER_ARN_FIELD_NUMBER; + hash = (53 * hash) + getClusterArn().hashCode(); + hash = (37 * hash) + KAFKA_TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getKafkaTopic().hashCode(); + hash = (37 * hash) + PARTITION_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPartitionId()); + hash = (37 * hash) + OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOffset()); + switch (reasonCase_) { + case 5: + hash = (37 * hash) + API_VIOLATION_REASON_FIELD_NUMBER; + hash = (53 * hash) + getApiViolationReason().hashCode(); + break; + case 6: + hash = (37 * hash) + SCHEMA_VIOLATION_REASON_FIELD_NUMBER; + hash = (53 * hash) + getSchemaViolationReason().hashCode(); + break; + case 7: + hash = (37 * hash) + MESSAGE_TRANSFORMATION_FAILURE_REASON_FIELD_NUMBER; + hash = (53 * hash) + getMessageTransformationFailureReason().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * Failure when ingesting from an Amazon MSK source.
    +     * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReasonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AwsMskFailureReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AwsMskFailureReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.class, + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.Builder.class); + } + + // Construct using com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + clusterArn_ = ""; + kafkaTopic_ = ""; + partitionId_ = 0L; + offset_ = 0L; + if (apiViolationReasonBuilder_ != null) { + apiViolationReasonBuilder_.clear(); + } + if (schemaViolationReasonBuilder_ != null) { + schemaViolationReasonBuilder_.clear(); + } + if (messageTransformationFailureReasonBuilder_ != null) { + messageTransformationFailureReasonBuilder_.clear(); + } + reasonCase_ = 0; + reason_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AwsMskFailureReason_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason + getDefaultInstanceForType() { + return com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason build() { + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason buildPartial() { + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason result = + new com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.clusterArn_ = clusterArn_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kafkaTopic_ = kafkaTopic_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.partitionId_ = partitionId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.offset_ = offset_; + } + } + + private void buildPartialOneofs( + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason result) { + result.reasonCase_ = reasonCase_; + result.reason_ = this.reason_; + if (reasonCase_ == 5 && apiViolationReasonBuilder_ != null) { + result.reason_ = apiViolationReasonBuilder_.build(); + } + if (reasonCase_ == 6 && schemaViolationReasonBuilder_ != null) { + result.reason_ = schemaViolationReasonBuilder_.build(); + } + if (reasonCase_ == 7 && messageTransformationFailureReasonBuilder_ != null) { + result.reason_ = messageTransformationFailureReasonBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) { + return mergeFrom((com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason other) { + if (other + == com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.getDefaultInstance()) + return this; + if (!other.getClusterArn().isEmpty()) { + clusterArn_ = other.clusterArn_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKafkaTopic().isEmpty()) { + kafkaTopic_ = other.kafkaTopic_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPartitionId() != 0L) { + setPartitionId(other.getPartitionId()); + } + if (other.getOffset() != 0L) { + setOffset(other.getOffset()); + } + switch (other.getReasonCase()) { + case API_VIOLATION_REASON: + { + mergeApiViolationReason(other.getApiViolationReason()); + break; + } + case SCHEMA_VIOLATION_REASON: + { + mergeSchemaViolationReason(other.getSchemaViolationReason()); + break; + } + case MESSAGE_TRANSFORMATION_FAILURE_REASON: + { + mergeMessageTransformationFailureReason( + other.getMessageTransformationFailureReason()); + break; + } + case REASON_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: + { + clusterArn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + kafkaTopic_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + partitionId_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + offset_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage( + internalGetApiViolationReasonFieldBuilder().getBuilder(), extensionRegistry); + reasonCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetSchemaViolationReasonFieldBuilder().getBuilder(), + extensionRegistry); + reasonCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetMessageTransformationFailureReasonFieldBuilder().getBuilder(), + extensionRegistry); + reasonCase_ = 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 reasonCase_ = 0; + private java.lang.Object reason_; + + public ReasonCase getReasonCase() { + return ReasonCase.forNumber(reasonCase_); + } + + public Builder clearReason() { + reasonCase_ = 0; + reason_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object clusterArn_ = ""; + + /** + * + * + *
    +       * Optional. The ARN of the cluster of the topic being ingested from.
    +       * 
    + * + * string cluster_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterArn. + */ + public java.lang.String getClusterArn() { + java.lang.Object ref = clusterArn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterArn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The ARN of the cluster of the topic being ingested from.
    +       * 
    + * + * string cluster_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterArn. + */ + public com.google.protobuf.ByteString getClusterArnBytes() { + java.lang.Object ref = clusterArn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The ARN of the cluster of the topic being ingested from.
    +       * 
    + * + * string cluster_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The clusterArn to set. + * @return This builder for chaining. + */ + public Builder setClusterArn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clusterArn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The ARN of the cluster of the topic being ingested from.
    +       * 
    + * + * string cluster_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearClusterArn() { + clusterArn_ = getDefaultInstance().getClusterArn(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The ARN of the cluster of the topic being ingested from.
    +       * 
    + * + * string cluster_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for clusterArn to set. + * @return This builder for chaining. + */ + public Builder setClusterArnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clusterArn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object kafkaTopic_ = ""; + + /** + * + * + *
    +       * Optional. The name of the Kafka topic being ingested from.
    +       * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kafkaTopic. + */ + public java.lang.String getKafkaTopic() { + java.lang.Object ref = kafkaTopic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kafkaTopic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The name of the Kafka topic being ingested from.
    +       * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kafkaTopic. + */ + public com.google.protobuf.ByteString getKafkaTopicBytes() { + java.lang.Object ref = kafkaTopic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kafkaTopic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The name of the Kafka topic being ingested from.
    +       * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The kafkaTopic to set. + * @return This builder for chaining. + */ + public Builder setKafkaTopic(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kafkaTopic_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The name of the Kafka topic being ingested from.
    +       * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearKafkaTopic() { + kafkaTopic_ = getDefaultInstance().getKafkaTopic(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The name of the Kafka topic being ingested from.
    +       * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for kafkaTopic to set. + * @return This builder for chaining. + */ + public Builder setKafkaTopicBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kafkaTopic_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long partitionId_; + + /** + * + * + *
    +       * Optional. The partition ID of the message that failed to be ingested.
    +       * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The partitionId. + */ + @java.lang.Override + public long getPartitionId() { + return partitionId_; + } + + /** + * + * + *
    +       * Optional. The partition ID of the message that failed to be ingested.
    +       * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The partitionId to set. + * @return This builder for chaining. + */ + public Builder setPartitionId(long value) { + + partitionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The partition ID of the message that failed to be ingested.
    +       * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPartitionId() { + bitField0_ = (bitField0_ & ~0x00000004); + partitionId_ = 0L; + onChanged(); + return this; + } + + private long offset_; + + /** + * + * + *
    +       * Optional. The offset within the partition of the message that failed to
    +       * be ingested.
    +       * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + + /** + * + * + *
    +       * Optional. The offset within the partition of the message that failed to
    +       * be ingested.
    +       * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The offset to set. + * @return This builder for chaining. + */ + public Builder setOffset(long value) { + + offset_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The offset within the partition of the message that failed to
    +       * be ingested.
    +       * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOffset() { + bitField0_ = (bitField0_ & ~0x00000008); + offset_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder> + apiViolationReasonBuilder_; + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + @java.lang.Override + public boolean hasApiViolationReason() { + return reasonCase_ == 5; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason() { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } else { + if (reasonCase_ == 5) { + return apiViolationReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason value) { + if (apiViolationReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); + } else { + apiViolationReasonBuilder_.setMessage(value); + } + reasonCase_ = 5; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder builderForValue) { + if (apiViolationReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + apiViolationReasonBuilder_.setMessage(builderForValue.build()); + } + reasonCase_ = 5; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason value) { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 5 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 5) { + apiViolationReasonBuilder_.mergeFrom(value); + } else { + apiViolationReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 5; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearApiViolationReason() { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 5) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 5) { + reasonCase_ = 0; + reason_ = null; + } + apiViolationReasonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder + getApiViolationReasonBuilder() { + return internalGetApiViolationReasonFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder() { + if ((reasonCase_ == 5) && (apiViolationReasonBuilder_ != null)) { + return apiViolationReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder> + internalGetApiViolationReasonFieldBuilder() { + if (apiViolationReasonBuilder_ == null) { + if (!(reasonCase_ == 5)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + apiViolationReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 5; + onChanged(); + return apiViolationReasonBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder> + schemaViolationReasonBuilder_; + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + @java.lang.Override + public boolean hasSchemaViolationReason() { + return reasonCase_ == 6; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + getSchemaViolationReason() { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } else { + if (reasonCase_ == 6) { + return schemaViolationReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason value) { + if (schemaViolationReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); + } else { + schemaViolationReasonBuilder_.setMessage(value); + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder + builderForValue) { + if (schemaViolationReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + schemaViolationReasonBuilder_.setMessage(builderForValue.build()); + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason value) { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 6 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 6) { + schemaViolationReasonBuilder_.mergeFrom(value); + } else { + schemaViolationReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSchemaViolationReason() { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 6) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 6) { + reasonCase_ = 0; + reason_ = null; + } + schemaViolationReasonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder + getSchemaViolationReasonBuilder() { + return internalGetSchemaViolationReasonFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder() { + if ((reasonCase_ == 6) && (schemaViolationReasonBuilder_ != null)) { + return schemaViolationReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder> + internalGetSchemaViolationReasonFieldBuilder() { + if (schemaViolationReasonBuilder_ == null) { + if (!(reasonCase_ == 6)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } + schemaViolationReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 6; + onChanged(); + return schemaViolationReasonBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder> + messageTransformationFailureReasonBuilder_; + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the messageTransformationFailureReason field is set. + */ + @java.lang.Override + public boolean hasMessageTransformationFailureReason() { + return reasonCase_ == 7; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The messageTransformationFailureReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason() { + if (messageTransformationFailureReasonBuilder_ == null) { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } else { + if (reasonCase_ == 7) { + return messageTransformationFailureReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason value) { + if (messageTransformationFailureReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); + } else { + messageTransformationFailureReasonBuilder_.setMessage(value); + } + reasonCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder + builderForValue) { + if (messageTransformationFailureReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + messageTransformationFailureReasonBuilder_.setMessage(builderForValue.build()); + } + reasonCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason value) { + if (messageTransformationFailureReasonBuilder_ == null) { + if (reasonCase_ == 7 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReason) + reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 7) { + messageTransformationFailureReasonBuilder_.mergeFrom(value); + } else { + messageTransformationFailureReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMessageTransformationFailureReason() { + if (messageTransformationFailureReasonBuilder_ == null) { + if (reasonCase_ == 7) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 7) { + reasonCase_ = 0; + reason_ = null; + } + messageTransformationFailureReasonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder + getMessageTransformationFailureReasonBuilder() { + return internalGetMessageTransformationFailureReasonFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder() { + if ((reasonCase_ == 7) && (messageTransformationFailureReasonBuilder_ != null)) { + return messageTransformationFailureReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder> + internalGetMessageTransformationFailureReasonFieldBuilder() { + if (messageTransformationFailureReasonBuilder_ == null) { + if (!(reasonCase_ == 7)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + messageTransformationFailureReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 7; + onChanged(); + return messageTransformationFailureReasonBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) + private static final com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason(); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsMskFailureReason parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AzureEventHubsFailureReasonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Optional. The namespace containing the event hub being ingested from.
    +     * 
    + * + * string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The namespace. + */ + java.lang.String getNamespace(); + + /** + * + * + *
    +     * Optional. The namespace containing the event hub being ingested from.
    +     * 
    + * + * string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for namespace. + */ + com.google.protobuf.ByteString getNamespaceBytes(); + + /** + * + * + *
    +     * Optional. The name of the event hub being ingested from.
    +     * 
    + * + * string event_hub = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The eventHub. + */ + java.lang.String getEventHub(); + + /** + * + * + *
    +     * Optional. The name of the event hub being ingested from.
    +     * 
    + * + * string event_hub = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for eventHub. + */ + com.google.protobuf.ByteString getEventHubBytes(); + + /** + * + * + *
    +     * Optional. The partition ID of the message that failed to be ingested.
    +     * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The partitionId. + */ + long getPartitionId(); + + /** + * + * + *
    +     * Optional. The offset within the partition of the message that failed to
    +     * be ingested.
    +     * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The offset. + */ + long getOffset(); + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + boolean hasApiViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + boolean hasSchemaViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason getSchemaViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the messageTransformationFailureReason field is set. + */ + boolean hasMessageTransformationFailureReason(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The messageTransformationFailureReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder(); + + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.ReasonCase + getReasonCase(); + } + + /** + * + * + *
    +   * Failure when ingesting from an Azure Event Hubs source.
    +   * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} + */ + public static final class AzureEventHubsFailureReason extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) + AzureEventHubsFailureReasonOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AzureEventHubsFailureReason"); + } + + // Use AzureEventHubsFailureReason.newBuilder() to construct. + private AzureEventHubsFailureReason(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AzureEventHubsFailureReason() { + namespace_ = ""; + eventHub_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AzureEventHubsFailureReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AzureEventHubsFailureReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.class, + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.Builder.class); + } + + private int reasonCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object reason_; + + public enum ReasonCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + API_VIOLATION_REASON(5), + SCHEMA_VIOLATION_REASON(6), + MESSAGE_TRANSFORMATION_FAILURE_REASON(7), + REASON_NOT_SET(0); + private final int value; + + private ReasonCase(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 ReasonCase valueOf(int value) { + return forNumber(value); + } + + public static ReasonCase forNumber(int value) { + switch (value) { + case 5: + return API_VIOLATION_REASON; + case 6: + return SCHEMA_VIOLATION_REASON; + case 7: + return MESSAGE_TRANSFORMATION_FAILURE_REASON; + case 0: + return REASON_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ReasonCase getReasonCase() { + return ReasonCase.forNumber(reasonCase_); + } + + public static final int NAMESPACE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object namespace_ = ""; + + /** + * + * + *
    +     * Optional. The namespace containing the event hub being ingested from.
    +     * 
    + * + * string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The namespace. + */ + @java.lang.Override + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespace_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The namespace containing the event hub being ingested from.
    +     * 
    + * + * string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for namespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENT_HUB_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object eventHub_ = ""; + + /** + * + * + *
    +     * Optional. The name of the event hub being ingested from.
    +     * 
    + * + * string event_hub = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The eventHub. + */ + @java.lang.Override + public java.lang.String getEventHub() { + java.lang.Object ref = eventHub_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventHub_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The name of the event hub being ingested from.
    +     * 
    + * + * string event_hub = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for eventHub. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventHubBytes() { + java.lang.Object ref = eventHub_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventHub_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARTITION_ID_FIELD_NUMBER = 3; + private long partitionId_ = 0L; + + /** + * + * + *
    +     * Optional. The partition ID of the message that failed to be ingested.
    +     * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The partitionId. + */ + @java.lang.Override + public long getPartitionId() { + return partitionId_; + } + + public static final int OFFSET_FIELD_NUMBER = 4; + private long offset_ = 0L; + + /** + * + * + *
    +     * Optional. The offset within the partition of the message that failed to
    +     * be ingested.
    +     * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + + public static final int API_VIOLATION_REASON_FIELD_NUMBER = 5; + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + @java.lang.Override + public boolean hasApiViolationReason() { + return reasonCase_ == 5; + } + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason() { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder() { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + + public static final int SCHEMA_VIOLATION_REASON_FIELD_NUMBER = 6; + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + @java.lang.Override + public boolean hasSchemaViolationReason() { + return reasonCase_ == 6; + } + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + getSchemaViolationReason() { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder() { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.getDefaultInstance(); + } + + public static final int MESSAGE_TRANSFORMATION_FAILURE_REASON_FIELD_NUMBER = 7; + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the messageTransformationFailureReason field is set. + */ + @java.lang.Override + public boolean hasMessageTransformationFailureReason() { + return reasonCase_ == 7; + } + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The messageTransformationFailureReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason() { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder() { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, namespace_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(eventHub_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, eventHub_); + } + if (partitionId_ != 0L) { + output.writeInt64(3, partitionId_); + } + if (offset_ != 0L) { + output.writeInt64(4, offset_); + } + if (reasonCase_ == 5) { + output.writeMessage( + 5, (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_); + } + if (reasonCase_ == 6) { + output.writeMessage( + 6, (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_); + } + if (reasonCase_ == 7) { + output.writeMessage( + 7, + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, namespace_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(eventHub_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, eventHub_); + } + if (partitionId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, partitionId_); + } + if (offset_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, offset_); + } + if (reasonCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_); + } + if (reasonCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_); + } + if (reasonCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason)) { + return super.equals(obj); + } + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason other = + (com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) obj; + + if (!getNamespace().equals(other.getNamespace())) return false; + if (!getEventHub().equals(other.getEventHub())) return false; + if (getPartitionId() != other.getPartitionId()) return false; + if (getOffset() != other.getOffset()) return false; + if (!getReasonCase().equals(other.getReasonCase())) return false; + switch (reasonCase_) { + case 5: + if (!getApiViolationReason().equals(other.getApiViolationReason())) return false; + break; + case 6: + if (!getSchemaViolationReason().equals(other.getSchemaViolationReason())) return false; + break; + case 7: + if (!getMessageTransformationFailureReason() + .equals(other.getMessageTransformationFailureReason())) 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) + NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getNamespace().hashCode(); + hash = (37 * hash) + EVENT_HUB_FIELD_NUMBER; + hash = (53 * hash) + getEventHub().hashCode(); + hash = (37 * hash) + PARTITION_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPartitionId()); + hash = (37 * hash) + OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOffset()); + switch (reasonCase_) { + case 5: + hash = (37 * hash) + API_VIOLATION_REASON_FIELD_NUMBER; + hash = (53 * hash) + getApiViolationReason().hashCode(); + break; + case 6: + hash = (37 * hash) + SCHEMA_VIOLATION_REASON_FIELD_NUMBER; + hash = (53 * hash) + getSchemaViolationReason().hashCode(); + break; + case 7: + hash = (37 * hash) + MESSAGE_TRANSFORMATION_FAILURE_REASON_FIELD_NUMBER; + hash = (53 * hash) + getMessageTransformationFailureReason().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * Failure when ingesting from an Azure Event Hubs source.
    +     * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReasonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AzureEventHubsFailureReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AzureEventHubsFailureReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.class, + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.Builder + .class); + } + + // Construct using + // com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + namespace_ = ""; + eventHub_ = ""; + partitionId_ = 0L; + offset_ = 0L; + if (apiViolationReasonBuilder_ != null) { + apiViolationReasonBuilder_.clear(); + } + if (schemaViolationReasonBuilder_ != null) { + schemaViolationReasonBuilder_.clear(); + } + if (messageTransformationFailureReasonBuilder_ != null) { + messageTransformationFailureReasonBuilder_.clear(); + } + reasonCase_ = 0; + reason_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AzureEventHubsFailureReason_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + getDefaultInstanceForType() { + return com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason build() { + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason buildPartial() { + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason result = + new com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.namespace_ = namespace_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.eventHub_ = eventHub_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.partitionId_ = partitionId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.offset_ = offset_; + } + } + + private void buildPartialOneofs( + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason result) { + result.reasonCase_ = reasonCase_; + result.reason_ = this.reason_; + if (reasonCase_ == 5 && apiViolationReasonBuilder_ != null) { + result.reason_ = apiViolationReasonBuilder_.build(); + } + if (reasonCase_ == 6 && schemaViolationReasonBuilder_ != null) { + result.reason_ = schemaViolationReasonBuilder_.build(); + } + if (reasonCase_ == 7 && messageTransformationFailureReasonBuilder_ != null) { + result.reason_ = messageTransformationFailureReasonBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) { + return mergeFrom( + (com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason other) { + if (other + == com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + .getDefaultInstance()) return this; + if (!other.getNamespace().isEmpty()) { + namespace_ = other.namespace_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEventHub().isEmpty()) { + eventHub_ = other.eventHub_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPartitionId() != 0L) { + setPartitionId(other.getPartitionId()); + } + if (other.getOffset() != 0L) { + setOffset(other.getOffset()); + } + switch (other.getReasonCase()) { + case API_VIOLATION_REASON: + { + mergeApiViolationReason(other.getApiViolationReason()); + break; + } + case SCHEMA_VIOLATION_REASON: + { + mergeSchemaViolationReason(other.getSchemaViolationReason()); + break; + } + case MESSAGE_TRANSFORMATION_FAILURE_REASON: + { + mergeMessageTransformationFailureReason( + other.getMessageTransformationFailureReason()); + break; + } + case REASON_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: + { + namespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + eventHub_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + partitionId_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + offset_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage( + internalGetApiViolationReasonFieldBuilder().getBuilder(), extensionRegistry); + reasonCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetSchemaViolationReasonFieldBuilder().getBuilder(), + extensionRegistry); + reasonCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetMessageTransformationFailureReasonFieldBuilder().getBuilder(), + extensionRegistry); + reasonCase_ = 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 reasonCase_ = 0; + private java.lang.Object reason_; + + public ReasonCase getReasonCase() { + return ReasonCase.forNumber(reasonCase_); + } + + public Builder clearReason() { + reasonCase_ = 0; + reason_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object namespace_ = ""; + + /** + * + * + *
    +       * Optional. The namespace containing the event hub being ingested from.
    +       * 
    + * + * string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The namespace. + */ + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The namespace containing the event hub being ingested from.
    +       * 
    + * + * string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for namespace. + */ + public com.google.protobuf.ByteString getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The namespace containing the event hub being ingested from.
    +       * 
    + * + * string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The namespace to set. + * @return This builder for chaining. + */ + public Builder setNamespace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + namespace_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The namespace containing the event hub being ingested from.
    +       * 
    + * + * string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNamespace() { + namespace_ = getDefaultInstance().getNamespace(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The namespace containing the event hub being ingested from.
    +       * 
    + * + * string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for namespace to set. + * @return This builder for chaining. + */ + public Builder setNamespaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + namespace_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object eventHub_ = ""; + + /** + * + * + *
    +       * Optional. The name of the event hub being ingested from.
    +       * 
    + * + * string event_hub = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The eventHub. + */ + public java.lang.String getEventHub() { + java.lang.Object ref = eventHub_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventHub_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The name of the event hub being ingested from.
    +       * 
    + * + * string event_hub = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for eventHub. + */ + public com.google.protobuf.ByteString getEventHubBytes() { + java.lang.Object ref = eventHub_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventHub_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The name of the event hub being ingested from.
    +       * 
    + * + * string event_hub = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The eventHub to set. + * @return This builder for chaining. + */ + public Builder setEventHub(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + eventHub_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The name of the event hub being ingested from.
    +       * 
    + * + * string event_hub = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEventHub() { + eventHub_ = getDefaultInstance().getEventHub(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The name of the event hub being ingested from.
    +       * 
    + * + * string event_hub = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for eventHub to set. + * @return This builder for chaining. + */ + public Builder setEventHubBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + eventHub_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long partitionId_; + + /** + * + * + *
    +       * Optional. The partition ID of the message that failed to be ingested.
    +       * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The partitionId. + */ + @java.lang.Override + public long getPartitionId() { + return partitionId_; + } + + /** + * + * + *
    +       * Optional. The partition ID of the message that failed to be ingested.
    +       * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The partitionId to set. + * @return This builder for chaining. + */ + public Builder setPartitionId(long value) { + + partitionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The partition ID of the message that failed to be ingested.
    +       * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPartitionId() { + bitField0_ = (bitField0_ & ~0x00000004); + partitionId_ = 0L; + onChanged(); + return this; + } + + private long offset_; + + /** + * + * + *
    +       * Optional. The offset within the partition of the message that failed to
    +       * be ingested.
    +       * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + + /** + * + * + *
    +       * Optional. The offset within the partition of the message that failed to
    +       * be ingested.
    +       * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The offset to set. + * @return This builder for chaining. + */ + public Builder setOffset(long value) { + + offset_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The offset within the partition of the message that failed to
    +       * be ingested.
    +       * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOffset() { + bitField0_ = (bitField0_ & ~0x00000008); + offset_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder> + apiViolationReasonBuilder_; + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + @java.lang.Override + public boolean hasApiViolationReason() { + return reasonCase_ == 5; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason() { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } else { + if (reasonCase_ == 5) { + return apiViolationReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason value) { + if (apiViolationReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); + } else { + apiViolationReasonBuilder_.setMessage(value); + } + reasonCase_ = 5; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder builderForValue) { + if (apiViolationReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + apiViolationReasonBuilder_.setMessage(builderForValue.build()); + } + reasonCase_ = 5; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason value) { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 5 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 5) { + apiViolationReasonBuilder_.mergeFrom(value); + } else { + apiViolationReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 5; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearApiViolationReason() { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 5) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 5) { + reasonCase_ = 0; + reason_ = null; + } + apiViolationReasonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder + getApiViolationReasonBuilder() { + return internalGetApiViolationReasonFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder() { + if ((reasonCase_ == 5) && (apiViolationReasonBuilder_ != null)) { + return apiViolationReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder> + internalGetApiViolationReasonFieldBuilder() { + if (apiViolationReasonBuilder_ == null) { + if (!(reasonCase_ == 5)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + apiViolationReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 5; + onChanged(); + return apiViolationReasonBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder> + schemaViolationReasonBuilder_; + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + @java.lang.Override + public boolean hasSchemaViolationReason() { + return reasonCase_ == 6; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + getSchemaViolationReason() { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } else { + if (reasonCase_ == 6) { + return schemaViolationReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason value) { + if (schemaViolationReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); + } else { + schemaViolationReasonBuilder_.setMessage(value); + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder + builderForValue) { + if (schemaViolationReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + schemaViolationReasonBuilder_.setMessage(builderForValue.build()); + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason value) { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 6 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 6) { + schemaViolationReasonBuilder_.mergeFrom(value); + } else { + schemaViolationReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSchemaViolationReason() { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 6) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 6) { + reasonCase_ = 0; + reason_ = null; + } + schemaViolationReasonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder + getSchemaViolationReasonBuilder() { + return internalGetSchemaViolationReasonFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder() { + if ((reasonCase_ == 6) && (schemaViolationReasonBuilder_ != null)) { + return schemaViolationReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder> + internalGetSchemaViolationReasonFieldBuilder() { + if (schemaViolationReasonBuilder_ == null) { + if (!(reasonCase_ == 6)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } + schemaViolationReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 6; + onChanged(); + return schemaViolationReasonBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder> + messageTransformationFailureReasonBuilder_; + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the messageTransformationFailureReason field is set. + */ + @java.lang.Override + public boolean hasMessageTransformationFailureReason() { + return reasonCase_ == 7; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The messageTransformationFailureReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason() { + if (messageTransformationFailureReasonBuilder_ == null) { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } else { + if (reasonCase_ == 7) { + return messageTransformationFailureReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason value) { + if (messageTransformationFailureReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); + } else { + messageTransformationFailureReasonBuilder_.setMessage(value); + } + reasonCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder + builderForValue) { + if (messageTransformationFailureReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + messageTransformationFailureReasonBuilder_.setMessage(builderForValue.build()); + } + reasonCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason value) { + if (messageTransformationFailureReasonBuilder_ == null) { + if (reasonCase_ == 7 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReason) + reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 7) { + messageTransformationFailureReasonBuilder_.mergeFrom(value); + } else { + messageTransformationFailureReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMessageTransformationFailureReason() { + if (messageTransformationFailureReasonBuilder_ == null) { + if (reasonCase_ == 7) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 7) { + reasonCase_ = 0; + reason_ = null; + } + messageTransformationFailureReasonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder + getMessageTransformationFailureReasonBuilder() { + return internalGetMessageTransformationFailureReasonFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder() { + if ((reasonCase_ == 7) && (messageTransformationFailureReasonBuilder_ != null)) { + return messageTransformationFailureReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder> + internalGetMessageTransformationFailureReasonFieldBuilder() { + if (messageTransformationFailureReasonBuilder_ == null) { + if (!(reasonCase_ == 7)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + messageTransformationFailureReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 7; + onChanged(); + return messageTransformationFailureReasonBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) + private static final com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason(); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureEventHubsFailureReason parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConfluentCloudFailureReasonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Optional. The cluster ID containing the topic being ingested from.
    +     * 
    + * + * string cluster_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterId. + */ + java.lang.String getClusterId(); + + /** + * + * + *
    +     * Optional. The cluster ID containing the topic being ingested from.
    +     * 
    + * + * string cluster_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterId. + */ + com.google.protobuf.ByteString getClusterIdBytes(); + + /** + * + * + *
    +     * Optional. The name of the Kafka topic being ingested from.
    +     * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kafkaTopic. + */ + java.lang.String getKafkaTopic(); + + /** + * + * + *
    +     * Optional. The name of the Kafka topic being ingested from.
    +     * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kafkaTopic. + */ + com.google.protobuf.ByteString getKafkaTopicBytes(); + + /** + * + * + *
    +     * Optional. The partition ID of the message that failed to be ingested.
    +     * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The partitionId. + */ + long getPartitionId(); + + /** + * + * + *
    +     * Optional. The offset within the partition of the message that failed to
    +     * be ingested.
    +     * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The offset. + */ + long getOffset(); + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + boolean hasApiViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + boolean hasSchemaViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason getSchemaViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the messageTransformationFailureReason field is set. + */ + boolean hasMessageTransformationFailureReason(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The messageTransformationFailureReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder(); + + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.ReasonCase + getReasonCase(); + } + + /** + * + * + *
    +   * Failure when ingesting from a Confluent Cloud source.
    +   * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} + */ + public static final class ConfluentCloudFailureReason extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) + ConfluentCloudFailureReasonOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ConfluentCloudFailureReason"); + } + + // Use ConfluentCloudFailureReason.newBuilder() to construct. + private ConfluentCloudFailureReason(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ConfluentCloudFailureReason() { + clusterId_ = ""; + kafkaTopic_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_ConfluentCloudFailureReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_ConfluentCloudFailureReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.class, + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.Builder.class); + } + + private int reasonCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object reason_; + + public enum ReasonCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + API_VIOLATION_REASON(5), + SCHEMA_VIOLATION_REASON(6), + MESSAGE_TRANSFORMATION_FAILURE_REASON(7), + REASON_NOT_SET(0); + private final int value; + + private ReasonCase(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 ReasonCase valueOf(int value) { + return forNumber(value); + } + + public static ReasonCase forNumber(int value) { + switch (value) { + case 5: + return API_VIOLATION_REASON; + case 6: + return SCHEMA_VIOLATION_REASON; + case 7: + return MESSAGE_TRANSFORMATION_FAILURE_REASON; + case 0: + return REASON_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ReasonCase getReasonCase() { + return ReasonCase.forNumber(reasonCase_); + } + + public static final int CLUSTER_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object clusterId_ = ""; + + /** + * + * + *
    +     * Optional. The cluster ID containing the topic being ingested from.
    +     * 
    + * + * string cluster_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterId. + */ + @java.lang.Override + public java.lang.String getClusterId() { + java.lang.Object ref = clusterId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterId_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The cluster ID containing the topic being ingested from.
    +     * 
    + * + * string cluster_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterIdBytes() { + java.lang.Object ref = clusterId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KAFKA_TOPIC_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object kafkaTopic_ = ""; + + /** + * + * + *
    +     * Optional. The name of the Kafka topic being ingested from.
    +     * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kafkaTopic. + */ + @java.lang.Override + public java.lang.String getKafkaTopic() { + java.lang.Object ref = kafkaTopic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kafkaTopic_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The name of the Kafka topic being ingested from.
    +     * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kafkaTopic. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKafkaTopicBytes() { + java.lang.Object ref = kafkaTopic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kafkaTopic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARTITION_ID_FIELD_NUMBER = 3; + private long partitionId_ = 0L; + + /** + * + * + *
    +     * Optional. The partition ID of the message that failed to be ingested.
    +     * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The partitionId. + */ + @java.lang.Override + public long getPartitionId() { + return partitionId_; + } + + public static final int OFFSET_FIELD_NUMBER = 4; + private long offset_ = 0L; + + /** + * + * + *
    +     * Optional. The offset within the partition of the message that failed to
    +     * be ingested.
    +     * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + + public static final int API_VIOLATION_REASON_FIELD_NUMBER = 5; + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + @java.lang.Override + public boolean hasApiViolationReason() { + return reasonCase_ == 5; + } + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason() { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. The Pub/Sub API limits prevented the desired message from
    +     * being published.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder() { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + + public static final int SCHEMA_VIOLATION_REASON_FIELD_NUMBER = 6; + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + @java.lang.Override + public boolean hasSchemaViolationReason() { + return reasonCase_ == 6; + } + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + getSchemaViolationReason() { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder() { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.getDefaultInstance(); + } + + public static final int MESSAGE_TRANSFORMATION_FAILURE_REASON_FIELD_NUMBER = 7; + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the messageTransformationFailureReason field is set. + */ + @java.lang.Override + public boolean hasMessageTransformationFailureReason() { + return reasonCase_ == 7; + } + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The messageTransformationFailureReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason() { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder() { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, clusterId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kafkaTopic_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, kafkaTopic_); + } + if (partitionId_ != 0L) { + output.writeInt64(3, partitionId_); + } + if (offset_ != 0L) { + output.writeInt64(4, offset_); + } + if (reasonCase_ == 5) { + output.writeMessage( + 5, (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_); + } + if (reasonCase_ == 6) { + output.writeMessage( + 6, (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_); + } + if (reasonCase_ == 7) { + output.writeMessage( + 7, + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, clusterId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kafkaTopic_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kafkaTopic_); + } + if (partitionId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, partitionId_); + } + if (offset_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, offset_); + } + if (reasonCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_); + } + if (reasonCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_); + } + if (reasonCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason)) { + return super.equals(obj); + } + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason other = + (com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) obj; + + if (!getClusterId().equals(other.getClusterId())) return false; + if (!getKafkaTopic().equals(other.getKafkaTopic())) return false; + if (getPartitionId() != other.getPartitionId()) return false; + if (getOffset() != other.getOffset()) return false; + if (!getReasonCase().equals(other.getReasonCase())) return false; + switch (reasonCase_) { + case 5: + if (!getApiViolationReason().equals(other.getApiViolationReason())) return false; + break; + case 6: + if (!getSchemaViolationReason().equals(other.getSchemaViolationReason())) return false; + break; + case 7: + if (!getMessageTransformationFailureReason() + .equals(other.getMessageTransformationFailureReason())) 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) + CLUSTER_ID_FIELD_NUMBER; + hash = (53 * hash) + getClusterId().hashCode(); + hash = (37 * hash) + KAFKA_TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getKafkaTopic().hashCode(); + hash = (37 * hash) + PARTITION_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPartitionId()); + hash = (37 * hash) + OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOffset()); + switch (reasonCase_) { + case 5: + hash = (37 * hash) + API_VIOLATION_REASON_FIELD_NUMBER; + hash = (53 * hash) + getApiViolationReason().hashCode(); + break; + case 6: + hash = (37 * hash) + SCHEMA_VIOLATION_REASON_FIELD_NUMBER; + hash = (53 * hash) + getSchemaViolationReason().hashCode(); + break; + case 7: + hash = (37 * hash) + MESSAGE_TRANSFORMATION_FAILURE_REASON_FIELD_NUMBER; + hash = (53 * hash) + getMessageTransformationFailureReason().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * Failure when ingesting from a Confluent Cloud source.
    +     * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReasonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_ConfluentCloudFailureReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_ConfluentCloudFailureReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.class, + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.Builder + .class); + } + + // Construct using + // com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + clusterId_ = ""; + kafkaTopic_ = ""; + partitionId_ = 0L; + offset_ = 0L; + if (apiViolationReasonBuilder_ != null) { + apiViolationReasonBuilder_.clear(); + } + if (schemaViolationReasonBuilder_ != null) { + schemaViolationReasonBuilder_.clear(); + } + if (messageTransformationFailureReasonBuilder_ != null) { + messageTransformationFailureReasonBuilder_.clear(); + } + reasonCase_ = 0; + reason_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_ConfluentCloudFailureReason_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + getDefaultInstanceForType() { + return com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason build() { + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason buildPartial() { + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason result = + new com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.clusterId_ = clusterId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kafkaTopic_ = kafkaTopic_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.partitionId_ = partitionId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.offset_ = offset_; + } + } + + private void buildPartialOneofs( + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason result) { + result.reasonCase_ = reasonCase_; + result.reason_ = this.reason_; + if (reasonCase_ == 5 && apiViolationReasonBuilder_ != null) { + result.reason_ = apiViolationReasonBuilder_.build(); + } + if (reasonCase_ == 6 && schemaViolationReasonBuilder_ != null) { + result.reason_ = schemaViolationReasonBuilder_.build(); + } + if (reasonCase_ == 7 && messageTransformationFailureReasonBuilder_ != null) { + result.reason_ = messageTransformationFailureReasonBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) { + return mergeFrom( + (com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason other) { + if (other + == com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + .getDefaultInstance()) return this; + if (!other.getClusterId().isEmpty()) { + clusterId_ = other.clusterId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKafkaTopic().isEmpty()) { + kafkaTopic_ = other.kafkaTopic_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPartitionId() != 0L) { + setPartitionId(other.getPartitionId()); + } + if (other.getOffset() != 0L) { + setOffset(other.getOffset()); + } + switch (other.getReasonCase()) { + case API_VIOLATION_REASON: + { + mergeApiViolationReason(other.getApiViolationReason()); + break; + } + case SCHEMA_VIOLATION_REASON: + { + mergeSchemaViolationReason(other.getSchemaViolationReason()); + break; + } + case MESSAGE_TRANSFORMATION_FAILURE_REASON: + { + mergeMessageTransformationFailureReason( + other.getMessageTransformationFailureReason()); + break; + } + case REASON_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: + { + clusterId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + kafkaTopic_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + partitionId_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + offset_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage( + internalGetApiViolationReasonFieldBuilder().getBuilder(), extensionRegistry); + reasonCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetSchemaViolationReasonFieldBuilder().getBuilder(), + extensionRegistry); + reasonCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetMessageTransformationFailureReasonFieldBuilder().getBuilder(), + extensionRegistry); + reasonCase_ = 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 reasonCase_ = 0; + private java.lang.Object reason_; + + public ReasonCase getReasonCase() { + return ReasonCase.forNumber(reasonCase_); + } + + public Builder clearReason() { + reasonCase_ = 0; + reason_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object clusterId_ = ""; + + /** + * + * + *
    +       * Optional. The cluster ID containing the topic being ingested from.
    +       * 
    + * + * string cluster_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterId. + */ + public java.lang.String getClusterId() { + java.lang.Object ref = clusterId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The cluster ID containing the topic being ingested from.
    +       * 
    + * + * string cluster_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterId. + */ + public com.google.protobuf.ByteString getClusterIdBytes() { + java.lang.Object ref = clusterId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The cluster ID containing the topic being ingested from.
    +       * 
    + * + * string cluster_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The clusterId to set. + * @return This builder for chaining. + */ + public Builder setClusterId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clusterId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The cluster ID containing the topic being ingested from.
    +       * 
    + * + * string cluster_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearClusterId() { + clusterId_ = getDefaultInstance().getClusterId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The cluster ID containing the topic being ingested from.
    +       * 
    + * + * string cluster_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for clusterId to set. + * @return This builder for chaining. + */ + public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clusterId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object kafkaTopic_ = ""; + + /** + * + * + *
    +       * Optional. The name of the Kafka topic being ingested from.
    +       * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kafkaTopic. + */ + public java.lang.String getKafkaTopic() { + java.lang.Object ref = kafkaTopic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kafkaTopic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The name of the Kafka topic being ingested from.
    +       * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kafkaTopic. + */ + public com.google.protobuf.ByteString getKafkaTopicBytes() { + java.lang.Object ref = kafkaTopic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kafkaTopic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The name of the Kafka topic being ingested from.
    +       * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The kafkaTopic to set. + * @return This builder for chaining. + */ + public Builder setKafkaTopic(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kafkaTopic_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The name of the Kafka topic being ingested from.
    +       * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearKafkaTopic() { + kafkaTopic_ = getDefaultInstance().getKafkaTopic(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The name of the Kafka topic being ingested from.
    +       * 
    + * + * string kafka_topic = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for kafkaTopic to set. + * @return This builder for chaining. + */ + public Builder setKafkaTopicBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kafkaTopic_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long partitionId_; + + /** + * + * + *
    +       * Optional. The partition ID of the message that failed to be ingested.
    +       * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The partitionId. + */ + @java.lang.Override + public long getPartitionId() { + return partitionId_; + } + + /** + * + * + *
    +       * Optional. The partition ID of the message that failed to be ingested.
    +       * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The partitionId to set. + * @return This builder for chaining. + */ + public Builder setPartitionId(long value) { + + partitionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The partition ID of the message that failed to be ingested.
    +       * 
    + * + * int64 partition_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPartitionId() { + bitField0_ = (bitField0_ & ~0x00000004); + partitionId_ = 0L; + onChanged(); + return this; + } + + private long offset_; + + /** + * + * + *
    +       * Optional. The offset within the partition of the message that failed to
    +       * be ingested.
    +       * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + + /** + * + * + *
    +       * Optional. The offset within the partition of the message that failed to
    +       * be ingested.
    +       * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The offset to set. + * @return This builder for chaining. + */ + public Builder setOffset(long value) { + + offset_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The offset within the partition of the message that failed to
    +       * be ingested.
    +       * 
    + * + * int64 offset = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOffset() { + bitField0_ = (bitField0_ & ~0x00000008); + offset_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder> + apiViolationReasonBuilder_; + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + @java.lang.Override + public boolean hasApiViolationReason() { + return reasonCase_ == 5; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason() { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } else { + if (reasonCase_ == 5) { + return apiViolationReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason value) { + if (apiViolationReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); + } else { + apiViolationReasonBuilder_.setMessage(value); + } + reasonCase_ = 5; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder builderForValue) { + if (apiViolationReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + apiViolationReasonBuilder_.setMessage(builderForValue.build()); + } + reasonCase_ = 5; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason value) { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 5 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 5) { + apiViolationReasonBuilder_.mergeFrom(value); + } else { + apiViolationReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 5; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearApiViolationReason() { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 5) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 5) { + reasonCase_ = 0; + reason_ = null; + } + apiViolationReasonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder + getApiViolationReasonBuilder() { + return internalGetApiViolationReasonFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder() { + if ((reasonCase_ == 5) && (apiViolationReasonBuilder_ != null)) { + return apiViolationReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub API limits prevented the desired message from
    +       * being published.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder> + internalGetApiViolationReasonFieldBuilder() { + if (apiViolationReasonBuilder_ == null) { + if (!(reasonCase_ == 5)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + apiViolationReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 5; + onChanged(); + return apiViolationReasonBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder> + schemaViolationReasonBuilder_; + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + @java.lang.Override + public boolean hasSchemaViolationReason() { + return reasonCase_ == 6; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + getSchemaViolationReason() { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } else { + if (reasonCase_ == 6) { + return schemaViolationReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason value) { + if (schemaViolationReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); + } else { + schemaViolationReasonBuilder_.setMessage(value); + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder + builderForValue) { + if (schemaViolationReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + schemaViolationReasonBuilder_.setMessage(builderForValue.build()); + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason value) { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 6 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 6) { + schemaViolationReasonBuilder_.mergeFrom(value); + } else { + schemaViolationReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSchemaViolationReason() { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 6) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 6) { + reasonCase_ = 0; + reason_ = null; + } + schemaViolationReasonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder + getSchemaViolationReasonBuilder() { + return internalGetSchemaViolationReasonFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder() { + if ((reasonCase_ == 6) && (schemaViolationReasonBuilder_ != null)) { + return schemaViolationReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder> + internalGetSchemaViolationReasonFieldBuilder() { + if (schemaViolationReasonBuilder_ == null) { + if (!(reasonCase_ == 6)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } + schemaViolationReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 6; + onChanged(); + return schemaViolationReasonBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder> + messageTransformationFailureReasonBuilder_; + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the messageTransformationFailureReason field is set. + */ + @java.lang.Override + public boolean hasMessageTransformationFailureReason() { + return reasonCase_ == 7; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The messageTransformationFailureReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason() { + if (messageTransformationFailureReasonBuilder_ == null) { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } else { + if (reasonCase_ == 7) { + return messageTransformationFailureReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason value) { + if (messageTransformationFailureReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); + } else { + messageTransformationFailureReasonBuilder_.setMessage(value); + } + reasonCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder + builderForValue) { + if (messageTransformationFailureReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + messageTransformationFailureReasonBuilder_.setMessage(builderForValue.build()); + } + reasonCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason value) { + if (messageTransformationFailureReasonBuilder_ == null) { + if (reasonCase_ == 7 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReason) + reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 7) { + messageTransformationFailureReasonBuilder_.mergeFrom(value); + } else { + messageTransformationFailureReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 7; + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMessageTransformationFailureReason() { + if (messageTransformationFailureReasonBuilder_ == null) { + if (reasonCase_ == 7) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 7) { + reasonCase_ = 0; + reason_ = null; + } + messageTransformationFailureReasonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder + getMessageTransformationFailureReasonBuilder() { + return internalGetMessageTransformationFailureReasonFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder() { + if ((reasonCase_ == 7) && (messageTransformationFailureReasonBuilder_ != null)) { + return messageTransformationFailureReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + } + + /** + * + * + *
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder> + internalGetMessageTransformationFailureReasonFieldBuilder() { + if (messageTransformationFailureReasonBuilder_ == null) { + if (!(reasonCase_ == 7)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + messageTransformationFailureReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 7; + onChanged(); + return messageTransformationFailureReasonBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) + private static final com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason(); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfluentCloudFailureReason parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AwsKinesisFailureReasonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Optional. The stream ARN of the Kinesis stream being ingested from.
    +     * 
    + * + * string stream_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The streamArn. + */ + java.lang.String getStreamArn(); + + /** + * + * + *
    +     * Optional. The stream ARN of the Kinesis stream being ingested from.
    +     * 
    + * + * string stream_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for streamArn. + */ + com.google.protobuf.ByteString getStreamArnBytes(); + + /** + * + * + *
    +     * Optional. The partition key of the message that failed to be ingested.
    +     * 
    + * + * string partition_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The partitionKey. + */ + java.lang.String getPartitionKey(); + + /** + * + * + *
    +     * Optional. The partition key of the message that failed to be ingested.
    +     * 
    + * + * string partition_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for partitionKey. + */ + com.google.protobuf.ByteString getPartitionKeyBytes(); + + /** + * + * + *
    +     * Optional. The sequence number of the message that failed to be ingested.
    +     * 
    + * + * string sequence_number = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sequenceNumber. + */ + java.lang.String getSequenceNumber(); + + /** + * + * + *
    +     * Optional. The sequence number of the message that failed to be ingested.
    +     * 
    + * + * string sequence_number = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sequenceNumber. + */ + com.google.protobuf.ByteString getSequenceNumberBytes(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + boolean hasSchemaViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason getSchemaViolationReason(); + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the messageTransformationFailureReason field is set. + */ + boolean hasMessageTransformationFailureReason(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The messageTransformationFailureReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason(); + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder(); + + /** + * + * + *
    +     * Optional. The message failed to be published due to an API violation.
    +     * This is only set when the size of the data field of the Kinesis record
    +     * is zero.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + boolean hasApiViolationReason(); + + /** + * + * + *
    +     * Optional. The message failed to be published due to an API violation.
    +     * This is only set when the size of the data field of the Kinesis record
    +     * is zero.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason(); + + /** + * + * + *
    +     * Optional. The message failed to be published due to an API violation.
    +     * This is only set when the size of the data field of the Kinesis record
    +     * is zero.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder(); + + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.ReasonCase getReasonCase(); + } + + /** + * + * + *
    +   * Failure when ingesting from an AWS Kinesis source.
    +   * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason} + */ + public static final class AwsKinesisFailureReason extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) + AwsKinesisFailureReasonOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AwsKinesisFailureReason"); + } + + // Use AwsKinesisFailureReason.newBuilder() to construct. + private AwsKinesisFailureReason(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AwsKinesisFailureReason() { + streamArn_ = ""; + partitionKey_ = ""; + sequenceNumber_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AwsKinesisFailureReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AwsKinesisFailureReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.class, + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.Builder.class); + } + + private int reasonCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object reason_; + + public enum ReasonCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SCHEMA_VIOLATION_REASON(4), + MESSAGE_TRANSFORMATION_FAILURE_REASON(5), + API_VIOLATION_REASON(6), + REASON_NOT_SET(0); + private final int value; + + private ReasonCase(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 ReasonCase valueOf(int value) { + return forNumber(value); + } + + public static ReasonCase forNumber(int value) { + switch (value) { + case 4: + return SCHEMA_VIOLATION_REASON; + case 5: + return MESSAGE_TRANSFORMATION_FAILURE_REASON; + case 6: + return API_VIOLATION_REASON; + case 0: + return REASON_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ReasonCase getReasonCase() { + return ReasonCase.forNumber(reasonCase_); + } + + public static final int STREAM_ARN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object streamArn_ = ""; + + /** + * + * + *
    +     * Optional. The stream ARN of the Kinesis stream being ingested from.
    +     * 
    + * + * string stream_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The streamArn. + */ + @java.lang.Override + public java.lang.String getStreamArn() { + java.lang.Object ref = streamArn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + streamArn_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The stream ARN of the Kinesis stream being ingested from.
    +     * 
    + * + * string stream_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for streamArn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStreamArnBytes() { + java.lang.Object ref = streamArn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + streamArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARTITION_KEY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object partitionKey_ = ""; + + /** + * + * + *
    +     * Optional. The partition key of the message that failed to be ingested.
    +     * 
    + * + * string partition_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The partitionKey. + */ + @java.lang.Override + public java.lang.String getPartitionKey() { + java.lang.Object ref = partitionKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partitionKey_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The partition key of the message that failed to be ingested.
    +     * 
    + * + * string partition_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for partitionKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPartitionKeyBytes() { + java.lang.Object ref = partitionKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + partitionKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEQUENCE_NUMBER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object sequenceNumber_ = ""; + + /** + * + * + *
    +     * Optional. The sequence number of the message that failed to be ingested.
    +     * 
    + * + * string sequence_number = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sequenceNumber. + */ + @java.lang.Override + public java.lang.String getSequenceNumber() { + java.lang.Object ref = sequenceNumber_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sequenceNumber_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The sequence number of the message that failed to be ingested.
    +     * 
    + * + * string sequence_number = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sequenceNumber. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSequenceNumberBytes() { + java.lang.Object ref = sequenceNumber_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sequenceNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMA_VIOLATION_REASON_FIELD_NUMBER = 4; + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + @java.lang.Override + public boolean hasSchemaViolationReason() { + return reasonCase_ == 4; + } + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + getSchemaViolationReason() { + if (reasonCase_ == 4) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. The Pub/Sub message failed schema validation.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder() { + if (reasonCase_ == 4) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.getDefaultInstance(); + } + + public static final int MESSAGE_TRANSFORMATION_FAILURE_REASON_FIELD_NUMBER = 5; + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the messageTransformationFailureReason field is set. + */ + @java.lang.Override + public boolean hasMessageTransformationFailureReason() { + return reasonCase_ == 5; + } + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The messageTransformationFailureReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason() { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. Failure encountered when applying a message transformation to
    +     * the Pub/Sub message.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder() { + if (reasonCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); + } + + public static final int API_VIOLATION_REASON_FIELD_NUMBER = 6; + + /** + * + * + *
    +     * Optional. The message failed to be published due to an API violation.
    +     * This is only set when the size of the data field of the Kinesis record
    +     * is zero.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + @java.lang.Override + public boolean hasApiViolationReason() { + return reasonCase_ == 6; + } + + /** + * + * + *
    +     * Optional. The message failed to be published due to an API violation.
    +     * This is only set when the size of the data field of the Kinesis record
    +     * is zero.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason() { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + + /** + * + * + *
    +     * Optional. The message failed to be published due to an API violation.
    +     * This is only set when the size of the data field of the Kinesis record
    +     * is zero.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder() { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(streamArn_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, streamArn_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partitionKey_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, partitionKey_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sequenceNumber_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, sequenceNumber_); + } + if (reasonCase_ == 4) { + output.writeMessage( + 4, (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_); + } + if (reasonCase_ == 5) { + output.writeMessage( + 5, + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_); + } + if (reasonCase_ == 6) { + output.writeMessage( + 6, (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(streamArn_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, streamArn_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partitionKey_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, partitionKey_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sequenceNumber_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, sequenceNumber_); + } + if (reasonCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_); + } + if (reasonCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_); + } + if (reasonCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason)) { + return super.equals(obj); + } + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason other = + (com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) obj; + + if (!getStreamArn().equals(other.getStreamArn())) return false; + if (!getPartitionKey().equals(other.getPartitionKey())) return false; + if (!getSequenceNumber().equals(other.getSequenceNumber())) return false; + if (!getReasonCase().equals(other.getReasonCase())) return false; + switch (reasonCase_) { + case 4: + if (!getSchemaViolationReason().equals(other.getSchemaViolationReason())) return false; + break; + case 5: + if (!getMessageTransformationFailureReason() + .equals(other.getMessageTransformationFailureReason())) return false; + break; + case 6: + if (!getApiViolationReason().equals(other.getApiViolationReason())) 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) + STREAM_ARN_FIELD_NUMBER; + hash = (53 * hash) + getStreamArn().hashCode(); + hash = (37 * hash) + PARTITION_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPartitionKey().hashCode(); + hash = (37 * hash) + SEQUENCE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getSequenceNumber().hashCode(); + switch (reasonCase_) { + case 4: + hash = (37 * hash) + SCHEMA_VIOLATION_REASON_FIELD_NUMBER; + hash = (53 * hash) + getSchemaViolationReason().hashCode(); + break; + case 5: + hash = (37 * hash) + MESSAGE_TRANSFORMATION_FAILURE_REASON_FIELD_NUMBER; + hash = (53 * hash) + getMessageTransformationFailureReason().hashCode(); + break; + case 6: + hash = (37 * hash) + API_VIOLATION_REASON_FIELD_NUMBER; + hash = (53 * hash) + getApiViolationReason().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * Failure when ingesting from an AWS Kinesis source.
    +     * 
    + * + * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReasonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AwsKinesisFailureReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AwsKinesisFailureReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.class, + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.Builder.class); + } + + // Construct using + // com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + streamArn_ = ""; + partitionKey_ = ""; + sequenceNumber_ = ""; + if (schemaViolationReasonBuilder_ != null) { + schemaViolationReasonBuilder_.clear(); + } + if (messageTransformationFailureReasonBuilder_ != null) { + messageTransformationFailureReasonBuilder_.clear(); + } + if (apiViolationReasonBuilder_ != null) { + apiViolationReasonBuilder_.clear(); + } + reasonCase_ = 0; + reason_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_AwsKinesisFailureReason_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason + getDefaultInstanceForType() { + return com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason build() { + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason buildPartial() { + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason result = + new com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.streamArn_ = streamArn_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.partitionKey_ = partitionKey_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sequenceNumber_ = sequenceNumber_; + } + } + + private void buildPartialOneofs( + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason result) { + result.reasonCase_ = reasonCase_; + result.reason_ = this.reason_; + if (reasonCase_ == 4 && schemaViolationReasonBuilder_ != null) { + result.reason_ = schemaViolationReasonBuilder_.build(); + } + if (reasonCase_ == 5 && messageTransformationFailureReasonBuilder_ != null) { + result.reason_ = messageTransformationFailureReasonBuilder_.build(); + } + if (reasonCase_ == 6 && apiViolationReasonBuilder_ != null) { + result.reason_ = apiViolationReasonBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) { + return mergeFrom( + (com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason other) { + if (other + == com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason + .getDefaultInstance()) return this; + if (!other.getStreamArn().isEmpty()) { + streamArn_ = other.streamArn_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPartitionKey().isEmpty()) { + partitionKey_ = other.partitionKey_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSequenceNumber().isEmpty()) { + sequenceNumber_ = other.sequenceNumber_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getReasonCase()) { + case SCHEMA_VIOLATION_REASON: + { + mergeSchemaViolationReason(other.getSchemaViolationReason()); + break; + } + case MESSAGE_TRANSFORMATION_FAILURE_REASON: + { + mergeMessageTransformationFailureReason( + other.getMessageTransformationFailureReason()); + break; + } + case API_VIOLATION_REASON: + { + mergeApiViolationReason(other.getApiViolationReason()); + break; + } + case REASON_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: + { + streamArn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + partitionKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + sequenceNumber_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetSchemaViolationReasonFieldBuilder().getBuilder(), + extensionRegistry); + reasonCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetMessageTransformationFailureReasonFieldBuilder().getBuilder(), + extensionRegistry); + reasonCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetApiViolationReasonFieldBuilder().getBuilder(), extensionRegistry); + reasonCase_ = 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 reasonCase_ = 0; + private java.lang.Object reason_; + + public ReasonCase getReasonCase() { + return ReasonCase.forNumber(reasonCase_); + } + + public Builder clearReason() { + reasonCase_ = 0; + reason_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object streamArn_ = ""; - private java.lang.Object bucket_ = ""; /** * * *
    -       * Optional. Name of the Cloud Storage bucket used for ingestion.
    +       * Optional. The stream ARN of the Kinesis stream being ingested from.
            * 
    * - * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * string stream_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The bucket. + * @return The streamArn. */ - public java.lang.String getBucket() { - java.lang.Object ref = bucket_; + public java.lang.String getStreamArn() { + java.lang.Object ref = streamArn_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - bucket_ = s; + streamArn_ = s; return s; } else { return (java.lang.String) ref; } } + /** * * *
    -       * Optional. Name of the Cloud Storage bucket used for ingestion.
    +       * Optional. The stream ARN of the Kinesis stream being ingested from.
            * 
    * - * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * string stream_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The bytes for bucket. + * @return The bytes for streamArn. */ - public com.google.protobuf.ByteString getBucketBytes() { - java.lang.Object ref = bucket_; + public com.google.protobuf.ByteString getStreamArnBytes() { + java.lang.Object ref = streamArn_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - bucket_ = b; + streamArn_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * * *
    -       * Optional. Name of the Cloud Storage bucket used for ingestion.
    +       * Optional. The stream ARN of the Kinesis stream being ingested from.
            * 
    * - * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * string stream_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The bucket to set. + * @param value The streamArn to set. * @return This builder for chaining. */ - public Builder setBucket(java.lang.String value) { + public Builder setStreamArn(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bucket_ = value; + streamArn_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } + /** * * *
    -       * Optional. Name of the Cloud Storage bucket used for ingestion.
    +       * Optional. The stream ARN of the Kinesis stream being ingested from.
            * 
    * - * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * string stream_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ - public Builder clearBucket() { - bucket_ = getDefaultInstance().getBucket(); + public Builder clearStreamArn() { + streamArn_ = getDefaultInstance().getStreamArn(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } + /** * * *
    -       * Optional. Name of the Cloud Storage bucket used for ingestion.
    +       * Optional. The stream ARN of the Kinesis stream being ingested from.
            * 
    * - * string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * string stream_arn = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The bytes for bucket to set. + * @param value The bytes for streamArn to set. * @return This builder for chaining. */ - public Builder setBucketBytes(com.google.protobuf.ByteString value) { + public Builder setStreamArnBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - bucket_ = value; + streamArn_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } - private java.lang.Object objectName_ = ""; + private java.lang.Object partitionKey_ = ""; + /** * * *
    -       * Optional. Name of the Cloud Storage object which contained the section
    -       * that couldn't be ingested.
    +       * Optional. The partition key of the message that failed to be ingested.
            * 
    * - * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * string partition_key = 2 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The objectName. + * @return The partitionKey. */ - public java.lang.String getObjectName() { - java.lang.Object ref = objectName_; + public java.lang.String getPartitionKey() { + java.lang.Object ref = partitionKey_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - objectName_ = s; + partitionKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The partition key of the message that failed to be ingested.
    +       * 
    + * + * string partition_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for partitionKey. + */ + public com.google.protobuf.ByteString getPartitionKeyBytes() { + java.lang.Object ref = partitionKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + partitionKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The partition key of the message that failed to be ingested.
    +       * 
    + * + * string partition_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The partitionKey to set. + * @return This builder for chaining. + */ + public Builder setPartitionKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + partitionKey_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The partition key of the message that failed to be ingested.
    +       * 
    + * + * string partition_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPartitionKey() { + partitionKey_ = getDefaultInstance().getPartitionKey(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The partition key of the message that failed to be ingested.
    +       * 
    + * + * string partition_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for partitionKey to set. + * @return This builder for chaining. + */ + public Builder setPartitionKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + partitionKey_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object sequenceNumber_ = ""; + + /** + * + * + *
    +       * Optional. The sequence number of the message that failed to be ingested.
    +       * 
    + * + * string sequence_number = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sequenceNumber. + */ + public java.lang.String getSequenceNumber() { + java.lang.Object ref = sequenceNumber_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sequenceNumber_ = s; return s; } else { - return (java.lang.String) ref; + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The sequence number of the message that failed to be ingested.
    +       * 
    + * + * string sequence_number = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sequenceNumber. + */ + public com.google.protobuf.ByteString getSequenceNumberBytes() { + java.lang.Object ref = sequenceNumber_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sequenceNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The sequence number of the message that failed to be ingested.
    +       * 
    + * + * string sequence_number = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sequenceNumber to set. + * @return This builder for chaining. + */ + public Builder setSequenceNumber(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sequenceNumber_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The sequence number of the message that failed to be ingested.
    +       * 
    + * + * string sequence_number = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSequenceNumber() { + sequenceNumber_ = getDefaultInstance().getSequenceNumber(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The sequence number of the message that failed to be ingested.
    +       * 
    + * + * string sequence_number = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for sequenceNumber to set. + * @return This builder for chaining. + */ + public Builder setSequenceNumberBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sequenceNumber_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder> + schemaViolationReasonBuilder_; + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the schemaViolationReason field is set. + */ + @java.lang.Override + public boolean hasSchemaViolationReason() { + return reasonCase_ == 4; + } + + /** + * + * + *
    +       * Optional. The Pub/Sub message failed schema validation.
    +       * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The schemaViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + getSchemaViolationReason() { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 4) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } else { + if (reasonCase_ == 4) { + return schemaViolationReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); } } + /** * * *
    -       * Optional. Name of the Cloud Storage object which contained the section
    -       * that couldn't be ingested.
    +       * Optional. The Pub/Sub message failed schema validation.
            * 
    * - * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for objectName. + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.protobuf.ByteString getObjectNameBytes() { - java.lang.Object ref = objectName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - objectName_ = b; - return b; + public Builder setSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason value) { + if (schemaViolationReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + schemaViolationReasonBuilder_.setMessage(value); } + reasonCase_ = 4; + return this; } + /** * * *
    -       * Optional. Name of the Cloud Storage object which contained the section
    -       * that couldn't be ingested.
    +       * Optional. The Pub/Sub message failed schema validation.
            * 
    * - * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The objectName to set. - * @return This builder for chaining. + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setObjectName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder + builderForValue) { + if (schemaViolationReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + schemaViolationReasonBuilder_.setMessage(builderForValue.build()); } - objectName_ = value; - bitField0_ |= 0x00000002; - onChanged(); + reasonCase_ = 4; return this; } + /** * * *
    -       * Optional. Name of the Cloud Storage object which contained the section
    -       * that couldn't be ingested.
    +       * Optional. The Pub/Sub message failed schema validation.
            * 
    * - * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearObjectName() { - objectName_ = getDefaultInstance().getObjectName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); + public Builder mergeSchemaViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason value) { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 4 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 4) { + schemaViolationReasonBuilder_.mergeFrom(value); + } else { + schemaViolationReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 4; return this; } + /** * * *
    -       * Optional. Name of the Cloud Storage object which contained the section
    -       * that couldn't be ingested.
    +       * Optional. The Pub/Sub message failed schema validation.
            * 
    * - * string object_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for objectName to set. - * @return This builder for chaining. + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setObjectNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearSchemaViolationReason() { + if (schemaViolationReasonBuilder_ == null) { + if (reasonCase_ == 4) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 4) { + reasonCase_ = 0; + reason_ = null; + } + schemaViolationReasonBuilder_.clear(); } - checkByteStringIsUtf8(value); - objectName_ = value; - bitField0_ |= 0x00000002; - onChanged(); return this; } - private long objectGeneration_; /** * * *
    -       * Optional. Generation of the Cloud Storage object which contained the
    -       * section that couldn't be ingested.
    +       * Optional. The Pub/Sub message failed schema validation.
            * 
    * - * int64 object_generation = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The objectGeneration. + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public long getObjectGeneration() { - return objectGeneration_; + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder + getSchemaViolationReasonBuilder() { + return internalGetSchemaViolationReasonFieldBuilder().getBuilder(); } + /** * * *
    -       * Optional. Generation of the Cloud Storage object which contained the
    -       * section that couldn't be ingested.
    +       * Optional. The Pub/Sub message failed schema validation.
            * 
    * - * int64 object_generation = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The objectGeneration to set. - * @return This builder for chaining. + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setObjectGeneration(long value) { - - objectGeneration_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder + getSchemaViolationReasonOrBuilder() { + if ((reasonCase_ == 4) && (schemaViolationReasonBuilder_ != null)) { + return schemaViolationReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 4) { + return (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } } + /** * * *
    -       * Optional. Generation of the Cloud Storage object which contained the
    -       * section that couldn't be ingested.
    +       * Optional. The Pub/Sub message failed schema validation.
            * 
    * - * int64 object_generation = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. + * + * .google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason schema_violation_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearObjectGeneration() { - bitField0_ = (bitField0_ & ~0x00000004); - objectGeneration_ = 0L; + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder> + internalGetSchemaViolationReasonFieldBuilder() { + if (schemaViolationReasonBuilder_ == null) { + if (!(reasonCase_ == 4)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason + .getDefaultInstance(); + } + schemaViolationReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 4; onChanged(); - return this; + return schemaViolationReasonBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason, - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.Builder, - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonOrBuilder> - avroFailureReasonBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder> + messageTransformationFailureReasonBuilder_; + /** * * *
    -       * Optional. Failure encountered when parsing an Avro file.
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
            * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the avroFailureReason field is set. + * @return Whether the messageTransformationFailureReason field is set. */ @java.lang.Override - public boolean hasAvroFailureReason() { + public boolean hasMessageTransformationFailureReason() { return reasonCase_ == 5; } + /** * * *
    -       * Optional. Failure encountered when parsing an Avro file.
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
            * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The avroFailureReason. + * @return The messageTransformationFailureReason. */ @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason getAvroFailureReason() { - if (avroFailureReasonBuilder_ == null) { + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + getMessageTransformationFailureReason() { + if (messageTransformationFailureReasonBuilder_ == null) { if (reasonCase_ == 5) { - return (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_; + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; } - return com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.getDefaultInstance(); + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); } else { if (reasonCase_ == 5) { - return avroFailureReasonBuilder_.getMessage(); + return messageTransformationFailureReasonBuilder_.getMessage(); } - return com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.getDefaultInstance(); + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); } } + /** * * *
    -       * Optional. Failure encountered when parsing an Avro file.
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
            * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setAvroFailureReason( - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason value) { - if (avroFailureReasonBuilder_ == null) { + public Builder setMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason value) { + if (messageTransformationFailureReasonBuilder_ == null) { if (value == null) { throw new NullPointerException(); } reason_ = value; onChanged(); } else { - avroFailureReasonBuilder_.setMessage(value); + messageTransformationFailureReasonBuilder_.setMessage(value); } reasonCase_ = 5; return this; } + /** * * *
    -       * Optional. Failure encountered when parsing an Avro file.
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
            * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setAvroFailureReason( - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.Builder builderForValue) { - if (avroFailureReasonBuilder_ == null) { + public Builder setMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder + builderForValue) { + if (messageTransformationFailureReasonBuilder_ == null) { reason_ = builderForValue.build(); onChanged(); } else { - avroFailureReasonBuilder_.setMessage(builderForValue.build()); + messageTransformationFailureReasonBuilder_.setMessage(builderForValue.build()); } reasonCase_ = 5; return this; } + /** * * *
    -       * Optional. Failure encountered when parsing an Avro file.
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
            * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeAvroFailureReason( - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason value) { - if (avroFailureReasonBuilder_ == null) { + public Builder mergeMessageTransformationFailureReason( + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason value) { + if (messageTransformationFailureReasonBuilder_ == null) { if (reasonCase_ == 5 && reason_ - != com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + != com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason .getDefaultInstance()) { reason_ = - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.newBuilder( - (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_) + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReason) + reason_) .mergeFrom(value) .buildPartial(); } else { @@ -2335,27 +13344,29 @@ public Builder mergeAvroFailureReason( onChanged(); } else { if (reasonCase_ == 5) { - avroFailureReasonBuilder_.mergeFrom(value); + messageTransformationFailureReasonBuilder_.mergeFrom(value); } else { - avroFailureReasonBuilder_.setMessage(value); + messageTransformationFailureReasonBuilder_.setMessage(value); } } reasonCase_ = 5; return this; } + /** * * *
    -       * Optional. Failure encountered when parsing an Avro file.
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
            * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearAvroFailureReason() { - if (avroFailureReasonBuilder_ == null) { + public Builder clearMessageTransformationFailureReason() { + if (messageTransformationFailureReasonBuilder_ == null) { if (reasonCase_ == 5) { reasonCase_ = 0; reason_ = null; @@ -2366,95 +13377,110 @@ public Builder clearAvroFailureReason() { reasonCase_ = 0; reason_ = null; } - avroFailureReasonBuilder_.clear(); + messageTransformationFailureReasonBuilder_.clear(); } return this; } + /** * * *
    -       * Optional. Failure encountered when parsing an Avro file.
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
            * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.Builder - getAvroFailureReasonBuilder() { - return getAvroFailureReasonFieldBuilder().getBuilder(); + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder + getMessageTransformationFailureReasonBuilder() { + return internalGetMessageTransformationFailureReasonFieldBuilder().getBuilder(); } + /** * * *
    -       * Optional. Failure encountered when parsing an Avro file.
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
            * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonOrBuilder - getAvroFailureReasonOrBuilder() { - if ((reasonCase_ == 5) && (avroFailureReasonBuilder_ != null)) { - return avroFailureReasonBuilder_.getMessageOrBuilder(); + public com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder + getMessageTransformationFailureReasonOrBuilder() { + if ((reasonCase_ == 5) && (messageTransformationFailureReasonBuilder_ != null)) { + return messageTransformationFailureReasonBuilder_.getMessageOrBuilder(); } else { if (reasonCase_ == 5) { - return (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_; + return (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_; } - return com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.getDefaultInstance(); + return com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); } } + /** * * *
    -       * Optional. Failure encountered when parsing an Avro file.
    +       * Optional. Failure encountered when applying a message transformation to
    +       * the Pub/Sub message.
            * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.AvroFailureReason avro_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason message_transformation_failure_reason = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason, - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.Builder, - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonOrBuilder> - getAvroFailureReasonFieldBuilder() { - if (avroFailureReasonBuilder_ == null) { + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder> + internalGetMessageTransformationFailureReasonFieldBuilder() { + if (messageTransformationFailureReasonBuilder_ == null) { if (!(reasonCase_ == 5)) { reason_ = - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.getDefaultInstance(); + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .getDefaultInstance(); } - avroFailureReasonBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason, - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.Builder, - com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonOrBuilder>( - (com.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) reason_, + messageTransformationFailureReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason + .Builder, + com.google.pubsub.v1.IngestionFailureEvent + .MessageTransformationFailureReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) + reason_, getParentForChildren(), isClean()); reason_ = null; } reasonCase_ = 5; onChanged(); - return avroFailureReasonBuilder_; + return messageTransformationFailureReasonBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder> apiViolationReasonBuilder_; + /** * * *
    -       * Optional. The Pub/Sub API limits prevented the desired message from
    -       * being published.
    +       * Optional. The message failed to be published due to an API violation.
    +       * This is only set when the size of the data field of the Kinesis record
    +       * is zero.
            * 
    * * @@ -2467,12 +13493,14 @@ public Builder clearAvroFailureReason() { public boolean hasApiViolationReason() { return reasonCase_ == 6; } + /** * * *
    -       * Optional. The Pub/Sub API limits prevented the desired message from
    -       * being published.
    +       * Optional. The message failed to be published due to an API violation.
    +       * This is only set when the size of the data field of the Kinesis record
    +       * is zero.
            * 
    * * @@ -2495,12 +13523,14 @@ public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViola return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); } } + /** * * *
    -       * Optional. The Pub/Sub API limits prevented the desired message from
    -       * being published.
    +       * Optional. The message failed to be published due to an API violation.
    +       * This is only set when the size of the data field of the Kinesis record
    +       * is zero.
            * 
    * * @@ -2521,12 +13551,14 @@ public Builder setApiViolationReason( reasonCase_ = 6; return this; } + /** * * *
    -       * Optional. The Pub/Sub API limits prevented the desired message from
    -       * being published.
    +       * Optional. The message failed to be published due to an API violation.
    +       * This is only set when the size of the data field of the Kinesis record
    +       * is zero.
            * 
    * * @@ -2544,12 +13576,14 @@ public Builder setApiViolationReason( reasonCase_ = 6; return this; } + /** * * *
    -       * Optional. The Pub/Sub API limits prevented the desired message from
    -       * being published.
    +       * Optional. The message failed to be published due to an API violation.
    +       * This is only set when the size of the data field of the Kinesis record
    +       * is zero.
            * 
    * * @@ -2582,12 +13616,14 @@ public Builder mergeApiViolationReason( reasonCase_ = 6; return this; } + /** * * *
    -       * Optional. The Pub/Sub API limits prevented the desired message from
    -       * being published.
    +       * Optional. The message failed to be published due to an API violation.
    +       * This is only set when the size of the data field of the Kinesis record
    +       * is zero.
            * 
    * * @@ -2610,12 +13646,14 @@ public Builder clearApiViolationReason() { } return this; } + /** * * *
    -       * Optional. The Pub/Sub API limits prevented the desired message from
    -       * being published.
    +       * Optional. The message failed to be published due to an API violation.
    +       * This is only set when the size of the data field of the Kinesis record
    +       * is zero.
            * 
    * * @@ -2624,14 +13662,16 @@ public Builder clearApiViolationReason() { */ public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder getApiViolationReasonBuilder() { - return getApiViolationReasonFieldBuilder().getBuilder(); + return internalGetApiViolationReasonFieldBuilder().getBuilder(); } + /** * * *
    -       * Optional. The Pub/Sub API limits prevented the desired message from
    -       * being published.
    +       * Optional. The message failed to be published due to an API violation.
    +       * This is only set when the size of the data field of the Kinesis record
    +       * is zero.
            * 
    * * @@ -2650,30 +13690,32 @@ public Builder clearApiViolationReason() { return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); } } + /** * * *
    -       * Optional. The Pub/Sub API limits prevented the desired message from
    -       * being published.
    +       * Optional. The message failed to be published due to an API violation.
    +       * This is only set when the size of the data field of the Kinesis record
    +       * is zero.
            * 
    * * * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder> - getApiViolationReasonFieldBuilder() { + internalGetApiViolationReasonFieldBuilder() { if (apiViolationReasonBuilder_ == null) { if (!(reasonCase_ == 6)) { reason_ = com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); } apiViolationReasonBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder>( @@ -2682,43 +13724,31 @@ public Builder clearApiViolationReason() { isClean()); reason_ = null; } - reasonCase_ = 6; - onChanged(); - return apiViolationReasonBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + reasonCase_ = 6; + onChanged(); + return apiViolationReasonBuilder_; } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) } - // @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) - private static final com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + // @@protoc_insertion_point(class_scope:google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) + private static final com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure(); + DEFAULT_INSTANCE = new com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason(); } - public static com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + public static com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public CloudStorageFailure parsePartialFrom( + public AwsKinesisFailureReason parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2738,17 +13768,17 @@ public CloudStorageFailure parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + public com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -2764,12 +13794,17 @@ public enum FailureCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { CLOUD_STORAGE_FAILURE(3), + AWS_MSK_FAILURE(4), + AZURE_EVENT_HUBS_FAILURE(5), + CONFLUENT_CLOUD_FAILURE(6), + AWS_KINESIS_FAILURE(7), FAILURE_NOT_SET(0); private final int value; private FailureCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -2784,6 +13819,14 @@ public static FailureCase forNumber(int value) { switch (value) { case 3: return CLOUD_STORAGE_FAILURE; + case 4: + return AWS_MSK_FAILURE; + case 5: + return AZURE_EVENT_HUBS_FAILURE; + case 6: + return CONFLUENT_CLOUD_FAILURE; + case 7: + return AWS_KINESIS_FAILURE; case 0: return FAILURE_NOT_SET; default: @@ -2804,6 +13847,7 @@ public FailureCase getFailureCase() { @SuppressWarnings("serial") private volatile java.lang.Object topic_ = ""; + /** * * @@ -2812,7 +13856,9 @@ public FailureCase getFailureCase() { * projects/{project_name}/topics/{topic_name}. * * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The topic. */ @@ -2828,6 +13874,7 @@ public java.lang.String getTopic() { return s; } } + /** * * @@ -2836,903 +13883,2279 @@ public java.lang.String getTopic() { * projects/{project_name}/topics/{topic_name}. * * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for topic. */ @java.lang.Override - public com.google.protobuf.ByteString getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public com.google.protobuf.ByteString getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object errorMessage_ = ""; + + /** + * + * + *
    +   * Required. Error details explaining why ingestion to Pub/Sub has failed.
    +   * 
    + * + * string error_message = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The errorMessage. + */ + @java.lang.Override + public java.lang.String getErrorMessage() { + java.lang.Object ref = errorMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorMessage_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. Error details explaining why ingestion to Pub/Sub has failed.
    +   * 
    + * + * string error_message = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for errorMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLOUD_STORAGE_FAILURE_FIELD_NUMBER = 3; + + /** + * + * + *
    +   * Optional. Failure when ingesting from Cloud Storage.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cloudStorageFailure field is set. + */ + @java.lang.Override + public boolean hasCloudStorageFailure() { + return failureCase_ == 3; + } + + /** + * + * + *
    +   * Optional. Failure when ingesting from Cloud Storage.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cloudStorageFailure. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure getCloudStorageFailure() { + if (failureCase_ == 3) { + return (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. Failure when ingesting from Cloud Storage.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureOrBuilder + getCloudStorageFailureOrBuilder() { + if (failureCase_ == 3) { + return (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance(); + } + + public static final int AWS_MSK_FAILURE_FIELD_NUMBER = 4; + + /** + * + * + *
    +   * Optional. Failure when ingesting from Amazon MSK.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the awsMskFailure field is set. + */ + @java.lang.Override + public boolean hasAwsMskFailure() { + return failureCase_ == 4; + } + + /** + * + * + *
    +   * Optional. Failure when ingesting from Amazon MSK.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The awsMskFailure. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason getAwsMskFailure() { + if (failureCase_ == 4) { + return (com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. Failure when ingesting from Amazon MSK.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReasonOrBuilder + getAwsMskFailureOrBuilder() { + if (failureCase_ == 4) { + return (com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.getDefaultInstance(); + } + + public static final int AZURE_EVENT_HUBS_FAILURE_FIELD_NUMBER = 5; + + /** + * + * + *
    +   * Optional. Failure when ingesting from Azure Event Hubs.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the azureEventHubsFailure field is set. + */ + @java.lang.Override + public boolean hasAzureEventHubsFailure() { + return failureCase_ == 5; + } + + /** + * + * + *
    +   * Optional. Failure when ingesting from Azure Event Hubs.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The azureEventHubsFailure. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + getAzureEventHubsFailure() { + if (failureCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + .getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. Failure when ingesting from Azure Event Hubs.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReasonOrBuilder + getAzureEventHubsFailureOrBuilder() { + if (failureCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + .getDefaultInstance(); + } + + public static final int CONFLUENT_CLOUD_FAILURE_FIELD_NUMBER = 6; + + /** + * + * + *
    +   * Optional. Failure when ingesting from Confluent Cloud.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the confluentCloudFailure field is set. + */ + @java.lang.Override + public boolean hasConfluentCloudFailure() { + return failureCase_ == 6; + } + + /** + * + * + *
    +   * Optional. Failure when ingesting from Confluent Cloud.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The confluentCloudFailure. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + getConfluentCloudFailure() { + if (failureCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) failure_; } + return com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + .getDefaultInstance(); } - public static final int ERROR_MESSAGE_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object errorMessage_ = ""; /** * * *
    -   * Required. Error details explaining why ingestion to Pub/Sub has failed.
    +   * Optional. Failure when ingesting from Confluent Cloud.
        * 
    * - * string error_message = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The errorMessage. + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public java.lang.String getErrorMessage() { - java.lang.Object ref = errorMessage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - errorMessage_ = s; - return s; + public com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReasonOrBuilder + getConfluentCloudFailureOrBuilder() { + if (failureCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) failure_; } + return com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + .getDefaultInstance(); } + + public static final int AWS_KINESIS_FAILURE_FIELD_NUMBER = 7; + /** * * *
    -   * Required. Error details explaining why ingestion to Pub/Sub has failed.
    +   * Optional. Failure when ingesting from AWS Kinesis.
        * 
    * - * string error_message = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The bytes for errorMessage. + * @return Whether the awsKinesisFailure field is set. */ @java.lang.Override - public com.google.protobuf.ByteString getErrorMessageBytes() { - java.lang.Object ref = errorMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - errorMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public boolean hasAwsKinesisFailure() { + return failureCase_ == 7; } - public static final int CLOUD_STORAGE_FAILURE_FIELD_NUMBER = 3; /** * * *
    -   * Optional. Failure when ingesting from Cloud Storage.
    +   * Optional. Failure when ingesting from AWS Kinesis.
        * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the cloudStorageFailure field is set. + * @return The awsKinesisFailure. */ @java.lang.Override - public boolean hasCloudStorageFailure() { - return failureCase_ == 3; + public com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason getAwsKinesisFailure() { + if (failureCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.getDefaultInstance(); } + /** * * *
    -   * Optional. Failure when ingesting from Cloud Storage.
    +   * Optional. Failure when ingesting from AWS Kinesis.
        * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The cloudStorageFailure. */ @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure getCloudStorageFailure() { - if (failureCase_ == 3) { - return (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_; - } - return com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance(); + public com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReasonOrBuilder + getAwsKinesisFailureOrBuilder() { + if (failureCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, topic_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorMessage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, errorMessage_); + } + if (failureCase_ == 3) { + output.writeMessage( + 3, (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_); + } + if (failureCase_ == 4) { + output.writeMessage( + 4, (com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) failure_); + } + if (failureCase_ == 5) { + output.writeMessage( + 5, (com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) failure_); + } + if (failureCase_ == 6) { + output.writeMessage( + 6, (com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) failure_); + } + if (failureCase_ == 7) { + output.writeMessage( + 7, (com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) failure_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, topic_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorMessage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, errorMessage_); + } + if (failureCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_); + } + if (failureCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) failure_); + } + if (failureCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) failure_); + } + if (failureCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) failure_); + } + if (failureCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) failure_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.IngestionFailureEvent)) { + return super.equals(obj); + } + com.google.pubsub.v1.IngestionFailureEvent other = + (com.google.pubsub.v1.IngestionFailureEvent) obj; + + if (!getTopic().equals(other.getTopic())) return false; + if (!getErrorMessage().equals(other.getErrorMessage())) return false; + if (!getFailureCase().equals(other.getFailureCase())) return false; + switch (failureCase_) { + case 3: + if (!getCloudStorageFailure().equals(other.getCloudStorageFailure())) return false; + break; + case 4: + if (!getAwsMskFailure().equals(other.getAwsMskFailure())) return false; + break; + case 5: + if (!getAzureEventHubsFailure().equals(other.getAzureEventHubsFailure())) return false; + break; + case 6: + if (!getConfluentCloudFailure().equals(other.getConfluentCloudFailure())) return false; + break; + case 7: + if (!getAwsKinesisFailure().equals(other.getAwsKinesisFailure())) 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) + TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getTopic().hashCode(); + hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getErrorMessage().hashCode(); + switch (failureCase_) { + case 3: + hash = (37 * hash) + CLOUD_STORAGE_FAILURE_FIELD_NUMBER; + hash = (53 * hash) + getCloudStorageFailure().hashCode(); + break; + case 4: + hash = (37 * hash) + AWS_MSK_FAILURE_FIELD_NUMBER; + hash = (53 * hash) + getAwsMskFailure().hashCode(); + break; + case 5: + hash = (37 * hash) + AZURE_EVENT_HUBS_FAILURE_FIELD_NUMBER; + hash = (53 * hash) + getAzureEventHubsFailure().hashCode(); + break; + case 6: + hash = (37 * hash) + CONFLUENT_CLOUD_FAILURE_FIELD_NUMBER; + hash = (53 * hash) + getConfluentCloudFailure().hashCode(); + break; + case 7: + hash = (37 * hash) + AWS_KINESIS_FAILURE_FIELD_NUMBER; + hash = (53 * hash) + getAwsKinesisFailure().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.IngestionFailureEvent parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.IngestionFailureEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.IngestionFailureEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.IngestionFailureEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.pubsub.v1.IngestionFailureEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } + /** * * *
    -   * Optional. Failure when ingesting from Cloud Storage.
    +   * Payload of the Platform Log entry sent when a failure is encountered while
    +   * ingesting.
        * 
    * - * - * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent} */ - @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureOrBuilder - getCloudStorageFailureOrBuilder() { - if (failureCase_ == 3) { - return (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_; + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionFailureEvent) + com.google.pubsub.v1.IngestionFailureEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor; } - return com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance(); - } - private byte memoizedIsInitialized = -1; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.IngestionFailureEvent.class, + com.google.pubsub.v1.IngestionFailureEvent.Builder.class); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + // Construct using com.google.pubsub.v1.IngestionFailureEvent.newBuilder() + private Builder() {} - memoizedIsInitialized = 1; - return true; - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + topic_ = ""; + errorMessage_ = ""; + if (cloudStorageFailureBuilder_ != null) { + cloudStorageFailureBuilder_.clear(); + } + if (awsMskFailureBuilder_ != null) { + awsMskFailureBuilder_.clear(); + } + if (azureEventHubsFailureBuilder_ != null) { + azureEventHubsFailureBuilder_.clear(); + } + if (confluentCloudFailureBuilder_ != null) { + confluentCloudFailureBuilder_.clear(); + } + if (awsKinesisFailureBuilder_ != null) { + awsKinesisFailureBuilder_.clear(); + } + failureCase_ = 0; + failure_ = null; + return this; } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errorMessage_); + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor; } - if (failureCase_ == 3) { - output.writeMessage( - 3, (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_); + + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent getDefaultInstanceForType() { + return com.google.pubsub.v1.IngestionFailureEvent.getDefaultInstance(); } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent build() { + com.google.pubsub.v1.IngestionFailureEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent buildPartial() { + com.google.pubsub.v1.IngestionFailureEvent result = + new com.google.pubsub.v1.IngestionFailureEvent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, errorMessage_); + + private void buildPartial0(com.google.pubsub.v1.IngestionFailureEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.topic_ = topic_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.errorMessage_ = errorMessage_; + } } - if (failureCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_); + + private void buildPartialOneofs(com.google.pubsub.v1.IngestionFailureEvent result) { + result.failureCase_ = failureCase_; + result.failure_ = this.failure_; + if (failureCase_ == 3 && cloudStorageFailureBuilder_ != null) { + result.failure_ = cloudStorageFailureBuilder_.build(); + } + if (failureCase_ == 4 && awsMskFailureBuilder_ != null) { + result.failure_ = awsMskFailureBuilder_.build(); + } + if (failureCase_ == 5 && azureEventHubsFailureBuilder_ != null) { + result.failure_ = azureEventHubsFailureBuilder_.build(); + } + if (failureCase_ == 6 && confluentCloudFailureBuilder_ != null) { + result.failure_ = confluentCloudFailureBuilder_.build(); + } + if (failureCase_ == 7 && awsKinesisFailureBuilder_ != null) { + result.failure_ = awsKinesisFailureBuilder_.build(); + } } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.IngestionFailureEvent) { + return mergeFrom((com.google.pubsub.v1.IngestionFailureEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.IngestionFailureEvent other) { + if (other == com.google.pubsub.v1.IngestionFailureEvent.getDefaultInstance()) return this; + if (!other.getTopic().isEmpty()) { + topic_ = other.topic_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getErrorMessage().isEmpty()) { + errorMessage_ = other.errorMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getFailureCase()) { + case CLOUD_STORAGE_FAILURE: + { + mergeCloudStorageFailure(other.getCloudStorageFailure()); + break; + } + case AWS_MSK_FAILURE: + { + mergeAwsMskFailure(other.getAwsMskFailure()); + break; + } + case AZURE_EVENT_HUBS_FAILURE: + { + mergeAzureEventHubsFailure(other.getAzureEventHubsFailure()); + break; + } + case CONFLUENT_CLOUD_FAILURE: + { + mergeConfluentCloudFailure(other.getConfluentCloudFailure()); + break; + } + case AWS_KINESIS_FAILURE: + { + mergeAwsKinesisFailure(other.getAwsKinesisFailure()); + break; + } + case FAILURE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { return true; } - if (!(obj instanceof com.google.pubsub.v1.IngestionFailureEvent)) { - return super.equals(obj); + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + topic_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + errorMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetCloudStorageFailureFieldBuilder().getBuilder(), extensionRegistry); + failureCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetAwsMskFailureFieldBuilder().getBuilder(), extensionRegistry); + failureCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetAzureEventHubsFailureFieldBuilder().getBuilder(), extensionRegistry); + failureCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetConfluentCloudFailureFieldBuilder().getBuilder(), extensionRegistry); + failureCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetAwsKinesisFailureFieldBuilder().getBuilder(), extensionRegistry); + failureCase_ = 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; } - com.google.pubsub.v1.IngestionFailureEvent other = - (com.google.pubsub.v1.IngestionFailureEvent) obj; - if (!getTopic().equals(other.getTopic())) return false; - if (!getErrorMessage().equals(other.getErrorMessage())) return false; - if (!getFailureCase().equals(other.getFailureCase())) return false; - switch (failureCase_) { - case 3: - if (!getCloudStorageFailure().equals(other.getCloudStorageFailure())) return false; - break; - case 0: - default: + private int failureCase_ = 0; + private java.lang.Object failure_; + + public FailureCase getFailureCase() { + return FailureCase.forNumber(failureCase_); } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + public Builder clearFailure() { + failureCase_ = 0; + failure_ = null; + onChanged(); + return this; } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TOPIC_FIELD_NUMBER; - hash = (53 * hash) + getTopic().hashCode(); - hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getErrorMessage().hashCode(); - switch (failureCase_) { - case 3: - hash = (37 * hash) + CLOUD_STORAGE_FAILURE_FIELD_NUMBER; - hash = (53 * hash) + getCloudStorageFailure().hashCode(); - break; - case 0: - default: + + private int bitField0_; + + private java.lang.Object topic_ = ""; + + /** + * + * + *
    +     * Required. Name of the import topic. Format is:
    +     * projects/{project_name}/topics/{topic_name}.
    +     * 
    + * + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The topic. + */ + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.pubsub.v1.IngestionFailureEvent parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
    +     * Required. Name of the import topic. Format is:
    +     * projects/{project_name}/topics/{topic_name}.
    +     * 
    + * + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for topic. + */ + public com.google.protobuf.ByteString getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static com.google.pubsub.v1.IngestionFailureEvent parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
    +     * Required. Name of the import topic. Format is:
    +     * projects/{project_name}/topics/{topic_name}.
    +     * 
    + * + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The topic to set. + * @return This builder for chaining. + */ + public Builder setTopic(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + topic_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public static com.google.pubsub.v1.IngestionFailureEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
    +     * Required. Name of the import topic. Format is:
    +     * projects/{project_name}/topics/{topic_name}.
    +     * 
    + * + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTopic() { + topic_ = getDefaultInstance().getTopic(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - public static com.google.pubsub.v1.IngestionFailureEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
    +     * Required. Name of the import topic. Format is:
    +     * projects/{project_name}/topics/{topic_name}.
    +     * 
    + * + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for topic to set. + * @return This builder for chaining. + */ + public Builder setTopicBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + topic_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public static com.google.pubsub.v1.IngestionFailureEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private java.lang.Object errorMessage_ = ""; - public static com.google.pubsub.v1.IngestionFailureEvent parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
    +     * Required. Error details explaining why ingestion to Pub/Sub has failed.
    +     * 
    + * + * string error_message = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The errorMessage. + */ + public java.lang.String getErrorMessage() { + java.lang.Object ref = errorMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static com.google.pubsub.v1.IngestionFailureEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + /** + * + * + *
    +     * Required. Error details explaining why ingestion to Pub/Sub has failed.
    +     * 
    + * + * string error_message = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for errorMessage. + */ + public com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static com.google.pubsub.v1.IngestionFailureEvent parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
    +     * Required. Error details explaining why ingestion to Pub/Sub has failed.
    +     * 
    + * + * string error_message = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The errorMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + errorMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - public static com.google.pubsub.v1.IngestionFailureEvent parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + /** + * + * + *
    +     * Required. Error details explaining why ingestion to Pub/Sub has failed.
    +     * 
    + * + * string error_message = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearErrorMessage() { + errorMessage_ = getDefaultInstance().getErrorMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } - public static com.google.pubsub.v1.IngestionFailureEvent parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
    +     * Required. Error details explaining why ingestion to Pub/Sub has failed.
    +     * 
    + * + * string error_message = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for errorMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + errorMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - public static com.google.pubsub.v1.IngestionFailureEvent parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure, + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.Builder, + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureOrBuilder> + cloudStorageFailureBuilder_; - public static com.google.pubsub.v1.IngestionFailureEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
    +     * Optional. Failure when ingesting from Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cloudStorageFailure field is set. + */ + @java.lang.Override + public boolean hasCloudStorageFailure() { + return failureCase_ == 3; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
    +     * Optional. Failure when ingesting from Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cloudStorageFailure. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure getCloudStorageFailure() { + if (cloudStorageFailureBuilder_ == null) { + if (failureCase_ == 3) { + return (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance(); + } else { + if (failureCase_ == 3) { + return cloudStorageFailureBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance(); + } + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
    +     * Optional. Failure when ingesting from Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCloudStorageFailure( + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure value) { + if (cloudStorageFailureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + failure_ = value; + onChanged(); + } else { + cloudStorageFailureBuilder_.setMessage(value); + } + failureCase_ = 3; + return this; + } - public static Builder newBuilder(com.google.pubsub.v1.IngestionFailureEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
    +     * Optional. Failure when ingesting from Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCloudStorageFailure( + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.Builder builderForValue) { + if (cloudStorageFailureBuilder_ == null) { + failure_ = builderForValue.build(); + onChanged(); + } else { + cloudStorageFailureBuilder_.setMessage(builderForValue.build()); + } + failureCase_ = 3; + return this; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
    +     * Optional. Failure when ingesting from Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCloudStorageFailure( + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure value) { + if (cloudStorageFailureBuilder_ == null) { + if (failureCase_ == 3 + && failure_ + != com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + .getDefaultInstance()) { + failure_ = + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_) + .mergeFrom(value) + .buildPartial(); + } else { + failure_ = value; + } + onChanged(); + } else { + if (failureCase_ == 3) { + cloudStorageFailureBuilder_.mergeFrom(value); + } else { + cloudStorageFailureBuilder_.setMessage(value); + } + } + failureCase_ = 3; + return this; + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
    -   * Payload of the Platform Log entry sent when a failure is encountered while
    -   * ingesting.
    -   * 
    - * - * Protobuf type {@code google.pubsub.v1.IngestionFailureEvent} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.IngestionFailureEvent) - com.google.pubsub.v1.IngestionFailureEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor; + /** + * + * + *
    +     * Optional. Failure when ingesting from Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCloudStorageFailure() { + if (cloudStorageFailureBuilder_ == null) { + if (failureCase_ == 3) { + failureCase_ = 0; + failure_ = null; + onChanged(); + } + } else { + if (failureCase_ == 3) { + failureCase_ = 0; + failure_ = null; + } + cloudStorageFailureBuilder_.clear(); + } + return this; } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_IngestionFailureEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.IngestionFailureEvent.class, - com.google.pubsub.v1.IngestionFailureEvent.Builder.class); + /** + * + * + *
    +     * Optional. Failure when ingesting from Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.Builder + getCloudStorageFailureBuilder() { + return internalGetCloudStorageFailureFieldBuilder().getBuilder(); } - // Construct using com.google.pubsub.v1.IngestionFailureEvent.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + /** + * + * + *
    +     * Optional. Failure when ingesting from Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureOrBuilder + getCloudStorageFailureOrBuilder() { + if ((failureCase_ == 3) && (cloudStorageFailureBuilder_ != null)) { + return cloudStorageFailureBuilder_.getMessageOrBuilder(); + } else { + if (failureCase_ == 3) { + return (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance(); + } } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - topic_ = ""; - errorMessage_ = ""; - if (cloudStorageFailureBuilder_ != null) { - cloudStorageFailureBuilder_.clear(); + /** + * + * + *
    +     * Optional. Failure when ingesting from Cloud Storage.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure, + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.Builder, + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureOrBuilder> + internalGetCloudStorageFailureFieldBuilder() { + if (cloudStorageFailureBuilder_ == null) { + if (!(failureCase_ == 3)) { + failure_ = + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance(); + } + cloudStorageFailureBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure, + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.Builder, + com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_, + getParentForChildren(), + isClean()); + failure_ = null; } - failureCase_ = 0; - failure_ = null; - return this; + failureCase_ = 3; + onChanged(); + return cloudStorageFailureBuilder_; } + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReasonOrBuilder> + awsMskFailureBuilder_; + + /** + * + * + *
    +     * Optional. Failure when ingesting from Amazon MSK.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the awsMskFailure field is set. + */ @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor; + public boolean hasAwsMskFailure() { + return failureCase_ == 4; } + /** + * + * + *
    +     * Optional. Failure when ingesting from Amazon MSK.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The awsMskFailure. + */ @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent getDefaultInstanceForType() { - return com.google.pubsub.v1.IngestionFailureEvent.getDefaultInstance(); + public com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason getAwsMskFailure() { + if (awsMskFailureBuilder_ == null) { + if (failureCase_ == 4) { + return (com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.getDefaultInstance(); + } else { + if (failureCase_ == 4) { + return awsMskFailureBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.getDefaultInstance(); + } } - @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent build() { - com.google.pubsub.v1.IngestionFailureEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
    +     * Optional. Failure when ingesting from Amazon MSK.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAwsMskFailure( + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason value) { + if (awsMskFailureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + failure_ = value; + onChanged(); + } else { + awsMskFailureBuilder_.setMessage(value); } - return result; + failureCase_ = 4; + return this; } - @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent buildPartial() { - com.google.pubsub.v1.IngestionFailureEvent result = - new com.google.pubsub.v1.IngestionFailureEvent(this); - if (bitField0_ != 0) { - buildPartial0(result); + /** + * + * + *
    +     * Optional. Failure when ingesting from Amazon MSK.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAwsMskFailure( + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.Builder builderForValue) { + if (awsMskFailureBuilder_ == null) { + failure_ = builderForValue.build(); + onChanged(); + } else { + awsMskFailureBuilder_.setMessage(builderForValue.build()); } - buildPartialOneofs(result); - onBuilt(); - return result; + failureCase_ = 4; + return this; } - private void buildPartial0(com.google.pubsub.v1.IngestionFailureEvent result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.topic_ = topic_; + /** + * + * + *
    +     * Optional. Failure when ingesting from Amazon MSK.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAwsMskFailure( + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason value) { + if (awsMskFailureBuilder_ == null) { + if (failureCase_ == 4 + && failure_ + != com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason + .getDefaultInstance()) { + failure_ = + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) failure_) + .mergeFrom(value) + .buildPartial(); + } else { + failure_ = value; + } + onChanged(); + } else { + if (failureCase_ == 4) { + awsMskFailureBuilder_.mergeFrom(value); + } else { + awsMskFailureBuilder_.setMessage(value); + } } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.errorMessage_ = errorMessage_; + failureCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Optional. Failure when ingesting from Amazon MSK.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAwsMskFailure() { + if (awsMskFailureBuilder_ == null) { + if (failureCase_ == 4) { + failureCase_ = 0; + failure_ = null; + onChanged(); + } + } else { + if (failureCase_ == 4) { + failureCase_ = 0; + failure_ = null; + } + awsMskFailureBuilder_.clear(); } + return this; } - private void buildPartialOneofs(com.google.pubsub.v1.IngestionFailureEvent result) { - result.failureCase_ = failureCase_; - result.failure_ = this.failure_; - if (failureCase_ == 3 && cloudStorageFailureBuilder_ != null) { - result.failure_ = cloudStorageFailureBuilder_.build(); + /** + * + * + *
    +     * Optional. Failure when ingesting from Amazon MSK.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.Builder + getAwsMskFailureBuilder() { + return internalGetAwsMskFailureFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. Failure when ingesting from Amazon MSK.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReasonOrBuilder + getAwsMskFailureOrBuilder() { + if ((failureCase_ == 4) && (awsMskFailureBuilder_ != null)) { + return awsMskFailureBuilder_.getMessageOrBuilder(); + } else { + if (failureCase_ == 4) { + return (com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. Failure when ingesting from Amazon MSK.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReasonOrBuilder> + internalGetAwsMskFailureFieldBuilder() { + if (awsMskFailureBuilder_ == null) { + if (!(failureCase_ == 4)) { + failure_ = + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.getDefaultInstance(); + } + awsMskFailureBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) failure_, + getParentForChildren(), + isClean()); + failure_ = null; } + failureCase_ = 4; + onChanged(); + return awsMskFailureBuilder_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReasonOrBuilder> + azureEventHubsFailureBuilder_; + /** + * + * + *
    +     * Optional. Failure when ingesting from Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the azureEventHubsFailure field is set. + */ @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + public boolean hasAzureEventHubsFailure() { + return failureCase_ == 5; } + /** + * + * + *
    +     * Optional. Failure when ingesting from Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The azureEventHubsFailure. + */ @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.IngestionFailureEvent) { - return mergeFrom((com.google.pubsub.v1.IngestionFailureEvent) other); + public com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + getAzureEventHubsFailure() { + if (azureEventHubsFailureBuilder_ == null) { + if (failureCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + .getDefaultInstance(); } else { - super.mergeFrom(other); - return this; + if (failureCase_ == 5) { + return azureEventHubsFailureBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + .getDefaultInstance(); } } - public Builder mergeFrom(com.google.pubsub.v1.IngestionFailureEvent other) { - if (other == com.google.pubsub.v1.IngestionFailureEvent.getDefaultInstance()) return this; - if (!other.getTopic().isEmpty()) { - topic_ = other.topic_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getErrorMessage().isEmpty()) { - errorMessage_ = other.errorMessage_; - bitField0_ |= 0x00000002; + /** + * + * + *
    +     * Optional. Failure when ingesting from Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAzureEventHubsFailure( + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason value) { + if (azureEventHubsFailureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + failure_ = value; onChanged(); + } else { + azureEventHubsFailureBuilder_.setMessage(value); } - switch (other.getFailureCase()) { - case CLOUD_STORAGE_FAILURE: - { - mergeCloudStorageFailure(other.getCloudStorageFailure()); - break; - } - case FAILURE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); + failureCase_ = 5; return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == 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: - { - topic_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - errorMessage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage( - getCloudStorageFailureFieldBuilder().getBuilder(), extensionRegistry); - failureCase_ = 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 { + /** + * + * + *
    +     * Optional. Failure when ingesting from Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAzureEventHubsFailure( + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.Builder + builderForValue) { + if (azureEventHubsFailureBuilder_ == null) { + failure_ = builderForValue.build(); onChanged(); - } // finally + } else { + azureEventHubsFailureBuilder_.setMessage(builderForValue.build()); + } + failureCase_ = 5; return this; } - private int failureCase_ = 0; - private java.lang.Object failure_; - - public FailureCase getFailureCase() { - return FailureCase.forNumber(failureCase_); + /** + * + * + *
    +     * Optional. Failure when ingesting from Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAzureEventHubsFailure( + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason value) { + if (azureEventHubsFailureBuilder_ == null) { + if (failureCase_ == 5 + && failure_ + != com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + .getDefaultInstance()) { + failure_ = + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) + failure_) + .mergeFrom(value) + .buildPartial(); + } else { + failure_ = value; + } + onChanged(); + } else { + if (failureCase_ == 5) { + azureEventHubsFailureBuilder_.mergeFrom(value); + } else { + azureEventHubsFailureBuilder_.setMessage(value); + } + } + failureCase_ = 5; + return this; } - public Builder clearFailure() { - failureCase_ = 0; - failure_ = null; - onChanged(); + /** + * + * + *
    +     * Optional. Failure when ingesting from Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAzureEventHubsFailure() { + if (azureEventHubsFailureBuilder_ == null) { + if (failureCase_ == 5) { + failureCase_ = 0; + failure_ = null; + onChanged(); + } + } else { + if (failureCase_ == 5) { + failureCase_ = 0; + failure_ = null; + } + azureEventHubsFailureBuilder_.clear(); + } return this; } - private int bitField0_; - - private java.lang.Object topic_ = ""; /** * * *
    -     * Required. Name of the import topic. Format is:
    -     * projects/{project_name}/topics/{topic_name}.
    +     * Optional. Failure when ingesting from Azure Event Hubs.
          * 
    * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.Builder + getAzureEventHubsFailureBuilder() { + return internalGetAzureEventHubsFailureFieldBuilder().getBuilder(); + } + + /** * - * @return The topic. + * + *
    +     * Optional. Failure when ingesting from Azure Event Hubs.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReasonOrBuilder + getAzureEventHubsFailureOrBuilder() { + if ((failureCase_ == 5) && (azureEventHubsFailureBuilder_ != null)) { + return azureEventHubsFailureBuilder_.getMessageOrBuilder(); } else { - return (java.lang.String) ref; + if (failureCase_ == 5) { + return (com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + .getDefaultInstance(); } } + /** * * *
    -     * Required. Name of the import topic. Format is:
    -     * projects/{project_name}/topics/{topic_name}.
    +     * Optional. Failure when ingesting from Azure Event Hubs.
          * 
    * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for topic. + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.protobuf.ByteString getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReasonOrBuilder> + internalGetAzureEventHubsFailureFieldBuilder() { + if (azureEventHubsFailureBuilder_ == null) { + if (!(failureCase_ == 5)) { + failure_ = + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + .getDefaultInstance(); + } + azureEventHubsFailureBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) failure_, + getParentForChildren(), + isClean()); + failure_ = null; } + failureCase_ = 5; + onChanged(); + return azureEventHubsFailureBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReasonOrBuilder> + confluentCloudFailureBuilder_; + + /** + * + * + *
    +     * Optional. Failure when ingesting from Confluent Cloud.
    +     * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the confluentCloudFailure field is set. + */ + @java.lang.Override + public boolean hasConfluentCloudFailure() { + return failureCase_ == 6; } + /** * * *
    -     * Required. Name of the import topic. Format is:
    -     * projects/{project_name}/topics/{topic_name}.
    +     * Optional. Failure when ingesting from Confluent Cloud.
          * 
    * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The topic to set. - * @return This builder for chaining. + * @return The confluentCloudFailure. */ - public Builder setTopic(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + getConfluentCloudFailure() { + if (confluentCloudFailureBuilder_ == null) { + if (failureCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + .getDefaultInstance(); + } else { + if (failureCase_ == 6) { + return confluentCloudFailureBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + .getDefaultInstance(); } - topic_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; } + /** * * *
    -     * Required. Name of the import topic. Format is:
    -     * projects/{project_name}/topics/{topic_name}.
    +     * Optional. Failure when ingesting from Confluent Cloud.
          * 
    * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearTopic() { - topic_ = getDefaultInstance().getTopic(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public Builder setConfluentCloudFailure( + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason value) { + if (confluentCloudFailureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + failure_ = value; + onChanged(); + } else { + confluentCloudFailureBuilder_.setMessage(value); + } + failureCase_ = 6; return this; } + /** * * *
    -     * Required. Name of the import topic. Format is:
    -     * projects/{project_name}/topics/{topic_name}.
    +     * Optional. Failure when ingesting from Confluent Cloud.
          * 
    * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for topic to set. - * @return This builder for chaining. + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setTopicBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder setConfluentCloudFailure( + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.Builder + builderForValue) { + if (confluentCloudFailureBuilder_ == null) { + failure_ = builderForValue.build(); + onChanged(); + } else { + confluentCloudFailureBuilder_.setMessage(builderForValue.build()); } - checkByteStringIsUtf8(value); - topic_ = value; - bitField0_ |= 0x00000001; - onChanged(); + failureCase_ = 6; return this; } - private java.lang.Object errorMessage_ = ""; /** * * *
    -     * Required. Error details explaining why ingestion to Pub/Sub has failed.
    +     * Optional. Failure when ingesting from Confluent Cloud.
          * 
    * - * string error_message = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The errorMessage. + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public java.lang.String getErrorMessage() { - java.lang.Object ref = errorMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - errorMessage_ = s; - return s; + public Builder mergeConfluentCloudFailure( + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason value) { + if (confluentCloudFailureBuilder_ == null) { + if (failureCase_ == 6 + && failure_ + != com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + .getDefaultInstance()) { + failure_ = + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) + failure_) + .mergeFrom(value) + .buildPartial(); + } else { + failure_ = value; + } + onChanged(); } else { - return (java.lang.String) ref; + if (failureCase_ == 6) { + confluentCloudFailureBuilder_.mergeFrom(value); + } else { + confluentCloudFailureBuilder_.setMessage(value); + } } + failureCase_ = 6; + return this; } + /** * * *
    -     * Required. Error details explaining why ingestion to Pub/Sub has failed.
    +     * Optional. Failure when ingesting from Confluent Cloud.
          * 
    * - * string error_message = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for errorMessage. + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.protobuf.ByteString getErrorMessageBytes() { - java.lang.Object ref = errorMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - errorMessage_ = b; - return b; + public Builder clearConfluentCloudFailure() { + if (confluentCloudFailureBuilder_ == null) { + if (failureCase_ == 6) { + failureCase_ = 0; + failure_ = null; + onChanged(); + } } else { - return (com.google.protobuf.ByteString) ref; + if (failureCase_ == 6) { + failureCase_ = 0; + failure_ = null; + } + confluentCloudFailureBuilder_.clear(); } + return this; } + /** * * *
    -     * Required. Error details explaining why ingestion to Pub/Sub has failed.
    +     * Optional. Failure when ingesting from Confluent Cloud.
          * 
    * - * string error_message = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The errorMessage to set. - * @return This builder for chaining. + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setErrorMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - errorMessage_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + public com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.Builder + getConfluentCloudFailureBuilder() { + return internalGetConfluentCloudFailureFieldBuilder().getBuilder(); } + /** * * *
    -     * Required. Error details explaining why ingestion to Pub/Sub has failed.
    +     * Optional. Failure when ingesting from Confluent Cloud.
          * 
    * - * string error_message = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearErrorMessage() { - errorMessage_ = getDefaultInstance().getErrorMessage(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReasonOrBuilder + getConfluentCloudFailureOrBuilder() { + if ((failureCase_ == 6) && (confluentCloudFailureBuilder_ != null)) { + return confluentCloudFailureBuilder_.getMessageOrBuilder(); + } else { + if (failureCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) failure_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + .getDefaultInstance(); + } } + /** * * *
    -     * Required. Error details explaining why ingestion to Pub/Sub has failed.
    +     * Optional. Failure when ingesting from Confluent Cloud.
          * 
    * - * string error_message = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for errorMessage to set. - * @return This builder for chaining. + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setErrorMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReasonOrBuilder> + internalGetConfluentCloudFailureFieldBuilder() { + if (confluentCloudFailureBuilder_ == null) { + if (!(failureCase_ == 6)) { + failure_ = + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason + .getDefaultInstance(); + } + confluentCloudFailureBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) failure_, + getParentForChildren(), + isClean()); + failure_ = null; } - checkByteStringIsUtf8(value); - errorMessage_ = value; - bitField0_ |= 0x00000002; + failureCase_ = 6; onChanged(); - return this; + return confluentCloudFailureBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure, - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.Builder, - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureOrBuilder> - cloudStorageFailureBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReasonOrBuilder> + awsKinesisFailureBuilder_; + /** * * *
    -     * Optional. Failure when ingesting from Cloud Storage.
    +     * Optional. Failure when ingesting from AWS Kinesis.
          * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the cloudStorageFailure field is set. + * @return Whether the awsKinesisFailure field is set. */ @java.lang.Override - public boolean hasCloudStorageFailure() { - return failureCase_ == 3; + public boolean hasAwsKinesisFailure() { + return failureCase_ == 7; } + /** * * *
    -     * Optional. Failure when ingesting from Cloud Storage.
    +     * Optional. Failure when ingesting from AWS Kinesis.
          * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The cloudStorageFailure. + * @return The awsKinesisFailure. */ @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure getCloudStorageFailure() { - if (cloudStorageFailureBuilder_ == null) { - if (failureCase_ == 3) { - return (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_; + public com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason + getAwsKinesisFailure() { + if (awsKinesisFailureBuilder_ == null) { + if (failureCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) failure_; } - return com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance(); + return com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason + .getDefaultInstance(); } else { - if (failureCase_ == 3) { - return cloudStorageFailureBuilder_.getMessage(); + if (failureCase_ == 7) { + return awsKinesisFailureBuilder_.getMessage(); } - return com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance(); + return com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason + .getDefaultInstance(); } } + /** * * *
    -     * Optional. Failure when ingesting from Cloud Storage.
    +     * Optional. Failure when ingesting from AWS Kinesis.
          * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setCloudStorageFailure( - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure value) { - if (cloudStorageFailureBuilder_ == null) { + public Builder setAwsKinesisFailure( + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason value) { + if (awsKinesisFailureBuilder_ == null) { if (value == null) { throw new NullPointerException(); } failure_ = value; onChanged(); } else { - cloudStorageFailureBuilder_.setMessage(value); + awsKinesisFailureBuilder_.setMessage(value); } - failureCase_ = 3; + failureCase_ = 7; return this; } + /** * * *
    -     * Optional. Failure when ingesting from Cloud Storage.
    +     * Optional. Failure when ingesting from AWS Kinesis.
          * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setCloudStorageFailure( - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.Builder builderForValue) { - if (cloudStorageFailureBuilder_ == null) { + public Builder setAwsKinesisFailure( + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.Builder + builderForValue) { + if (awsKinesisFailureBuilder_ == null) { failure_ = builderForValue.build(); onChanged(); } else { - cloudStorageFailureBuilder_.setMessage(builderForValue.build()); + awsKinesisFailureBuilder_.setMessage(builderForValue.build()); } - failureCase_ = 3; + failureCase_ = 7; return this; } + /** * * *
    -     * Optional. Failure when ingesting from Cloud Storage.
    +     * Optional. Failure when ingesting from AWS Kinesis.
          * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeCloudStorageFailure( - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure value) { - if (cloudStorageFailureBuilder_ == null) { - if (failureCase_ == 3 + public Builder mergeAwsKinesisFailure( + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason value) { + if (awsKinesisFailureBuilder_ == null) { + if (failureCase_ == 7 && failure_ - != com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + != com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason .getDefaultInstance()) { failure_ = - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.newBuilder( - (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_) + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) failure_) .mergeFrom(value) .buildPartial(); } else { @@ -3740,125 +16163,120 @@ public Builder mergeCloudStorageFailure( } onChanged(); } else { - if (failureCase_ == 3) { - cloudStorageFailureBuilder_.mergeFrom(value); + if (failureCase_ == 7) { + awsKinesisFailureBuilder_.mergeFrom(value); } else { - cloudStorageFailureBuilder_.setMessage(value); + awsKinesisFailureBuilder_.setMessage(value); } } - failureCase_ = 3; + failureCase_ = 7; return this; } + /** * * *
    -     * Optional. Failure when ingesting from Cloud Storage.
    +     * Optional. Failure when ingesting from AWS Kinesis.
          * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearCloudStorageFailure() { - if (cloudStorageFailureBuilder_ == null) { - if (failureCase_ == 3) { + public Builder clearAwsKinesisFailure() { + if (awsKinesisFailureBuilder_ == null) { + if (failureCase_ == 7) { failureCase_ = 0; failure_ = null; onChanged(); } } else { - if (failureCase_ == 3) { + if (failureCase_ == 7) { failureCase_ = 0; failure_ = null; } - cloudStorageFailureBuilder_.clear(); + awsKinesisFailureBuilder_.clear(); } return this; } + /** * * *
    -     * Optional. Failure when ingesting from Cloud Storage.
    +     * Optional. Failure when ingesting from AWS Kinesis.
          * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.Builder - getCloudStorageFailureBuilder() { - return getCloudStorageFailureFieldBuilder().getBuilder(); + public com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.Builder + getAwsKinesisFailureBuilder() { + return internalGetAwsKinesisFailureFieldBuilder().getBuilder(); } + /** * * *
    -     * Optional. Failure when ingesting from Cloud Storage.
    +     * Optional. Failure when ingesting from AWS Kinesis.
          * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureOrBuilder - getCloudStorageFailureOrBuilder() { - if ((failureCase_ == 3) && (cloudStorageFailureBuilder_ != null)) { - return cloudStorageFailureBuilder_.getMessageOrBuilder(); + public com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReasonOrBuilder + getAwsKinesisFailureOrBuilder() { + if ((failureCase_ == 7) && (awsKinesisFailureBuilder_ != null)) { + return awsKinesisFailureBuilder_.getMessageOrBuilder(); } else { - if (failureCase_ == 3) { - return (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_; + if (failureCase_ == 7) { + return (com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) failure_; } - return com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance(); + return com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason + .getDefaultInstance(); } } + /** * * *
    -     * Optional. Failure when ingesting from Cloud Storage.
    +     * Optional. Failure when ingesting from AWS Kinesis.
          * 
    * * - * .google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure cloud_storage_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure, - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.Builder, - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureOrBuilder> - getCloudStorageFailureFieldBuilder() { - if (cloudStorageFailureBuilder_ == null) { - if (!(failureCase_ == 3)) { + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReasonOrBuilder> + internalGetAwsKinesisFailureFieldBuilder() { + if (awsKinesisFailureBuilder_ == null) { + if (!(failureCase_ == 7)) { failure_ = - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.getDefaultInstance(); + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason + .getDefaultInstance(); } - cloudStorageFailureBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure, - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.Builder, - com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureOrBuilder>( - (com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) failure_, + awsKinesisFailureBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason, + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) failure_, getParentForChildren(), isClean()); failure_ = null; } - failureCase_ = 3; + failureCase_ = 7; onChanged(); - return cloudStorageFailureBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + return awsKinesisFailureBuilder_; } // @@protoc_insertion_point(builder_scope:google.pubsub.v1.IngestionFailureEvent) diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEventOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEventOrBuilder.java index af081e3d7..3fe15ccd9 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEventOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEventOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface IngestionFailureEventOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionFailureEvent) @@ -32,11 +34,14 @@ public interface IngestionFailureEventOrBuilder * projects/{project_name}/topics/{topic_name}. * * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The topic. */ java.lang.String getTopic(); + /** * * @@ -45,7 +50,9 @@ public interface IngestionFailureEventOrBuilder * projects/{project_name}/topics/{topic_name}. * * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for topic. */ @@ -63,6 +70,7 @@ public interface IngestionFailureEventOrBuilder * @return The errorMessage. */ java.lang.String getErrorMessage(); + /** * * @@ -90,6 +98,7 @@ public interface IngestionFailureEventOrBuilder * @return Whether the cloudStorageFailure field is set. */ boolean hasCloudStorageFailure(); + /** * * @@ -104,6 +113,7 @@ public interface IngestionFailureEventOrBuilder * @return The cloudStorageFailure. */ com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure getCloudStorageFailure(); + /** * * @@ -118,5 +128,181 @@ public interface IngestionFailureEventOrBuilder com.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureOrBuilder getCloudStorageFailureOrBuilder(); + /** + * + * + *
    +   * Optional. Failure when ingesting from Amazon MSK.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the awsMskFailure field is set. + */ + boolean hasAwsMskFailure(); + + /** + * + * + *
    +   * Optional. Failure when ingesting from Amazon MSK.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The awsMskFailure. + */ + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason getAwsMskFailure(); + + /** + * + * + *
    +   * Optional. Failure when ingesting from Amazon MSK.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason aws_msk_failure = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReasonOrBuilder + getAwsMskFailureOrBuilder(); + + /** + * + * + *
    +   * Optional. Failure when ingesting from Azure Event Hubs.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the azureEventHubsFailure field is set. + */ + boolean hasAzureEventHubsFailure(); + + /** + * + * + *
    +   * Optional. Failure when ingesting from Azure Event Hubs.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The azureEventHubsFailure. + */ + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason getAzureEventHubsFailure(); + + /** + * + * + *
    +   * Optional. Failure when ingesting from Azure Event Hubs.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason azure_event_hubs_failure = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReasonOrBuilder + getAzureEventHubsFailureOrBuilder(); + + /** + * + * + *
    +   * Optional. Failure when ingesting from Confluent Cloud.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the confluentCloudFailure field is set. + */ + boolean hasConfluentCloudFailure(); + + /** + * + * + *
    +   * Optional. Failure when ingesting from Confluent Cloud.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The confluentCloudFailure. + */ + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason getConfluentCloudFailure(); + + /** + * + * + *
    +   * Optional. Failure when ingesting from Confluent Cloud.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason confluent_cloud_failure = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReasonOrBuilder + getConfluentCloudFailureOrBuilder(); + + /** + * + * + *
    +   * Optional. Failure when ingesting from AWS Kinesis.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the awsKinesisFailure field is set. + */ + boolean hasAwsKinesisFailure(); + + /** + * + * + *
    +   * Optional. Failure when ingesting from AWS Kinesis.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The awsKinesisFailure. + */ + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason getAwsKinesisFailure(); + + /** + * + * + *
    +   * Optional. Failure when ingesting from AWS Kinesis.
    +   * 
    + * + * + * .google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason aws_kinesis_failure = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReasonOrBuilder + getAwsKinesisFailureOrBuilder(); + com.google.pubsub.v1.IngestionFailureEvent.FailureCase getFailureCase(); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/JavaScriptUDF.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/JavaScriptUDF.java new file mode 100644 index 000000000..18ac95eb0 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/JavaScriptUDF.java @@ -0,0 +1,993 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.pubsub.v1; + +/** + * + * + *
    + * User-defined JavaScript function that can transform or filter a Pub/Sub
    + * message.
    + * 
    + * + * Protobuf type {@code google.pubsub.v1.JavaScriptUDF} + */ +@com.google.protobuf.Generated +public final class JavaScriptUDF extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.JavaScriptUDF) + JavaScriptUDFOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "JavaScriptUDF"); + } + + // Use JavaScriptUDF.newBuilder() to construct. + private JavaScriptUDF(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private JavaScriptUDF() { + functionName_ = ""; + code_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_JavaScriptUDF_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_JavaScriptUDF_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.JavaScriptUDF.class, + com.google.pubsub.v1.JavaScriptUDF.Builder.class); + } + + public static final int FUNCTION_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object functionName_ = ""; + + /** + * + * + *
    +   * Required. Name of the JavasScript function that should applied to Pub/Sub
    +   * messages.
    +   * 
    + * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The functionName. + */ + @java.lang.Override + public java.lang.String getFunctionName() { + java.lang.Object ref = functionName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + functionName_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. Name of the JavasScript function that should applied to Pub/Sub
    +   * messages.
    +   * 
    + * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for functionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFunctionNameBytes() { + java.lang.Object ref = functionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + functionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object code_ = ""; + + /** + * + * + *
    +   * Required. JavaScript code that contains a function `function_name` with the
    +   * below signature:
    +   *
    +   * ```
    +   * /**
    +   * * Transforms a Pub/Sub message.
    +   *
    +   * * @return {(Object<string, (string | Object<string, string>)>|null)} - To
    +   * * filter a message, return `null`. To transform a message return a map
    +   * * with the following keys:
    +   * *   - (required) 'data' : {string}
    +   * *   - (optional) 'attributes' : {Object<string, string>}
    +   * * Returning empty `attributes` will remove all attributes from the
    +   * * message.
    +   * *
    +   * * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
    +   * * message. Keys:
    +   * *   - (required) 'data' : {string}
    +   * *   - (required) 'attributes' : {Object<string, string>}
    +   * *
    +   * * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
    +   * * Keys:
    +   * *   - (optional) 'message_id'  : {string}
    +   * *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
    +   * *   - (optional) 'ordering_key': {string}
    +   * */
    +   *
    +   * function <function_name>(message, metadata) {
    +   * }
    +   * ```
    +   * 
    + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The code. + */ + @java.lang.Override + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. JavaScript code that contains a function `function_name` with the
    +   * below signature:
    +   *
    +   * ```
    +   * /**
    +   * * Transforms a Pub/Sub message.
    +   *
    +   * * @return {(Object<string, (string | Object<string, string>)>|null)} - To
    +   * * filter a message, return `null`. To transform a message return a map
    +   * * with the following keys:
    +   * *   - (required) 'data' : {string}
    +   * *   - (optional) 'attributes' : {Object<string, string>}
    +   * * Returning empty `attributes` will remove all attributes from the
    +   * * message.
    +   * *
    +   * * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
    +   * * message. Keys:
    +   * *   - (required) 'data' : {string}
    +   * *   - (required) 'attributes' : {Object<string, string>}
    +   * *
    +   * * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
    +   * * Keys:
    +   * *   - (optional) 'message_id'  : {string}
    +   * *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
    +   * *   - (optional) 'ordering_key': {string}
    +   * */
    +   *
    +   * function <function_name>(message, metadata) {
    +   * }
    +   * ```
    +   * 
    + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for code. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(functionName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, functionName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(code_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, code_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(functionName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, functionName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(code_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, code_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.JavaScriptUDF)) { + return super.equals(obj); + } + com.google.pubsub.v1.JavaScriptUDF other = (com.google.pubsub.v1.JavaScriptUDF) obj; + + if (!getFunctionName().equals(other.getFunctionName())) return false; + if (!getCode().equals(other.getCode())) 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) + FUNCTION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFunctionName().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.pubsub.v1.JavaScriptUDF prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * User-defined JavaScript function that can transform or filter a Pub/Sub
    +   * message.
    +   * 
    + * + * Protobuf type {@code google.pubsub.v1.JavaScriptUDF} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.JavaScriptUDF) + com.google.pubsub.v1.JavaScriptUDFOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_JavaScriptUDF_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_JavaScriptUDF_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.JavaScriptUDF.class, + com.google.pubsub.v1.JavaScriptUDF.Builder.class); + } + + // Construct using com.google.pubsub.v1.JavaScriptUDF.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + functionName_ = ""; + code_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_JavaScriptUDF_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDF getDefaultInstanceForType() { + return com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDF build() { + com.google.pubsub.v1.JavaScriptUDF result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDF buildPartial() { + com.google.pubsub.v1.JavaScriptUDF result = new com.google.pubsub.v1.JavaScriptUDF(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.pubsub.v1.JavaScriptUDF result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.functionName_ = functionName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.code_ = code_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.JavaScriptUDF) { + return mergeFrom((com.google.pubsub.v1.JavaScriptUDF) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.JavaScriptUDF other) { + if (other == com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance()) return this; + if (!other.getFunctionName().isEmpty()) { + functionName_ = other.functionName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCode().isEmpty()) { + code_ = other.code_; + 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: + { + functionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + code_ = 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 functionName_ = ""; + + /** + * + * + *
    +     * Required. Name of the JavasScript function that should applied to Pub/Sub
    +     * messages.
    +     * 
    + * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The functionName. + */ + public java.lang.String getFunctionName() { + java.lang.Object ref = functionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + functionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. Name of the JavasScript function that should applied to Pub/Sub
    +     * messages.
    +     * 
    + * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for functionName. + */ + public com.google.protobuf.ByteString getFunctionNameBytes() { + java.lang.Object ref = functionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + functionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. Name of the JavasScript function that should applied to Pub/Sub
    +     * messages.
    +     * 
    + * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The functionName to set. + * @return This builder for chaining. + */ + public Builder setFunctionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + functionName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. Name of the JavasScript function that should applied to Pub/Sub
    +     * messages.
    +     * 
    + * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFunctionName() { + functionName_ = getDefaultInstance().getFunctionName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. Name of the JavasScript function that should applied to Pub/Sub
    +     * messages.
    +     * 
    + * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for functionName to set. + * @return This builder for chaining. + */ + public Builder setFunctionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + functionName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object code_ = ""; + + /** + * + * + *
    +     * Required. JavaScript code that contains a function `function_name` with the
    +     * below signature:
    +     *
    +     * ```
    +     * /**
    +     * * Transforms a Pub/Sub message.
    +     *
    +     * * @return {(Object<string, (string | Object<string, string>)>|null)} - To
    +     * * filter a message, return `null`. To transform a message return a map
    +     * * with the following keys:
    +     * *   - (required) 'data' : {string}
    +     * *   - (optional) 'attributes' : {Object<string, string>}
    +     * * Returning empty `attributes` will remove all attributes from the
    +     * * message.
    +     * *
    +     * * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
    +     * * message. Keys:
    +     * *   - (required) 'data' : {string}
    +     * *   - (required) 'attributes' : {Object<string, string>}
    +     * *
    +     * * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
    +     * * Keys:
    +     * *   - (optional) 'message_id'  : {string}
    +     * *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
    +     * *   - (optional) 'ordering_key': {string}
    +     * */
    +     *
    +     * function <function_name>(message, metadata) {
    +     * }
    +     * ```
    +     * 
    + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The code. + */ + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. JavaScript code that contains a function `function_name` with the
    +     * below signature:
    +     *
    +     * ```
    +     * /**
    +     * * Transforms a Pub/Sub message.
    +     *
    +     * * @return {(Object<string, (string | Object<string, string>)>|null)} - To
    +     * * filter a message, return `null`. To transform a message return a map
    +     * * with the following keys:
    +     * *   - (required) 'data' : {string}
    +     * *   - (optional) 'attributes' : {Object<string, string>}
    +     * * Returning empty `attributes` will remove all attributes from the
    +     * * message.
    +     * *
    +     * * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
    +     * * message. Keys:
    +     * *   - (required) 'data' : {string}
    +     * *   - (required) 'attributes' : {Object<string, string>}
    +     * *
    +     * * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
    +     * * Keys:
    +     * *   - (optional) 'message_id'  : {string}
    +     * *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
    +     * *   - (optional) 'ordering_key': {string}
    +     * */
    +     *
    +     * function <function_name>(message, metadata) {
    +     * }
    +     * ```
    +     * 
    + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for code. + */ + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. JavaScript code that contains a function `function_name` with the
    +     * below signature:
    +     *
    +     * ```
    +     * /**
    +     * * Transforms a Pub/Sub message.
    +     *
    +     * * @return {(Object<string, (string | Object<string, string>)>|null)} - To
    +     * * filter a message, return `null`. To transform a message return a map
    +     * * with the following keys:
    +     * *   - (required) 'data' : {string}
    +     * *   - (optional) 'attributes' : {Object<string, string>}
    +     * * Returning empty `attributes` will remove all attributes from the
    +     * * message.
    +     * *
    +     * * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
    +     * * message. Keys:
    +     * *   - (required) 'data' : {string}
    +     * *   - (required) 'attributes' : {Object<string, string>}
    +     * *
    +     * * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
    +     * * Keys:
    +     * *   - (optional) 'message_id'  : {string}
    +     * *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
    +     * *   - (optional) 'ordering_key': {string}
    +     * */
    +     *
    +     * function <function_name>(message, metadata) {
    +     * }
    +     * ```
    +     * 
    + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + code_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. JavaScript code that contains a function `function_name` with the
    +     * below signature:
    +     *
    +     * ```
    +     * /**
    +     * * Transforms a Pub/Sub message.
    +     *
    +     * * @return {(Object<string, (string | Object<string, string>)>|null)} - To
    +     * * filter a message, return `null`. To transform a message return a map
    +     * * with the following keys:
    +     * *   - (required) 'data' : {string}
    +     * *   - (optional) 'attributes' : {Object<string, string>}
    +     * * Returning empty `attributes` will remove all attributes from the
    +     * * message.
    +     * *
    +     * * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
    +     * * message. Keys:
    +     * *   - (required) 'data' : {string}
    +     * *   - (required) 'attributes' : {Object<string, string>}
    +     * *
    +     * * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
    +     * * Keys:
    +     * *   - (optional) 'message_id'  : {string}
    +     * *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
    +     * *   - (optional) 'ordering_key': {string}
    +     * */
    +     *
    +     * function <function_name>(message, metadata) {
    +     * }
    +     * ```
    +     * 
    + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCode() { + code_ = getDefaultInstance().getCode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. JavaScript code that contains a function `function_name` with the
    +     * below signature:
    +     *
    +     * ```
    +     * /**
    +     * * Transforms a Pub/Sub message.
    +     *
    +     * * @return {(Object<string, (string | Object<string, string>)>|null)} - To
    +     * * filter a message, return `null`. To transform a message return a map
    +     * * with the following keys:
    +     * *   - (required) 'data' : {string}
    +     * *   - (optional) 'attributes' : {Object<string, string>}
    +     * * Returning empty `attributes` will remove all attributes from the
    +     * * message.
    +     * *
    +     * * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
    +     * * message. Keys:
    +     * *   - (required) 'data' : {string}
    +     * *   - (required) 'attributes' : {Object<string, string>}
    +     * *
    +     * * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
    +     * * Keys:
    +     * *   - (optional) 'message_id'  : {string}
    +     * *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
    +     * *   - (optional) 'ordering_key': {string}
    +     * */
    +     *
    +     * function <function_name>(message, metadata) {
    +     * }
    +     * ```
    +     * 
    + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for code to set. + * @return This builder for chaining. + */ + public Builder setCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + code_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.JavaScriptUDF) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.JavaScriptUDF) + private static final com.google.pubsub.v1.JavaScriptUDF DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.JavaScriptUDF(); + } + + public static com.google.pubsub.v1.JavaScriptUDF getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JavaScriptUDF parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDF getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/JavaScriptUDFOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/JavaScriptUDFOrBuilder.java new file mode 100644 index 000000000..9e60471bf --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/JavaScriptUDFOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.pubsub.v1; + +@com.google.protobuf.Generated +public interface JavaScriptUDFOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.JavaScriptUDF) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. Name of the JavasScript function that should applied to Pub/Sub
    +   * messages.
    +   * 
    + * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The functionName. + */ + java.lang.String getFunctionName(); + + /** + * + * + *
    +   * Required. Name of the JavasScript function that should applied to Pub/Sub
    +   * messages.
    +   * 
    + * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for functionName. + */ + com.google.protobuf.ByteString getFunctionNameBytes(); + + /** + * + * + *
    +   * Required. JavaScript code that contains a function `function_name` with the
    +   * below signature:
    +   *
    +   * ```
    +   * /**
    +   * * Transforms a Pub/Sub message.
    +   *
    +   * * @return {(Object<string, (string | Object<string, string>)>|null)} - To
    +   * * filter a message, return `null`. To transform a message return a map
    +   * * with the following keys:
    +   * *   - (required) 'data' : {string}
    +   * *   - (optional) 'attributes' : {Object<string, string>}
    +   * * Returning empty `attributes` will remove all attributes from the
    +   * * message.
    +   * *
    +   * * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
    +   * * message. Keys:
    +   * *   - (required) 'data' : {string}
    +   * *   - (required) 'attributes' : {Object<string, string>}
    +   * *
    +   * * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
    +   * * Keys:
    +   * *   - (optional) 'message_id'  : {string}
    +   * *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
    +   * *   - (optional) 'ordering_key': {string}
    +   * */
    +   *
    +   * function <function_name>(message, metadata) {
    +   * }
    +   * ```
    +   * 
    + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The code. + */ + java.lang.String getCode(); + + /** + * + * + *
    +   * Required. JavaScript code that contains a function `function_name` with the
    +   * below signature:
    +   *
    +   * ```
    +   * /**
    +   * * Transforms a Pub/Sub message.
    +   *
    +   * * @return {(Object<string, (string | Object<string, string>)>|null)} - To
    +   * * filter a message, return `null`. To transform a message return a map
    +   * * with the following keys:
    +   * *   - (required) 'data' : {string}
    +   * *   - (optional) 'attributes' : {Object<string, string>}
    +   * * Returning empty `attributes` will remove all attributes from the
    +   * * message.
    +   * *
    +   * * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
    +   * * message. Keys:
    +   * *   - (required) 'data' : {string}
    +   * *   - (required) 'attributes' : {Object<string, string>}
    +   * *
    +   * * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
    +   * * Keys:
    +   * *   - (optional) 'message_id'  : {string}
    +   * *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
    +   * *   - (optional) 'ordering_key': {string}
    +   * */
    +   *
    +   * function <function_name>(message, metadata) {
    +   * }
    +   * ```
    +   * 
    + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for code. + */ + com.google.protobuf.ByteString getCodeBytes(); +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsRequest.java index 3d406f6bf..f2a56f7b8 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ListSchemaRevisionsRequest} */ -public final class ListSchemaRevisionsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListSchemaRevisionsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListSchemaRevisionsRequest) ListSchemaRevisionsRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSchemaRevisionsRequest"); + } + // Use ListSchemaRevisionsRequest.newBuilder() to construct. - private ListSchemaRevisionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListSchemaRevisionsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private ListSchemaRevisionsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListSchemaRevisionsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ListSchemaRevisionsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ListSchemaRevisionsRequest_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -122,6 +131,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int VIEW_FIELD_NUMBER = 2; private int view_ = 0; + /** * * @@ -139,6 +149,7 @@ public com.google.protobuf.ByteString getNameBytes() { public int getViewValue() { return view_; } + /** * * @@ -160,6 +171,7 @@ public com.google.pubsub.v1.SchemaView getView() { public static final int PAGE_SIZE_FIELD_NUMBER = 3; private int pageSize_ = 0; + /** * * @@ -180,6 +192,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -204,6 +217,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -243,8 +257,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (view_ != com.google.pubsub.v1.SchemaView.SCHEMA_VIEW_UNSPECIFIED.getNumber()) { output.writeEnum(2, view_); @@ -252,8 +266,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (pageSize_ != 0) { output.writeInt32(3, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); } getUnknownFields().writeTo(output); } @@ -264,8 +278,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (view_ != com.google.pubsub.v1.SchemaView.SCHEMA_VIEW_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); @@ -273,8 +287,8 @@ public int getSerializedSize() { if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -357,38 +371,38 @@ public static com.google.pubsub.v1.ListSchemaRevisionsRequest parseFrom( public static com.google.pubsub.v1.ListSchemaRevisionsRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSchemaRevisionsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSchemaRevisionsRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSchemaRevisionsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSchemaRevisionsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSchemaRevisionsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -411,10 +425,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -424,7 +439,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ListSchemaRevisionsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListSchemaRevisionsRequest) com.google.pubsub.v1.ListSchemaRevisionsRequestOrBuilder { @@ -434,7 +449,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ListSchemaRevisionsRequest_fieldAccessorTable @@ -446,7 +461,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ListSchemaRevisionsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -508,39 +523,6 @@ private void buildPartial0(com.google.pubsub.v1.ListSchemaRevisionsRequest resul } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.ListSchemaRevisionsRequest) { @@ -640,6 +622,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -664,6 +647,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -688,6 +672,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -711,6 +696,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -730,6 +716,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -756,6 +743,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private int view_ = 0; + /** * * @@ -773,6 +761,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public int getViewValue() { return view_; } + /** * * @@ -793,6 +782,7 @@ public Builder setViewValue(int value) { onChanged(); return this; } + /** * * @@ -811,6 +801,7 @@ public com.google.pubsub.v1.SchemaView getView() { com.google.pubsub.v1.SchemaView result = com.google.pubsub.v1.SchemaView.forNumber(view_); return result == null ? com.google.pubsub.v1.SchemaView.UNRECOGNIZED : result; } + /** * * @@ -834,6 +825,7 @@ public Builder setView(com.google.pubsub.v1.SchemaView value) { onChanged(); return this; } + /** * * @@ -855,6 +847,7 @@ public Builder clearView() { } private int pageSize_; + /** * * @@ -870,6 +863,7 @@ public Builder clearView() { public int getPageSize() { return pageSize_; } + /** * * @@ -889,6 +883,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -908,6 +903,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -931,6 +927,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -954,6 +951,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -976,6 +974,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -994,6 +993,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -1018,17 +1018,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListSchemaRevisionsRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsRequestOrBuilder.java index 2fa49de7d..5145cce90 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ListSchemaRevisionsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListSchemaRevisionsRequest) @@ -38,6 +40,7 @@ public interface ListSchemaRevisionsRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -67,6 +70,7 @@ public interface ListSchemaRevisionsRequestOrBuilder * @return The enum numeric value on the wire for view. */ int getViewValue(); + /** * * @@ -108,6 +112,7 @@ public interface ListSchemaRevisionsRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsResponse.java index 50e5dd19d..c9bda70ee 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ListSchemaRevisionsResponse} */ -public final class ListSchemaRevisionsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListSchemaRevisionsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListSchemaRevisionsResponse) ListSchemaRevisionsResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSchemaRevisionsResponse"); + } + // Use ListSchemaRevisionsResponse.newBuilder() to construct. - private ListSchemaRevisionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListSchemaRevisionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListSchemaRevisionsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListSchemaRevisionsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ListSchemaRevisionsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ListSchemaRevisionsResponse_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List schemas_; + /** * * @@ -81,6 +89,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getSchemasList() { return schemas_; } + /** * * @@ -94,6 +103,7 @@ public java.util.List getSchemasList() { public java.util.List getSchemasOrBuilderList() { return schemas_; } + /** * * @@ -107,6 +117,7 @@ public java.util.List getSchemas public int getSchemasCount() { return schemas_.size(); } + /** * * @@ -120,6 +131,7 @@ public int getSchemasCount() { public com.google.pubsub.v1.Schema getSchemas(int index) { return schemas_.get(index); } + /** * * @@ -138,6 +150,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemasOrBuilder(int index) { @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -162,6 +175,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -204,8 +218,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < schemas_.size(); i++) { output.writeMessage(1, schemas_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -219,8 +233,8 @@ public int getSerializedSize() { for (int i = 0; i < schemas_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, schemas_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -299,38 +313,38 @@ public static com.google.pubsub.v1.ListSchemaRevisionsResponse parseFrom( public static com.google.pubsub.v1.ListSchemaRevisionsResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSchemaRevisionsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSchemaRevisionsResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSchemaRevisionsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSchemaRevisionsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSchemaRevisionsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -353,10 +367,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -366,7 +381,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ListSchemaRevisionsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListSchemaRevisionsResponse) com.google.pubsub.v1.ListSchemaRevisionsResponseOrBuilder { @@ -376,7 +391,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ListSchemaRevisionsResponse_fieldAccessorTable @@ -388,7 +403,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ListSchemaRevisionsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -459,39 +474,6 @@ private void buildPartial0(com.google.pubsub.v1.ListSchemaRevisionsResponse resu } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.ListSchemaRevisionsResponse) { @@ -524,8 +506,8 @@ public Builder mergeFrom(com.google.pubsub.v1.ListSchemaRevisionsResponse other) schemas_ = other.schemas_; bitField0_ = (bitField0_ & ~0x00000001); schemasBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSchemasFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSchemasFieldBuilder() : null; } else { schemasBuilder_.addAllMessages(other.schemas_); @@ -610,7 +592,7 @@ private void ensureSchemasIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder> @@ -632,6 +614,7 @@ public java.util.List getSchemasList() { return schemasBuilder_.getMessageList(); } } + /** * * @@ -648,6 +631,7 @@ public int getSchemasCount() { return schemasBuilder_.getCount(); } } + /** * * @@ -664,6 +648,7 @@ public com.google.pubsub.v1.Schema getSchemas(int index) { return schemasBuilder_.getMessage(index); } } + /** * * @@ -686,6 +671,7 @@ public Builder setSchemas(int index, com.google.pubsub.v1.Schema value) { } return this; } + /** * * @@ -705,6 +691,7 @@ public Builder setSchemas(int index, com.google.pubsub.v1.Schema.Builder builder } return this; } + /** * * @@ -727,6 +714,7 @@ public Builder addSchemas(com.google.pubsub.v1.Schema value) { } return this; } + /** * * @@ -749,6 +737,7 @@ public Builder addSchemas(int index, com.google.pubsub.v1.Schema value) { } return this; } + /** * * @@ -768,6 +757,7 @@ public Builder addSchemas(com.google.pubsub.v1.Schema.Builder builderForValue) { } return this; } + /** * * @@ -787,6 +777,7 @@ public Builder addSchemas(int index, com.google.pubsub.v1.Schema.Builder builder } return this; } + /** * * @@ -806,6 +797,7 @@ public Builder addAllSchemas(java.lang.Iterablerepeated .google.pubsub.v1.Schema schemas = 1;
    */ public com.google.pubsub.v1.Schema.Builder getSchemasBuilder(int index) { - return getSchemasFieldBuilder().getBuilder(index); + return internalGetSchemasFieldBuilder().getBuilder(index); } + /** * * @@ -872,6 +867,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemasOrBuilder(int index) { return schemasBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -889,6 +885,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemasOrBuilder(int index) { return java.util.Collections.unmodifiableList(schemas_); } } + /** * * @@ -899,8 +896,10 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemasOrBuilder(int index) { * repeated .google.pubsub.v1.Schema schemas = 1; */ public com.google.pubsub.v1.Schema.Builder addSchemasBuilder() { - return getSchemasFieldBuilder().addBuilder(com.google.pubsub.v1.Schema.getDefaultInstance()); + return internalGetSchemasFieldBuilder() + .addBuilder(com.google.pubsub.v1.Schema.getDefaultInstance()); } + /** * * @@ -911,9 +910,10 @@ public com.google.pubsub.v1.Schema.Builder addSchemasBuilder() { * repeated .google.pubsub.v1.Schema schemas = 1; */ public com.google.pubsub.v1.Schema.Builder addSchemasBuilder(int index) { - return getSchemasFieldBuilder() + return internalGetSchemasFieldBuilder() .addBuilder(index, com.google.pubsub.v1.Schema.getDefaultInstance()); } + /** * * @@ -924,17 +924,17 @@ public com.google.pubsub.v1.Schema.Builder addSchemasBuilder(int index) { * repeated .google.pubsub.v1.Schema schemas = 1; */ public java.util.List getSchemasBuilderList() { - return getSchemasFieldBuilder().getBuilderList(); + return internalGetSchemasFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder> - getSchemasFieldBuilder() { + internalGetSchemasFieldBuilder() { if (schemasBuilder_ == null) { schemasBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder>( @@ -945,6 +945,7 @@ public java.util.List getSchemasBuilderList } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -968,6 +969,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -991,6 +993,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1013,6 +1016,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1031,6 +1035,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -1055,17 +1060,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListSchemaRevisionsResponse) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsResponseOrBuilder.java index cadb88f17..5e423029e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemaRevisionsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ListSchemaRevisionsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListSchemaRevisionsResponse) @@ -34,6 +36,7 @@ public interface ListSchemaRevisionsResponseOrBuilder * repeated .google.pubsub.v1.Schema schemas = 1; */ java.util.List getSchemasList(); + /** * * @@ -44,6 +47,7 @@ public interface ListSchemaRevisionsResponseOrBuilder * repeated .google.pubsub.v1.Schema schemas = 1; */ com.google.pubsub.v1.Schema getSchemas(int index); + /** * * @@ -54,6 +58,7 @@ public interface ListSchemaRevisionsResponseOrBuilder * repeated .google.pubsub.v1.Schema schemas = 1; */ int getSchemasCount(); + /** * * @@ -64,6 +69,7 @@ public interface ListSchemaRevisionsResponseOrBuilder * repeated .google.pubsub.v1.Schema schemas = 1; */ java.util.List getSchemasOrBuilderList(); + /** * * @@ -88,6 +94,7 @@ public interface ListSchemaRevisionsResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasRequest.java index d1c082ca8..20c5c2c1d 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ListSchemasRequest} */ -public final class ListSchemasRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListSchemasRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListSchemasRequest) ListSchemasRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSchemasRequest"); + } + // Use ListSchemasRequest.newBuilder() to construct. - private ListSchemasRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListSchemasRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private ListSchemasRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListSchemasRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ListSchemasRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ListSchemasRequest_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -95,6 +103,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -124,6 +133,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int VIEW_FIELD_NUMBER = 2; private int view_ = 0; + /** * * @@ -141,6 +151,7 @@ public com.google.protobuf.ByteString getParentBytes() { public int getViewValue() { return view_; } + /** * * @@ -162,6 +173,7 @@ public com.google.pubsub.v1.SchemaView getView() { public static final int PAGE_SIZE_FIELD_NUMBER = 3; private int pageSize_ = 0; + /** * * @@ -182,6 +194,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -207,6 +220,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -247,8 +261,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } if (view_ != com.google.pubsub.v1.SchemaView.SCHEMA_VIEW_UNSPECIFIED.getNumber()) { output.writeEnum(2, view_); @@ -256,8 +270,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (pageSize_ != 0) { output.writeInt32(3, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); } getUnknownFields().writeTo(output); } @@ -268,8 +282,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } if (view_ != com.google.pubsub.v1.SchemaView.SCHEMA_VIEW_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); @@ -277,8 +291,8 @@ public int getSerializedSize() { if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -360,38 +374,38 @@ public static com.google.pubsub.v1.ListSchemasRequest parseFrom( public static com.google.pubsub.v1.ListSchemasRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSchemasRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSchemasRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSchemasRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSchemasRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSchemasRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -414,10 +428,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -427,7 +442,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ListSchemasRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListSchemasRequest) com.google.pubsub.v1.ListSchemasRequestOrBuilder { @@ -437,7 +452,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ListSchemasRequest_fieldAccessorTable @@ -449,7 +464,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ListSchemasRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -511,39 +526,6 @@ private void buildPartial0(com.google.pubsub.v1.ListSchemasRequest 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.pubsub.v1.ListSchemasRequest) { @@ -642,6 +624,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -667,6 +650,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -692,6 +676,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -716,6 +701,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -736,6 +722,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -763,6 +750,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private int view_ = 0; + /** * * @@ -780,6 +768,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public int getViewValue() { return view_; } + /** * * @@ -800,6 +789,7 @@ public Builder setViewValue(int value) { onChanged(); return this; } + /** * * @@ -818,6 +808,7 @@ public com.google.pubsub.v1.SchemaView getView() { com.google.pubsub.v1.SchemaView result = com.google.pubsub.v1.SchemaView.forNumber(view_); return result == null ? com.google.pubsub.v1.SchemaView.UNRECOGNIZED : result; } + /** * * @@ -841,6 +832,7 @@ public Builder setView(com.google.pubsub.v1.SchemaView value) { onChanged(); return this; } + /** * * @@ -862,6 +854,7 @@ public Builder clearView() { } private int pageSize_; + /** * * @@ -877,6 +870,7 @@ public Builder clearView() { public int getPageSize() { return pageSize_; } + /** * * @@ -896,6 +890,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -915,6 +910,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -939,6 +935,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -963,6 +960,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -986,6 +984,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1005,6 +1004,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -1030,17 +1030,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListSchemasRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasRequestOrBuilder.java index 571e88b81..ae335367a 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ListSchemasRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListSchemasRequest) @@ -39,6 +41,7 @@ public interface ListSchemasRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -69,6 +72,7 @@ public interface ListSchemasRequestOrBuilder * @return The enum numeric value on the wire for view. */ int getViewValue(); + /** * * @@ -111,6 +115,7 @@ public interface ListSchemasRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasResponse.java index 581624bcc..1b34d2651 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ListSchemasResponse} */ -public final class ListSchemasResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListSchemasResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListSchemasResponse) ListSchemasResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSchemasResponse"); + } + // Use ListSchemasResponse.newBuilder() to construct. - private ListSchemasResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListSchemasResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListSchemasResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListSchemasResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ListSchemasResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ListSchemasResponse_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List schemas_; + /** * * @@ -81,6 +89,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getSchemasList() { return schemas_; } + /** * * @@ -94,6 +103,7 @@ public java.util.List getSchemasList() { public java.util.List getSchemasOrBuilderList() { return schemas_; } + /** * * @@ -107,6 +117,7 @@ public java.util.List getSchemas public int getSchemasCount() { return schemas_.size(); } + /** * * @@ -120,6 +131,7 @@ public int getSchemasCount() { public com.google.pubsub.v1.Schema getSchemas(int index) { return schemas_.get(index); } + /** * * @@ -138,6 +150,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemasOrBuilder(int index) { @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -162,6 +175,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -204,8 +218,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < schemas_.size(); i++) { output.writeMessage(1, schemas_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -219,8 +233,8 @@ public int getSerializedSize() { for (int i = 0; i < schemas_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, schemas_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -298,38 +312,38 @@ public static com.google.pubsub.v1.ListSchemasResponse parseFrom( public static com.google.pubsub.v1.ListSchemasResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSchemasResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSchemasResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSchemasResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSchemasResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSchemasResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -352,10 +366,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -365,7 +380,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ListSchemasResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListSchemasResponse) com.google.pubsub.v1.ListSchemasResponseOrBuilder { @@ -375,7 +390,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ListSchemasResponse_fieldAccessorTable @@ -387,7 +402,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ListSchemasResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -457,39 +472,6 @@ private void buildPartial0(com.google.pubsub.v1.ListSchemasResponse 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.pubsub.v1.ListSchemasResponse) { @@ -521,8 +503,8 @@ public Builder mergeFrom(com.google.pubsub.v1.ListSchemasResponse other) { schemas_ = other.schemas_; bitField0_ = (bitField0_ & ~0x00000001); schemasBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSchemasFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSchemasFieldBuilder() : null; } else { schemasBuilder_.addAllMessages(other.schemas_); @@ -607,7 +589,7 @@ private void ensureSchemasIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder> @@ -629,6 +611,7 @@ public java.util.List getSchemasList() { return schemasBuilder_.getMessageList(); } } + /** * * @@ -645,6 +628,7 @@ public int getSchemasCount() { return schemasBuilder_.getCount(); } } + /** * * @@ -661,6 +645,7 @@ public com.google.pubsub.v1.Schema getSchemas(int index) { return schemasBuilder_.getMessage(index); } } + /** * * @@ -683,6 +668,7 @@ public Builder setSchemas(int index, com.google.pubsub.v1.Schema value) { } return this; } + /** * * @@ -702,6 +688,7 @@ public Builder setSchemas(int index, com.google.pubsub.v1.Schema.Builder builder } return this; } + /** * * @@ -724,6 +711,7 @@ public Builder addSchemas(com.google.pubsub.v1.Schema value) { } return this; } + /** * * @@ -746,6 +734,7 @@ public Builder addSchemas(int index, com.google.pubsub.v1.Schema value) { } return this; } + /** * * @@ -765,6 +754,7 @@ public Builder addSchemas(com.google.pubsub.v1.Schema.Builder builderForValue) { } return this; } + /** * * @@ -784,6 +774,7 @@ public Builder addSchemas(int index, com.google.pubsub.v1.Schema.Builder builder } return this; } + /** * * @@ -803,6 +794,7 @@ public Builder addAllSchemas(java.lang.Iterablerepeated .google.pubsub.v1.Schema schemas = 1;
    */ public com.google.pubsub.v1.Schema.Builder getSchemasBuilder(int index) { - return getSchemasFieldBuilder().getBuilder(index); + return internalGetSchemasFieldBuilder().getBuilder(index); } + /** * * @@ -869,6 +864,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemasOrBuilder(int index) { return schemasBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -886,6 +882,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemasOrBuilder(int index) { return java.util.Collections.unmodifiableList(schemas_); } } + /** * * @@ -896,8 +893,10 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemasOrBuilder(int index) { * repeated .google.pubsub.v1.Schema schemas = 1; */ public com.google.pubsub.v1.Schema.Builder addSchemasBuilder() { - return getSchemasFieldBuilder().addBuilder(com.google.pubsub.v1.Schema.getDefaultInstance()); + return internalGetSchemasFieldBuilder() + .addBuilder(com.google.pubsub.v1.Schema.getDefaultInstance()); } + /** * * @@ -908,9 +907,10 @@ public com.google.pubsub.v1.Schema.Builder addSchemasBuilder() { * repeated .google.pubsub.v1.Schema schemas = 1; */ public com.google.pubsub.v1.Schema.Builder addSchemasBuilder(int index) { - return getSchemasFieldBuilder() + return internalGetSchemasFieldBuilder() .addBuilder(index, com.google.pubsub.v1.Schema.getDefaultInstance()); } + /** * * @@ -921,17 +921,17 @@ public com.google.pubsub.v1.Schema.Builder addSchemasBuilder(int index) { * repeated .google.pubsub.v1.Schema schemas = 1; */ public java.util.List getSchemasBuilderList() { - return getSchemasFieldBuilder().getBuilderList(); + return internalGetSchemasFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder> - getSchemasFieldBuilder() { + internalGetSchemasFieldBuilder() { if (schemasBuilder_ == null) { schemasBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder>( @@ -942,6 +942,7 @@ public java.util.List getSchemasBuilderList } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -965,6 +966,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -988,6 +990,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1010,6 +1013,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1028,6 +1032,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -1052,17 +1057,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListSchemasResponse) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasResponseOrBuilder.java index b2145b6ac..5631cbf6e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSchemasResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ListSchemasResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListSchemasResponse) @@ -34,6 +36,7 @@ public interface ListSchemasResponseOrBuilder * repeated .google.pubsub.v1.Schema schemas = 1; */ java.util.List getSchemasList(); + /** * * @@ -44,6 +47,7 @@ public interface ListSchemasResponseOrBuilder * repeated .google.pubsub.v1.Schema schemas = 1; */ com.google.pubsub.v1.Schema getSchemas(int index); + /** * * @@ -54,6 +58,7 @@ public interface ListSchemasResponseOrBuilder * repeated .google.pubsub.v1.Schema schemas = 1; */ int getSchemasCount(); + /** * * @@ -64,6 +69,7 @@ public interface ListSchemasResponseOrBuilder * repeated .google.pubsub.v1.Schema schemas = 1; */ java.util.List getSchemasOrBuilderList(); + /** * * @@ -88,6 +94,7 @@ public interface ListSchemasResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java index 7a1cf826a..f25cd5e2e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ListSnapshotsRequest} */ -public final class ListSnapshotsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListSnapshotsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListSnapshotsRequest) ListSnapshotsRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSnapshotsRequest"); + } + // Use ListSnapshotsRequest.newBuilder() to construct. - private ListSnapshotsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListSnapshotsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListSnapshotsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListSnapshotsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListSnapshotsRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object project_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getProject() { return s; } } + /** * * @@ -123,6 +132,7 @@ public com.google.protobuf.ByteString getProjectBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_ = 0; + /** * * @@ -143,6 +153,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -168,6 +179,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -208,14 +220,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, project_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); } getUnknownFields().writeTo(output); } @@ -226,14 +238,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, project_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -313,38 +325,38 @@ public static com.google.pubsub.v1.ListSnapshotsRequest parseFrom( public static com.google.pubsub.v1.ListSnapshotsRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSnapshotsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSnapshotsRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSnapshotsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSnapshotsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSnapshotsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -367,10 +379,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -380,7 +393,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ListSnapshotsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListSnapshotsRequest) com.google.pubsub.v1.ListSnapshotsRequestOrBuilder { @@ -390,7 +403,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListSnapshotsRequest_fieldAccessorTable @@ -402,7 +415,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ListSnapshotsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -460,39 +473,6 @@ private void buildPartial0(com.google.pubsub.v1.ListSnapshotsRequest 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.pubsub.v1.ListSnapshotsRequest) { @@ -582,6 +562,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object project_ = ""; + /** * * @@ -607,6 +588,7 @@ public java.lang.String getProject() { return (java.lang.String) ref; } } + /** * * @@ -632,6 +614,7 @@ public com.google.protobuf.ByteString getProjectBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -656,6 +639,7 @@ public Builder setProject(java.lang.String value) { onChanged(); return this; } + /** * * @@ -676,6 +660,7 @@ public Builder clearProject() { onChanged(); return this; } + /** * * @@ -703,6 +688,7 @@ public Builder setProjectBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -718,6 +704,7 @@ public Builder setProjectBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -737,6 +724,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -756,6 +744,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -780,6 +769,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -804,6 +794,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -827,6 +818,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -846,6 +838,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -871,17 +864,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListSnapshotsRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequestOrBuilder.java index 1fce5f0b0..b51ea89ab 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ListSnapshotsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListSnapshotsRequest) @@ -39,6 +41,7 @@ public interface ListSnapshotsRequestOrBuilder * @return The project. */ java.lang.String getProject(); + /** * * @@ -82,6 +85,7 @@ public interface ListSnapshotsRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java index 74fed6e23..5c4719949 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ListSnapshotsResponse} */ -public final class ListSnapshotsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListSnapshotsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListSnapshotsResponse) ListSnapshotsResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSnapshotsResponse"); + } + // Use ListSnapshotsResponse.newBuilder() to construct. - private ListSnapshotsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListSnapshotsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListSnapshotsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListSnapshotsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListSnapshotsResponse_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List snapshots_; + /** * * @@ -83,6 +91,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getSnapshotsList() { return snapshots_; } + /** * * @@ -99,6 +108,7 @@ public java.util.List getSnapshotsList() { getSnapshotsOrBuilderList() { return snapshots_; } + /** * * @@ -114,6 +124,7 @@ public java.util.List getSnapshotsList() { public int getSnapshotsCount() { return snapshots_.size(); } + /** * * @@ -129,6 +140,7 @@ public int getSnapshotsCount() { public com.google.pubsub.v1.Snapshot getSnapshots(int index) { return snapshots_.get(index); } + /** * * @@ -149,6 +161,7 @@ public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotsOrBuilder(int index) { @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -174,6 +187,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -217,8 +231,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < snapshots_.size(); i++) { output.writeMessage(1, snapshots_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -232,8 +246,8 @@ public int getSerializedSize() { for (int i = 0; i < snapshots_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, snapshots_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -312,38 +326,38 @@ public static com.google.pubsub.v1.ListSnapshotsResponse parseFrom( public static com.google.pubsub.v1.ListSnapshotsResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSnapshotsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSnapshotsResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSnapshotsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSnapshotsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSnapshotsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -366,10 +380,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -379,7 +394,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ListSnapshotsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListSnapshotsResponse) com.google.pubsub.v1.ListSnapshotsResponseOrBuilder { @@ -389,7 +404,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListSnapshotsResponse_fieldAccessorTable @@ -401,7 +416,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ListSnapshotsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -471,39 +486,6 @@ private void buildPartial0(com.google.pubsub.v1.ListSnapshotsResponse 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.pubsub.v1.ListSnapshotsResponse) { @@ -535,8 +517,8 @@ public Builder mergeFrom(com.google.pubsub.v1.ListSnapshotsResponse other) { snapshots_ = other.snapshots_; bitField0_ = (bitField0_ & ~0x00000001); snapshotsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSnapshotsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSnapshotsFieldBuilder() : null; } else { snapshotsBuilder_.addAllMessages(other.snapshots_); @@ -621,7 +603,7 @@ private void ensureSnapshotsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Snapshot, com.google.pubsub.v1.Snapshot.Builder, com.google.pubsub.v1.SnapshotOrBuilder> @@ -645,6 +627,7 @@ public java.util.List getSnapshotsList() { return snapshotsBuilder_.getMessageList(); } } + /** * * @@ -663,6 +646,7 @@ public int getSnapshotsCount() { return snapshotsBuilder_.getCount(); } } + /** * * @@ -681,6 +665,7 @@ public com.google.pubsub.v1.Snapshot getSnapshots(int index) { return snapshotsBuilder_.getMessage(index); } } + /** * * @@ -705,6 +690,7 @@ public Builder setSnapshots(int index, com.google.pubsub.v1.Snapshot value) { } return this; } + /** * * @@ -726,6 +712,7 @@ public Builder setSnapshots(int index, com.google.pubsub.v1.Snapshot.Builder bui } return this; } + /** * * @@ -750,6 +737,7 @@ public Builder addSnapshots(com.google.pubsub.v1.Snapshot value) { } return this; } + /** * * @@ -774,6 +762,7 @@ public Builder addSnapshots(int index, com.google.pubsub.v1.Snapshot value) { } return this; } + /** * * @@ -795,6 +784,7 @@ public Builder addSnapshots(com.google.pubsub.v1.Snapshot.Builder builderForValu } return this; } + /** * * @@ -816,6 +806,7 @@ public Builder addSnapshots(int index, com.google.pubsub.v1.Snapshot.Builder bui } return this; } + /** * * @@ -838,6 +829,7 @@ public Builder addAllSnapshots( } return this; } + /** * * @@ -859,6 +851,7 @@ public Builder clearSnapshots() { } return this; } + /** * * @@ -880,6 +873,7 @@ public Builder removeSnapshots(int index) { } return this; } + /** * * @@ -892,8 +886,9 @@ public Builder removeSnapshots(int index) { * */ public com.google.pubsub.v1.Snapshot.Builder getSnapshotsBuilder(int index) { - return getSnapshotsFieldBuilder().getBuilder(index); + return internalGetSnapshotsFieldBuilder().getBuilder(index); } + /** * * @@ -912,6 +907,7 @@ public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotsOrBuilder(int index) { return snapshotsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -931,6 +927,7 @@ public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotsOrBuilder(int index) { return java.util.Collections.unmodifiableList(snapshots_); } } + /** * * @@ -943,9 +940,10 @@ public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotsOrBuilder(int index) { * */ public com.google.pubsub.v1.Snapshot.Builder addSnapshotsBuilder() { - return getSnapshotsFieldBuilder() + return internalGetSnapshotsFieldBuilder() .addBuilder(com.google.pubsub.v1.Snapshot.getDefaultInstance()); } + /** * * @@ -958,9 +956,10 @@ public com.google.pubsub.v1.Snapshot.Builder addSnapshotsBuilder() { * */ public com.google.pubsub.v1.Snapshot.Builder addSnapshotsBuilder(int index) { - return getSnapshotsFieldBuilder() + return internalGetSnapshotsFieldBuilder() .addBuilder(index, com.google.pubsub.v1.Snapshot.getDefaultInstance()); } + /** * * @@ -973,17 +972,17 @@ public com.google.pubsub.v1.Snapshot.Builder addSnapshotsBuilder(int index) { * */ public java.util.List getSnapshotsBuilderList() { - return getSnapshotsFieldBuilder().getBuilderList(); + return internalGetSnapshotsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Snapshot, com.google.pubsub.v1.Snapshot.Builder, com.google.pubsub.v1.SnapshotOrBuilder> - getSnapshotsFieldBuilder() { + internalGetSnapshotsFieldBuilder() { if (snapshotsBuilder_ == null) { snapshotsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Snapshot, com.google.pubsub.v1.Snapshot.Builder, com.google.pubsub.v1.SnapshotOrBuilder>( @@ -994,6 +993,7 @@ public java.util.List getSnapshotsBuilder } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -1018,6 +1018,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1042,6 +1043,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1065,6 +1067,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1084,6 +1087,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -1109,17 +1113,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListSnapshotsResponse) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponseOrBuilder.java index d53121a32..ec4643a06 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSnapshotsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ListSnapshotsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListSnapshotsResponse) @@ -36,6 +38,7 @@ public interface ListSnapshotsResponseOrBuilder * */ java.util.List getSnapshotsList(); + /** * * @@ -48,6 +51,7 @@ public interface ListSnapshotsResponseOrBuilder * */ com.google.pubsub.v1.Snapshot getSnapshots(int index); + /** * * @@ -60,6 +64,7 @@ public interface ListSnapshotsResponseOrBuilder * */ int getSnapshotsCount(); + /** * * @@ -72,6 +77,7 @@ public interface ListSnapshotsResponseOrBuilder * */ java.util.List getSnapshotsOrBuilderList(); + /** * * @@ -99,6 +105,7 @@ public interface ListSnapshotsResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java index c2c66a388..c1e4ddcb1 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ListSubscriptionsRequest} */ -public final class ListSubscriptionsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListSubscriptionsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListSubscriptionsRequest) ListSubscriptionsRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSubscriptionsRequest"); + } + // Use ListSubscriptionsRequest.newBuilder() to construct. - private ListSubscriptionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListSubscriptionsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListSubscriptionsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListSubscriptionsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListSubscriptionsRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object project_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getProject() { return s; } } + /** * * @@ -123,6 +132,7 @@ public com.google.protobuf.ByteString getProjectBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_ = 0; + /** * * @@ -143,6 +153,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -168,6 +179,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -208,14 +220,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, project_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); } getUnknownFields().writeTo(output); } @@ -226,14 +238,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, project_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -313,38 +325,38 @@ public static com.google.pubsub.v1.ListSubscriptionsRequest parseFrom( public static com.google.pubsub.v1.ListSubscriptionsRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSubscriptionsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSubscriptionsRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSubscriptionsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSubscriptionsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSubscriptionsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -367,10 +379,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -380,7 +393,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ListSubscriptionsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListSubscriptionsRequest) com.google.pubsub.v1.ListSubscriptionsRequestOrBuilder { @@ -390,7 +403,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListSubscriptionsRequest_fieldAccessorTable @@ -402,7 +415,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ListSubscriptionsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -460,39 +473,6 @@ private void buildPartial0(com.google.pubsub.v1.ListSubscriptionsRequest 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.pubsub.v1.ListSubscriptionsRequest) { @@ -582,6 +562,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object project_ = ""; + /** * * @@ -607,6 +588,7 @@ public java.lang.String getProject() { return (java.lang.String) ref; } } + /** * * @@ -632,6 +614,7 @@ public com.google.protobuf.ByteString getProjectBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -656,6 +639,7 @@ public Builder setProject(java.lang.String value) { onChanged(); return this; } + /** * * @@ -676,6 +660,7 @@ public Builder clearProject() { onChanged(); return this; } + /** * * @@ -703,6 +688,7 @@ public Builder setProjectBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -718,6 +704,7 @@ public Builder setProjectBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -737,6 +724,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -756,6 +744,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -780,6 +769,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -804,6 +794,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -827,6 +818,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -846,6 +838,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -871,17 +864,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListSubscriptionsRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequestOrBuilder.java index 3dd31b9e7..85908081b 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ListSubscriptionsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListSubscriptionsRequest) @@ -39,6 +41,7 @@ public interface ListSubscriptionsRequestOrBuilder * @return The project. */ java.lang.String getProject(); + /** * * @@ -82,6 +85,7 @@ public interface ListSubscriptionsRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java index c0ce6fc00..44acf2f2d 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ListSubscriptionsResponse} */ -public final class ListSubscriptionsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListSubscriptionsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListSubscriptionsResponse) ListSubscriptionsResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSubscriptionsResponse"); + } + // Use ListSubscriptionsResponse.newBuilder() to construct. - private ListSubscriptionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListSubscriptionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListSubscriptionsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListSubscriptionsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListSubscriptionsResponse_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List subscriptions_; + /** * * @@ -83,6 +91,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getSubscriptionsList() { return subscriptions_; } + /** * * @@ -99,6 +108,7 @@ public java.util.List getSubscriptionsList() getSubscriptionsOrBuilderList() { return subscriptions_; } + /** * * @@ -114,6 +124,7 @@ public java.util.List getSubscriptionsList() public int getSubscriptionsCount() { return subscriptions_.size(); } + /** * * @@ -129,6 +140,7 @@ public int getSubscriptionsCount() { public com.google.pubsub.v1.Subscription getSubscriptions(int index) { return subscriptions_.get(index); } + /** * * @@ -149,6 +161,7 @@ public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionsOrBuilder(int @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -174,6 +187,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -217,8 +231,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < subscriptions_.size(); i++) { output.writeMessage(1, subscriptions_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -232,8 +246,8 @@ public int getSerializedSize() { for (int i = 0; i < subscriptions_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, subscriptions_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -312,38 +326,38 @@ public static com.google.pubsub.v1.ListSubscriptionsResponse parseFrom( public static com.google.pubsub.v1.ListSubscriptionsResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSubscriptionsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSubscriptionsResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSubscriptionsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListSubscriptionsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListSubscriptionsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -366,10 +380,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -379,7 +394,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ListSubscriptionsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListSubscriptionsResponse) com.google.pubsub.v1.ListSubscriptionsResponseOrBuilder { @@ -389,7 +404,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListSubscriptionsResponse_fieldAccessorTable @@ -401,7 +416,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ListSubscriptionsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -471,39 +486,6 @@ private void buildPartial0(com.google.pubsub.v1.ListSubscriptionsResponse 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.pubsub.v1.ListSubscriptionsResponse) { @@ -535,8 +517,8 @@ public Builder mergeFrom(com.google.pubsub.v1.ListSubscriptionsResponse other) { subscriptions_ = other.subscriptions_; bitField0_ = (bitField0_ & ~0x00000001); subscriptionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSubscriptionsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSubscriptionsFieldBuilder() : null; } else { subscriptionsBuilder_.addAllMessages(other.subscriptions_); @@ -622,7 +604,7 @@ private void ensureSubscriptionsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Subscription, com.google.pubsub.v1.Subscription.Builder, com.google.pubsub.v1.SubscriptionOrBuilder> @@ -646,6 +628,7 @@ public java.util.List getSubscriptionsList() return subscriptionsBuilder_.getMessageList(); } } + /** * * @@ -664,6 +647,7 @@ public int getSubscriptionsCount() { return subscriptionsBuilder_.getCount(); } } + /** * * @@ -682,6 +666,7 @@ public com.google.pubsub.v1.Subscription getSubscriptions(int index) { return subscriptionsBuilder_.getMessage(index); } } + /** * * @@ -706,6 +691,7 @@ public Builder setSubscriptions(int index, com.google.pubsub.v1.Subscription val } return this; } + /** * * @@ -728,6 +714,7 @@ public Builder setSubscriptions( } return this; } + /** * * @@ -752,6 +739,7 @@ public Builder addSubscriptions(com.google.pubsub.v1.Subscription value) { } return this; } + /** * * @@ -776,6 +764,7 @@ public Builder addSubscriptions(int index, com.google.pubsub.v1.Subscription val } return this; } + /** * * @@ -797,6 +786,7 @@ public Builder addSubscriptions(com.google.pubsub.v1.Subscription.Builder builde } return this; } + /** * * @@ -819,6 +809,7 @@ public Builder addSubscriptions( } return this; } + /** * * @@ -841,6 +832,7 @@ public Builder addAllSubscriptions( } return this; } + /** * * @@ -862,6 +854,7 @@ public Builder clearSubscriptions() { } return this; } + /** * * @@ -883,6 +876,7 @@ public Builder removeSubscriptions(int index) { } return this; } + /** * * @@ -895,8 +889,9 @@ public Builder removeSubscriptions(int index) { * */ public com.google.pubsub.v1.Subscription.Builder getSubscriptionsBuilder(int index) { - return getSubscriptionsFieldBuilder().getBuilder(index); + return internalGetSubscriptionsFieldBuilder().getBuilder(index); } + /** * * @@ -915,6 +910,7 @@ public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionsOrBuilder(int return subscriptionsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -934,6 +930,7 @@ public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionsOrBuilder(int return java.util.Collections.unmodifiableList(subscriptions_); } } + /** * * @@ -946,9 +943,10 @@ public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionsOrBuilder(int * */ public com.google.pubsub.v1.Subscription.Builder addSubscriptionsBuilder() { - return getSubscriptionsFieldBuilder() + return internalGetSubscriptionsFieldBuilder() .addBuilder(com.google.pubsub.v1.Subscription.getDefaultInstance()); } + /** * * @@ -961,9 +959,10 @@ public com.google.pubsub.v1.Subscription.Builder addSubscriptionsBuilder() { * */ public com.google.pubsub.v1.Subscription.Builder addSubscriptionsBuilder(int index) { - return getSubscriptionsFieldBuilder() + return internalGetSubscriptionsFieldBuilder() .addBuilder(index, com.google.pubsub.v1.Subscription.getDefaultInstance()); } + /** * * @@ -976,17 +975,17 @@ public com.google.pubsub.v1.Subscription.Builder addSubscriptionsBuilder(int ind * */ public java.util.List getSubscriptionsBuilderList() { - return getSubscriptionsFieldBuilder().getBuilderList(); + return internalGetSubscriptionsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Subscription, com.google.pubsub.v1.Subscription.Builder, com.google.pubsub.v1.SubscriptionOrBuilder> - getSubscriptionsFieldBuilder() { + internalGetSubscriptionsFieldBuilder() { if (subscriptionsBuilder_ == null) { subscriptionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Subscription, com.google.pubsub.v1.Subscription.Builder, com.google.pubsub.v1.SubscriptionOrBuilder>( @@ -1000,6 +999,7 @@ public java.util.List getSubscription } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -1024,6 +1024,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1048,6 +1049,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1071,6 +1073,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1090,6 +1093,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -1115,17 +1119,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListSubscriptionsResponse) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponseOrBuilder.java index 20b021f93..55129e301 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ListSubscriptionsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListSubscriptionsResponse) @@ -36,6 +38,7 @@ public interface ListSubscriptionsResponseOrBuilder * */ java.util.List getSubscriptionsList(); + /** * * @@ -48,6 +51,7 @@ public interface ListSubscriptionsResponseOrBuilder * */ com.google.pubsub.v1.Subscription getSubscriptions(int index); + /** * * @@ -60,6 +64,7 @@ public interface ListSubscriptionsResponseOrBuilder * */ int getSubscriptionsCount(); + /** * * @@ -73,6 +78,7 @@ public interface ListSubscriptionsResponseOrBuilder */ java.util.List getSubscriptionsOrBuilderList(); + /** * * @@ -100,6 +106,7 @@ public interface ListSubscriptionsResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequest.java index f39c3c4b6..0293fb6de 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ListTopicSnapshotsRequest} */ -public final class ListTopicSnapshotsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListTopicSnapshotsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListTopicSnapshotsRequest) ListTopicSnapshotsRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListTopicSnapshotsRequest"); + } + // Use ListTopicSnapshotsRequest.newBuilder() to construct. - private ListTopicSnapshotsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListTopicSnapshotsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListTopicSnapshotsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListTopicSnapshotsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object topic_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getTopic() { return s; } } + /** * * @@ -123,6 +132,7 @@ public com.google.protobuf.ByteString getTopicBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_ = 0; + /** * * @@ -143,6 +153,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -168,6 +179,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -208,14 +220,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, topic_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); } getUnknownFields().writeTo(output); } @@ -226,14 +238,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, topic_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -313,38 +325,38 @@ public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom( public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicSnapshotsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -367,10 +379,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -380,7 +393,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ListTopicSnapshotsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListTopicSnapshotsRequest) com.google.pubsub.v1.ListTopicSnapshotsRequestOrBuilder { @@ -390,7 +403,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_fieldAccessorTable @@ -402,7 +415,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ListTopicSnapshotsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -460,39 +473,6 @@ private void buildPartial0(com.google.pubsub.v1.ListTopicSnapshotsRequest 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.pubsub.v1.ListTopicSnapshotsRequest) { @@ -582,6 +562,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object topic_ = ""; + /** * * @@ -607,6 +588,7 @@ public java.lang.String getTopic() { return (java.lang.String) ref; } } + /** * * @@ -632,6 +614,7 @@ public com.google.protobuf.ByteString getTopicBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -656,6 +639,7 @@ public Builder setTopic(java.lang.String value) { onChanged(); return this; } + /** * * @@ -676,6 +660,7 @@ public Builder clearTopic() { onChanged(); return this; } + /** * * @@ -703,6 +688,7 @@ public Builder setTopicBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -718,6 +704,7 @@ public Builder setTopicBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -737,6 +724,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -756,6 +744,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -780,6 +769,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -804,6 +794,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -827,6 +818,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -846,6 +838,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -871,17 +864,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListTopicSnapshotsRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequestOrBuilder.java index 6844d32f0..bdddb1f3d 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ListTopicSnapshotsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListTopicSnapshotsRequest) @@ -39,6 +41,7 @@ public interface ListTopicSnapshotsRequestOrBuilder * @return The topic. */ java.lang.String getTopic(); + /** * * @@ -82,6 +85,7 @@ public interface ListTopicSnapshotsRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java index 1a8092115..5f7ba1850 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ListTopicSnapshotsResponse} */ -public final class ListTopicSnapshotsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListTopicSnapshotsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListTopicSnapshotsResponse) ListTopicSnapshotsResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListTopicSnapshotsResponse"); + } + // Use ListTopicSnapshotsResponse.newBuilder() to construct. - private ListTopicSnapshotsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListTopicSnapshotsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListTopicSnapshotsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListTopicSnapshotsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList snapshots_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -76,13 +84,16 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return A list containing the snapshots. */ public com.google.protobuf.ProtocolStringList getSnapshotsList() { return snapshots_; } + /** * * @@ -90,13 +101,16 @@ public com.google.protobuf.ProtocolStringList getSnapshotsList() { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The count of snapshots. */ public int getSnapshotsCount() { return snapshots_.size(); } + /** * * @@ -104,7 +118,9 @@ public int getSnapshotsCount() { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param index The index of the element to return. * @return The snapshots at the given index. @@ -112,6 +128,7 @@ public int getSnapshotsCount() { public java.lang.String getSnapshots(int index) { return snapshots_.get(index); } + /** * * @@ -119,7 +136,9 @@ public java.lang.String getSnapshots(int index) { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param index The index of the value to return. * @return The bytes of the snapshots at the given index. @@ -132,6 +151,7 @@ public com.google.protobuf.ByteString getSnapshotsBytes(int index) { @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -157,6 +177,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -198,10 +219,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < snapshots_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, snapshots_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 1, snapshots_.getRaw(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -220,8 +241,8 @@ public int getSerializedSize() { size += dataSize; size += 1 * getSnapshotsList().size(); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -300,38 +321,38 @@ public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom( public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicSnapshotsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -354,10 +375,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -367,7 +389,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ListTopicSnapshotsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListTopicSnapshotsResponse) com.google.pubsub.v1.ListTopicSnapshotsResponseOrBuilder { @@ -377,7 +399,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_fieldAccessorTable @@ -389,7 +411,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ListTopicSnapshotsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -444,39 +466,6 @@ private void buildPartial0(com.google.pubsub.v1.ListTopicSnapshotsResponse resul } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.ListTopicSnapshotsResponse) { @@ -572,6 +561,7 @@ private void ensureSnapshotsIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -579,7 +569,9 @@ private void ensureSnapshotsIsMutable() { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return A list containing the snapshots. */ @@ -587,6 +579,7 @@ public com.google.protobuf.ProtocolStringList getSnapshotsList() { snapshots_.makeImmutable(); return snapshots_; } + /** * * @@ -594,13 +587,16 @@ public com.google.protobuf.ProtocolStringList getSnapshotsList() { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The count of snapshots. */ public int getSnapshotsCount() { return snapshots_.size(); } + /** * * @@ -608,7 +604,9 @@ public int getSnapshotsCount() { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param index The index of the element to return. * @return The snapshots at the given index. @@ -616,6 +614,7 @@ public int getSnapshotsCount() { public java.lang.String getSnapshots(int index) { return snapshots_.get(index); } + /** * * @@ -623,7 +622,9 @@ public java.lang.String getSnapshots(int index) { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param index The index of the value to return. * @return The bytes of the snapshots at the given index. @@ -631,6 +632,7 @@ public java.lang.String getSnapshots(int index) { public com.google.protobuf.ByteString getSnapshotsBytes(int index) { return snapshots_.getByteString(index); } + /** * * @@ -638,7 +640,9 @@ public com.google.protobuf.ByteString getSnapshotsBytes(int index) { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param index The index to set the value at. * @param value The snapshots to set. @@ -654,6 +658,7 @@ public Builder setSnapshots(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -661,7 +666,9 @@ public Builder setSnapshots(int index, java.lang.String value) { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The snapshots to add. * @return This builder for chaining. @@ -676,6 +683,7 @@ public Builder addSnapshots(java.lang.String value) { onChanged(); return this; } + /** * * @@ -683,7 +691,9 @@ public Builder addSnapshots(java.lang.String value) { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param values The snapshots to add. * @return This builder for chaining. @@ -695,6 +705,7 @@ public Builder addAllSnapshots(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -702,7 +713,9 @@ public Builder addAllSnapshots(java.lang.Iterable values) { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -713,6 +726,7 @@ public Builder clearSnapshots() { onChanged(); return this; } + /** * * @@ -720,7 +734,9 @@ public Builder clearSnapshots() { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes of the snapshots to add. * @return This builder for chaining. @@ -738,6 +754,7 @@ public Builder addSnapshotsBytes(com.google.protobuf.ByteString value) { } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -762,6 +779,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -786,6 +804,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -809,6 +828,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -828,6 +848,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -853,17 +874,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListTopicSnapshotsResponse) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponseOrBuilder.java index 5b80ee609..25382f4f1 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ListTopicSnapshotsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListTopicSnapshotsResponse) @@ -31,11 +33,14 @@ public interface ListTopicSnapshotsResponseOrBuilder * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return A list containing the snapshots. */ java.util.List getSnapshotsList(); + /** * * @@ -43,11 +48,14 @@ public interface ListTopicSnapshotsResponseOrBuilder * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The count of snapshots. */ int getSnapshotsCount(); + /** * * @@ -55,12 +63,15 @@ public interface ListTopicSnapshotsResponseOrBuilder * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param index The index of the element to return. * @return The snapshots at the given index. */ java.lang.String getSnapshots(int index); + /** * * @@ -68,7 +79,9 @@ public interface ListTopicSnapshotsResponseOrBuilder * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param index The index of the value to return. * @return The bytes of the snapshots at the given index. @@ -89,6 +102,7 @@ public interface ListTopicSnapshotsResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java index 021630379..be6c24a99 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ListTopicSubscriptionsRequest} */ -public final class ListTopicSubscriptionsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListTopicSubscriptionsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListTopicSubscriptionsRequest) ListTopicSubscriptionsRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListTopicSubscriptionsRequest"); + } + // Use ListTopicSubscriptionsRequest.newBuilder() to construct. - private ListTopicSubscriptionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListTopicSubscriptionsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListTopicSubscriptionsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListTopicSubscriptionsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object topic_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getTopic() { return s; } } + /** * * @@ -123,6 +132,7 @@ public com.google.protobuf.ByteString getTopicBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_ = 0; + /** * * @@ -143,6 +153,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -168,6 +179,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -208,14 +220,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, topic_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); } getUnknownFields().writeTo(output); } @@ -226,14 +238,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, topic_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -313,38 +325,38 @@ public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseFrom( public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -367,10 +379,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -380,7 +393,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ListTopicSubscriptionsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListTopicSubscriptionsRequest) com.google.pubsub.v1.ListTopicSubscriptionsRequestOrBuilder { @@ -390,7 +403,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_fieldAccessorTable @@ -402,7 +415,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ListTopicSubscriptionsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -460,39 +473,6 @@ private void buildPartial0(com.google.pubsub.v1.ListTopicSubscriptionsRequest re } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.ListTopicSubscriptionsRequest) { @@ -583,6 +563,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object topic_ = ""; + /** * * @@ -608,6 +589,7 @@ public java.lang.String getTopic() { return (java.lang.String) ref; } } + /** * * @@ -633,6 +615,7 @@ public com.google.protobuf.ByteString getTopicBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -657,6 +640,7 @@ public Builder setTopic(java.lang.String value) { onChanged(); return this; } + /** * * @@ -677,6 +661,7 @@ public Builder clearTopic() { onChanged(); return this; } + /** * * @@ -704,6 +689,7 @@ public Builder setTopicBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -719,6 +705,7 @@ public Builder setTopicBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -738,6 +725,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -757,6 +745,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -781,6 +770,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -805,6 +795,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -828,6 +819,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -847,6 +839,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -872,17 +865,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListTopicSubscriptionsRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequestOrBuilder.java index f25ea7858..07a1f6124 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ListTopicSubscriptionsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListTopicSubscriptionsRequest) @@ -39,6 +41,7 @@ public interface ListTopicSubscriptionsRequestOrBuilder * @return The topic. */ java.lang.String getTopic(); + /** * * @@ -82,6 +85,7 @@ public interface ListTopicSubscriptionsRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java index dcb6c60f4..ed115a4c5 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ListTopicSubscriptionsResponse} */ -public final class ListTopicSubscriptionsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListTopicSubscriptionsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListTopicSubscriptionsResponse) ListTopicSubscriptionsResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListTopicSubscriptionsResponse"); + } + // Use ListTopicSubscriptionsResponse.newBuilder() to construct. - private ListTopicSubscriptionsResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListTopicSubscriptionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private ListTopicSubscriptionsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListTopicSubscriptionsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_fieldAccessorTable @@ -70,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList subscriptions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -87,6 +94,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public com.google.protobuf.ProtocolStringList getSubscriptionsList() { return subscriptions_; } + /** * * @@ -104,6 +112,7 @@ public com.google.protobuf.ProtocolStringList getSubscriptionsList() { public int getSubscriptionsCount() { return subscriptions_.size(); } + /** * * @@ -122,6 +131,7 @@ public int getSubscriptionsCount() { public java.lang.String getSubscriptions(int index) { return subscriptions_.get(index); } + /** * * @@ -145,6 +155,7 @@ public com.google.protobuf.ByteString getSubscriptionsBytes(int index) { @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -170,6 +181,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -211,10 +223,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < subscriptions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscriptions_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 1, subscriptions_.getRaw(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -233,8 +245,8 @@ public int getSerializedSize() { size += dataSize; size += 1 * getSubscriptionsList().size(); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -313,38 +325,38 @@ public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseFrom( public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -367,10 +379,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -380,7 +393,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ListTopicSubscriptionsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListTopicSubscriptionsResponse) com.google.pubsub.v1.ListTopicSubscriptionsResponseOrBuilder { @@ -390,7 +403,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_fieldAccessorTable @@ -402,7 +415,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ListTopicSubscriptionsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -457,39 +470,6 @@ private void buildPartial0(com.google.pubsub.v1.ListTopicSubscriptionsResponse r } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.ListTopicSubscriptionsResponse) { @@ -585,6 +565,7 @@ private void ensureSubscriptionsIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -603,6 +584,7 @@ public com.google.protobuf.ProtocolStringList getSubscriptionsList() { subscriptions_.makeImmutable(); return subscriptions_; } + /** * * @@ -620,6 +602,7 @@ public com.google.protobuf.ProtocolStringList getSubscriptionsList() { public int getSubscriptionsCount() { return subscriptions_.size(); } + /** * * @@ -638,6 +621,7 @@ public int getSubscriptionsCount() { public java.lang.String getSubscriptions(int index) { return subscriptions_.get(index); } + /** * * @@ -656,6 +640,7 @@ public java.lang.String getSubscriptions(int index) { public com.google.protobuf.ByteString getSubscriptionsBytes(int index) { return subscriptions_.getByteString(index); } + /** * * @@ -682,6 +667,7 @@ public Builder setSubscriptions(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -707,6 +693,7 @@ public Builder addSubscriptions(java.lang.String value) { onChanged(); return this; } + /** * * @@ -729,6 +716,7 @@ public Builder addAllSubscriptions(java.lang.Iterable values) onChanged(); return this; } + /** * * @@ -750,6 +738,7 @@ public Builder clearSubscriptions() { onChanged(); return this; } + /** * * @@ -778,6 +767,7 @@ public Builder addSubscriptionsBytes(com.google.protobuf.ByteString value) { } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -802,6 +792,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -826,6 +817,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -849,6 +841,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -868,6 +861,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -893,17 +887,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListTopicSubscriptionsResponse) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java index 3f6ad98e1..559bb08c2 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ListTopicSubscriptionsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListTopicSubscriptionsResponse) @@ -39,6 +41,7 @@ public interface ListTopicSubscriptionsResponseOrBuilder * @return A list containing the subscriptions. */ java.util.List getSubscriptionsList(); + /** * * @@ -54,6 +57,7 @@ public interface ListTopicSubscriptionsResponseOrBuilder * @return The count of subscriptions. */ int getSubscriptionsCount(); + /** * * @@ -70,6 +74,7 @@ public interface ListTopicSubscriptionsResponseOrBuilder * @return The subscriptions at the given index. */ java.lang.String getSubscriptions(int index); + /** * * @@ -101,6 +106,7 @@ public interface ListTopicSubscriptionsResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java index c36f242a2..5db5c1454 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ListTopicsRequest} */ -public final class ListTopicsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListTopicsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListTopicsRequest) ListTopicsRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListTopicsRequest"); + } + // Use ListTopicsRequest.newBuilder() to construct. - private ListTopicsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListTopicsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListTopicsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListTopicsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicsRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object project_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getProject() { return s; } } + /** * * @@ -123,6 +132,7 @@ public com.google.protobuf.ByteString getProjectBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_ = 0; + /** * * @@ -143,6 +153,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -168,6 +179,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -208,14 +220,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, project_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); } getUnknownFields().writeTo(output); } @@ -226,14 +238,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, project_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -312,38 +324,38 @@ public static com.google.pubsub.v1.ListTopicsRequest parseFrom( public static com.google.pubsub.v1.ListTopicsRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListTopicsRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListTopicsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -366,10 +378,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -379,7 +392,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ListTopicsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListTopicsRequest) com.google.pubsub.v1.ListTopicsRequestOrBuilder { @@ -389,7 +402,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicsRequest_fieldAccessorTable @@ -401,7 +414,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ListTopicsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -459,39 +472,6 @@ private void buildPartial0(com.google.pubsub.v1.ListTopicsRequest 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.pubsub.v1.ListTopicsRequest) { @@ -581,6 +561,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object project_ = ""; + /** * * @@ -606,6 +587,7 @@ public java.lang.String getProject() { return (java.lang.String) ref; } } + /** * * @@ -631,6 +613,7 @@ public com.google.protobuf.ByteString getProjectBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -655,6 +638,7 @@ public Builder setProject(java.lang.String value) { onChanged(); return this; } + /** * * @@ -675,6 +659,7 @@ public Builder clearProject() { onChanged(); return this; } + /** * * @@ -702,6 +687,7 @@ public Builder setProjectBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -717,6 +703,7 @@ public Builder setProjectBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -736,6 +723,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -755,6 +743,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -779,6 +768,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -803,6 +793,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -826,6 +817,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -845,6 +837,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -870,17 +863,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListTopicsRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequestOrBuilder.java index 267473b95..2b30c60b8 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ListTopicsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListTopicsRequest) @@ -39,6 +41,7 @@ public interface ListTopicsRequestOrBuilder * @return The project. */ java.lang.String getProject(); + /** * * @@ -82,6 +85,7 @@ public interface ListTopicsRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java index aca359bbf..832ad62ae 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ListTopicsResponse} */ -public final class ListTopicsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListTopicsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListTopicsResponse) ListTopicsResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListTopicsResponse"); + } + // Use ListTopicsResponse.newBuilder() to construct. - private ListTopicsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListTopicsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListTopicsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListTopicsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicsResponse_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List topics_; + /** * * @@ -82,6 +90,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getTopicsList() { return topics_; } + /** * * @@ -96,6 +105,7 @@ public java.util.List getTopicsList() { public java.util.List getTopicsOrBuilderList() { return topics_; } + /** * * @@ -110,6 +120,7 @@ public java.util.List getTopicsOr public int getTopicsCount() { return topics_.size(); } + /** * * @@ -124,6 +135,7 @@ public int getTopicsCount() { public com.google.pubsub.v1.Topic getTopics(int index) { return topics_.get(index); } + /** * * @@ -143,6 +155,7 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicsOrBuilder(int index) { @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -167,6 +180,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -209,8 +223,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < topics_.size(); i++) { output.writeMessage(1, topics_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -224,8 +238,8 @@ public int getSerializedSize() { for (int i = 0; i < topics_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, topics_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -303,38 +317,38 @@ public static com.google.pubsub.v1.ListTopicsResponse parseFrom( public static com.google.pubsub.v1.ListTopicsResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListTopicsResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ListTopicsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ListTopicsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -357,10 +371,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -370,7 +385,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ListTopicsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListTopicsResponse) com.google.pubsub.v1.ListTopicsResponseOrBuilder { @@ -380,7 +395,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ListTopicsResponse_fieldAccessorTable @@ -392,7 +407,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ListTopicsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -462,39 +477,6 @@ private void buildPartial0(com.google.pubsub.v1.ListTopicsResponse 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.pubsub.v1.ListTopicsResponse) { @@ -526,8 +508,8 @@ public Builder mergeFrom(com.google.pubsub.v1.ListTopicsResponse other) { topics_ = other.topics_; bitField0_ = (bitField0_ & ~0x00000001); topicsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTopicsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetTopicsFieldBuilder() : null; } else { topicsBuilder_.addAllMessages(other.topics_); @@ -611,7 +593,7 @@ private void ensureTopicsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Topic, com.google.pubsub.v1.Topic.Builder, com.google.pubsub.v1.TopicOrBuilder> @@ -634,6 +616,7 @@ public java.util.List getTopicsList() { return topicsBuilder_.getMessageList(); } } + /** * * @@ -651,6 +634,7 @@ public int getTopicsCount() { return topicsBuilder_.getCount(); } } + /** * * @@ -668,6 +652,7 @@ public com.google.pubsub.v1.Topic getTopics(int index) { return topicsBuilder_.getMessage(index); } } + /** * * @@ -691,6 +676,7 @@ public Builder setTopics(int index, com.google.pubsub.v1.Topic value) { } return this; } + /** * * @@ -711,6 +697,7 @@ public Builder setTopics(int index, com.google.pubsub.v1.Topic.Builder builderFo } return this; } + /** * * @@ -734,6 +721,7 @@ public Builder addTopics(com.google.pubsub.v1.Topic value) { } return this; } + /** * * @@ -757,6 +745,7 @@ public Builder addTopics(int index, com.google.pubsub.v1.Topic value) { } return this; } + /** * * @@ -777,6 +766,7 @@ public Builder addTopics(com.google.pubsub.v1.Topic.Builder builderForValue) { } return this; } + /** * * @@ -797,6 +787,7 @@ public Builder addTopics(int index, com.google.pubsub.v1.Topic.Builder builderFo } return this; } + /** * * @@ -817,6 +808,7 @@ public Builder addAllTopics(java.lang.Iterable */ public com.google.pubsub.v1.Topic.Builder getTopicsBuilder(int index) { - return getTopicsFieldBuilder().getBuilder(index); + return internalGetTopicsFieldBuilder().getBuilder(index); } + /** * * @@ -887,6 +882,7 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicsOrBuilder(int index) { return topicsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -904,6 +900,7 @@ public java.util.List getTopicsOr return java.util.Collections.unmodifiableList(topics_); } } + /** * * @@ -915,8 +912,10 @@ public java.util.List getTopicsOr * */ public com.google.pubsub.v1.Topic.Builder addTopicsBuilder() { - return getTopicsFieldBuilder().addBuilder(com.google.pubsub.v1.Topic.getDefaultInstance()); + return internalGetTopicsFieldBuilder() + .addBuilder(com.google.pubsub.v1.Topic.getDefaultInstance()); } + /** * * @@ -928,9 +927,10 @@ public com.google.pubsub.v1.Topic.Builder addTopicsBuilder() { * */ public com.google.pubsub.v1.Topic.Builder addTopicsBuilder(int index) { - return getTopicsFieldBuilder() + return internalGetTopicsFieldBuilder() .addBuilder(index, com.google.pubsub.v1.Topic.getDefaultInstance()); } + /** * * @@ -942,17 +942,17 @@ public com.google.pubsub.v1.Topic.Builder addTopicsBuilder(int index) { * */ public java.util.List getTopicsBuilderList() { - return getTopicsFieldBuilder().getBuilderList(); + return internalGetTopicsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Topic, com.google.pubsub.v1.Topic.Builder, com.google.pubsub.v1.TopicOrBuilder> - getTopicsFieldBuilder() { + internalGetTopicsFieldBuilder() { if (topicsBuilder_ == null) { topicsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.Topic, com.google.pubsub.v1.Topic.Builder, com.google.pubsub.v1.TopicOrBuilder>( @@ -963,6 +963,7 @@ public java.util.List getTopicsBuilderList() } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -986,6 +987,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1009,6 +1011,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1031,6 +1034,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1049,6 +1053,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -1073,17 +1078,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListTopicsResponse) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponseOrBuilder.java index 29832578e..ff3026965 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ListTopicsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListTopicsResponse) @@ -35,6 +37,7 @@ public interface ListTopicsResponseOrBuilder * */ java.util.List getTopicsList(); + /** * * @@ -46,6 +49,7 @@ public interface ListTopicsResponseOrBuilder * */ com.google.pubsub.v1.Topic getTopics(int index); + /** * * @@ -57,6 +61,7 @@ public interface ListTopicsResponseOrBuilder * */ int getTopicsCount(); + /** * * @@ -68,6 +73,7 @@ public interface ListTopicsResponseOrBuilder * */ java.util.List getTopicsOrBuilderList(); + /** * * @@ -93,6 +99,7 @@ public interface ListTopicsResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java index 59aa717bd..c19f2e154 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageStoragePolicy.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.MessageStoragePolicy} */ -public final class MessageStoragePolicy extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class MessageStoragePolicy extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.MessageStoragePolicy) MessageStoragePolicyOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MessageStoragePolicy"); + } + // Use MessageStoragePolicy.newBuilder() to construct. - private MessageStoragePolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MessageStoragePolicy(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private MessageStoragePolicy() { allowedPersistenceRegions_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MessageStoragePolicy(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_MessageStoragePolicy_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_MessageStoragePolicy_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList allowedPersistenceRegions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -89,6 +97,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public com.google.protobuf.ProtocolStringList getAllowedPersistenceRegionsList() { return allowedPersistenceRegions_; } + /** * * @@ -110,6 +119,7 @@ public com.google.protobuf.ProtocolStringList getAllowedPersistenceRegionsList() public int getAllowedPersistenceRegionsCount() { return allowedPersistenceRegions_.size(); } + /** * * @@ -132,6 +142,7 @@ public int getAllowedPersistenceRegionsCount() { public java.lang.String getAllowedPersistenceRegions(int index) { return allowedPersistenceRegions_.get(index); } + /** * * @@ -157,6 +168,7 @@ public com.google.protobuf.ByteString getAllowedPersistenceRegionsBytes(int inde public static final int ENFORCE_IN_TRANSIT_FIELD_NUMBER = 2; private boolean enforceInTransit_ = false; + /** * * @@ -192,7 +204,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < allowedPersistenceRegions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( + com.google.protobuf.GeneratedMessage.writeString( output, 1, allowedPersistenceRegions_.getRaw(i)); } if (enforceInTransit_ != false) { @@ -296,38 +308,38 @@ public static com.google.pubsub.v1.MessageStoragePolicy parseFrom( public static com.google.pubsub.v1.MessageStoragePolicy parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.MessageStoragePolicy parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.MessageStoragePolicy parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.MessageStoragePolicy parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.MessageStoragePolicy parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.MessageStoragePolicy parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -350,10 +362,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -363,7 +376,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.MessageStoragePolicy} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.MessageStoragePolicy) com.google.pubsub.v1.MessageStoragePolicyOrBuilder { @@ -373,7 +386,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_MessageStoragePolicy_fieldAccessorTable @@ -385,7 +398,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.MessageStoragePolicy.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -440,39 +453,6 @@ private void buildPartial0(com.google.pubsub.v1.MessageStoragePolicy 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.pubsub.v1.MessageStoragePolicy) { @@ -566,6 +546,7 @@ private void ensureAllowedPersistenceRegionsIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -588,6 +569,7 @@ public com.google.protobuf.ProtocolStringList getAllowedPersistenceRegionsList() allowedPersistenceRegions_.makeImmutable(); return allowedPersistenceRegions_; } + /** * * @@ -609,6 +591,7 @@ public com.google.protobuf.ProtocolStringList getAllowedPersistenceRegionsList() public int getAllowedPersistenceRegionsCount() { return allowedPersistenceRegions_.size(); } + /** * * @@ -631,6 +614,7 @@ public int getAllowedPersistenceRegionsCount() { public java.lang.String getAllowedPersistenceRegions(int index) { return allowedPersistenceRegions_.get(index); } + /** * * @@ -653,6 +637,7 @@ public java.lang.String getAllowedPersistenceRegions(int index) { public com.google.protobuf.ByteString getAllowedPersistenceRegionsBytes(int index) { return allowedPersistenceRegions_.getByteString(index); } + /** * * @@ -683,6 +668,7 @@ public Builder setAllowedPersistenceRegions(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -712,6 +698,7 @@ public Builder addAllowedPersistenceRegions(java.lang.String value) { onChanged(); return this; } + /** * * @@ -738,6 +725,7 @@ public Builder addAllAllowedPersistenceRegions(java.lang.Iterable getAllowedPersistenceRegionsList(); + /** * * @@ -62,6 +65,7 @@ public interface MessageStoragePolicyOrBuilder * @return The count of allowedPersistenceRegions. */ int getAllowedPersistenceRegionsCount(); + /** * * @@ -82,6 +86,7 @@ public interface MessageStoragePolicyOrBuilder * @return The allowedPersistenceRegions at the given index. */ java.lang.String getAllowedPersistenceRegions(int index); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransform.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransform.java new file mode 100644 index 000000000..64bffd993 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransform.java @@ -0,0 +1,1389 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.pubsub.v1; + +/** + * + * + *
    + * All supported message transforms types.
    + * 
    + * + * Protobuf type {@code google.pubsub.v1.MessageTransform} + */ +@com.google.protobuf.Generated +public final class MessageTransform extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.MessageTransform) + MessageTransformOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MessageTransform"); + } + + // Use MessageTransform.newBuilder() to construct. + private MessageTransform(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MessageTransform() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_MessageTransform_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_MessageTransform_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.MessageTransform.class, + com.google.pubsub.v1.MessageTransform.Builder.class); + } + + private int transformCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object transform_; + + public enum TransformCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + JAVASCRIPT_UDF(2), + AI_INFERENCE(6), + TRANSFORM_NOT_SET(0); + private final int value; + + private TransformCase(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 TransformCase valueOf(int value) { + return forNumber(value); + } + + public static TransformCase forNumber(int value) { + switch (value) { + case 2: + return JAVASCRIPT_UDF; + case 6: + return AI_INFERENCE; + case 0: + return TRANSFORM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TransformCase getTransformCase() { + return TransformCase.forNumber(transformCase_); + } + + public static final int JAVASCRIPT_UDF_FIELD_NUMBER = 2; + + /** + * + * + *
    +   * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +   * are specified on a resource, each must have a unique `function_name`.
    +   * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the javascriptUdf field is set. + */ + @java.lang.Override + public boolean hasJavascriptUdf() { + return transformCase_ == 2; + } + + /** + * + * + *
    +   * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +   * are specified on a resource, each must have a unique `function_name`.
    +   * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The javascriptUdf. + */ + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDF getJavascriptUdf() { + if (transformCase_ == 2) { + return (com.google.pubsub.v1.JavaScriptUDF) transform_; + } + return com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +   * are specified on a resource, each must have a unique `function_name`.
    +   * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDFOrBuilder getJavascriptUdfOrBuilder() { + if (transformCase_ == 2) { + return (com.google.pubsub.v1.JavaScriptUDF) transform_; + } + return com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance(); + } + + public static final int AI_INFERENCE_FIELD_NUMBER = 6; + + /** + * + * + *
    +   * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +   * requests built from the Pub/Sub message data and provided parameters will
    +   * be sent to.
    +   * 
    + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the aiInference field is set. + */ + @java.lang.Override + public boolean hasAiInference() { + return transformCase_ == 6; + } + + /** + * + * + *
    +   * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +   * requests built from the Pub/Sub message data and provided parameters will
    +   * be sent to.
    +   * 
    + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The aiInference. + */ + @java.lang.Override + public com.google.pubsub.v1.AIInference getAiInference() { + if (transformCase_ == 6) { + return (com.google.pubsub.v1.AIInference) transform_; + } + return com.google.pubsub.v1.AIInference.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +   * requests built from the Pub/Sub message data and provided parameters will
    +   * be sent to.
    +   * 
    + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.AIInferenceOrBuilder getAiInferenceOrBuilder() { + if (transformCase_ == 6) { + return (com.google.pubsub.v1.AIInference) transform_; + } + return com.google.pubsub.v1.AIInference.getDefaultInstance(); + } + + public static final int ENABLED_FIELD_NUMBER = 3; + private boolean enabled_ = false; + + /** + * + * + *
    +   * Optional. This field is deprecated, use the `disabled` field to disable
    +   * transforms.
    +   * 
    + * + * bool enabled = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * @deprecated google.pubsub.v1.MessageTransform.enabled is deprecated. See + * google/pubsub/v1/pubsub.proto;l=857 + * @return The enabled. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean getEnabled() { + return enabled_; + } + + public static final int DISABLED_FIELD_NUMBER = 4; + private boolean disabled_ = false; + + /** + * + * + *
    +   * Optional. If true, the transform is disabled and will not be applied to
    +   * messages. Defaults to `false`.
    +   * 
    + * + * bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disabled. + */ + @java.lang.Override + public boolean getDisabled() { + return disabled_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (transformCase_ == 2) { + output.writeMessage(2, (com.google.pubsub.v1.JavaScriptUDF) transform_); + } + if (enabled_ != false) { + output.writeBool(3, enabled_); + } + if (disabled_ != false) { + output.writeBool(4, disabled_); + } + if (transformCase_ == 6) { + output.writeMessage(6, (com.google.pubsub.v1.AIInference) transform_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transformCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.pubsub.v1.JavaScriptUDF) transform_); + } + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, enabled_); + } + if (disabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, disabled_); + } + if (transformCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.pubsub.v1.AIInference) transform_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.MessageTransform)) { + return super.equals(obj); + } + com.google.pubsub.v1.MessageTransform other = (com.google.pubsub.v1.MessageTransform) obj; + + if (getEnabled() != other.getEnabled()) return false; + if (getDisabled() != other.getDisabled()) return false; + if (!getTransformCase().equals(other.getTransformCase())) return false; + switch (transformCase_) { + case 2: + if (!getJavascriptUdf().equals(other.getJavascriptUdf())) return false; + break; + case 6: + if (!getAiInference().equals(other.getAiInference())) 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) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); + hash = (37 * hash) + DISABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisabled()); + switch (transformCase_) { + case 2: + hash = (37 * hash) + JAVASCRIPT_UDF_FIELD_NUMBER; + hash = (53 * hash) + getJavascriptUdf().hashCode(); + break; + case 6: + hash = (37 * hash) + AI_INFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getAiInference().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.MessageTransform parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.MessageTransform parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.MessageTransform parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.pubsub.v1.MessageTransform prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * All supported message transforms types.
    +   * 
    + * + * Protobuf type {@code google.pubsub.v1.MessageTransform} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.MessageTransform) + com.google.pubsub.v1.MessageTransformOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_MessageTransform_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_MessageTransform_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.MessageTransform.class, + com.google.pubsub.v1.MessageTransform.Builder.class); + } + + // Construct using com.google.pubsub.v1.MessageTransform.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (javascriptUdfBuilder_ != null) { + javascriptUdfBuilder_.clear(); + } + if (aiInferenceBuilder_ != null) { + aiInferenceBuilder_.clear(); + } + enabled_ = false; + disabled_ = false; + transformCase_ = 0; + transform_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_MessageTransform_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.MessageTransform getDefaultInstanceForType() { + return com.google.pubsub.v1.MessageTransform.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.MessageTransform build() { + com.google.pubsub.v1.MessageTransform result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.MessageTransform buildPartial() { + com.google.pubsub.v1.MessageTransform result = + new com.google.pubsub.v1.MessageTransform(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.pubsub.v1.MessageTransform result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.enabled_ = enabled_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.disabled_ = disabled_; + } + } + + private void buildPartialOneofs(com.google.pubsub.v1.MessageTransform result) { + result.transformCase_ = transformCase_; + result.transform_ = this.transform_; + if (transformCase_ == 2 && javascriptUdfBuilder_ != null) { + result.transform_ = javascriptUdfBuilder_.build(); + } + if (transformCase_ == 6 && aiInferenceBuilder_ != null) { + result.transform_ = aiInferenceBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.MessageTransform) { + return mergeFrom((com.google.pubsub.v1.MessageTransform) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.MessageTransform other) { + if (other == com.google.pubsub.v1.MessageTransform.getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + if (other.getDisabled() != false) { + setDisabled(other.getDisabled()); + } + switch (other.getTransformCase()) { + case JAVASCRIPT_UDF: + { + mergeJavascriptUdf(other.getJavascriptUdf()); + break; + } + case AI_INFERENCE: + { + mergeAiInference(other.getAiInference()); + break; + } + case TRANSFORM_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage( + internalGetJavascriptUdfFieldBuilder().getBuilder(), extensionRegistry); + transformCase_ = 2; + break; + } // case 18 + case 24: + { + enabled_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + disabled_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 50: + { + input.readMessage( + internalGetAiInferenceFieldBuilder().getBuilder(), extensionRegistry); + transformCase_ = 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 transformCase_ = 0; + private java.lang.Object transform_; + + public TransformCase getTransformCase() { + return TransformCase.forNumber(transformCase_); + } + + public Builder clearTransform() { + transformCase_ = 0; + transform_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.JavaScriptUDF, + com.google.pubsub.v1.JavaScriptUDF.Builder, + com.google.pubsub.v1.JavaScriptUDFOrBuilder> + javascriptUdfBuilder_; + + /** + * + * + *
    +     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +     * are specified on a resource, each must have a unique `function_name`.
    +     * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the javascriptUdf field is set. + */ + @java.lang.Override + public boolean hasJavascriptUdf() { + return transformCase_ == 2; + } + + /** + * + * + *
    +     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +     * are specified on a resource, each must have a unique `function_name`.
    +     * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The javascriptUdf. + */ + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDF getJavascriptUdf() { + if (javascriptUdfBuilder_ == null) { + if (transformCase_ == 2) { + return (com.google.pubsub.v1.JavaScriptUDF) transform_; + } + return com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance(); + } else { + if (transformCase_ == 2) { + return javascriptUdfBuilder_.getMessage(); + } + return com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +     * are specified on a resource, each must have a unique `function_name`.
    +     * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setJavascriptUdf(com.google.pubsub.v1.JavaScriptUDF value) { + if (javascriptUdfBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transform_ = value; + onChanged(); + } else { + javascriptUdfBuilder_.setMessage(value); + } + transformCase_ = 2; + return this; + } + + /** + * + * + *
    +     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +     * are specified on a resource, each must have a unique `function_name`.
    +     * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setJavascriptUdf(com.google.pubsub.v1.JavaScriptUDF.Builder builderForValue) { + if (javascriptUdfBuilder_ == null) { + transform_ = builderForValue.build(); + onChanged(); + } else { + javascriptUdfBuilder_.setMessage(builderForValue.build()); + } + transformCase_ = 2; + return this; + } + + /** + * + * + *
    +     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +     * are specified on a resource, each must have a unique `function_name`.
    +     * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeJavascriptUdf(com.google.pubsub.v1.JavaScriptUDF value) { + if (javascriptUdfBuilder_ == null) { + if (transformCase_ == 2 + && transform_ != com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance()) { + transform_ = + com.google.pubsub.v1.JavaScriptUDF.newBuilder( + (com.google.pubsub.v1.JavaScriptUDF) transform_) + .mergeFrom(value) + .buildPartial(); + } else { + transform_ = value; + } + onChanged(); + } else { + if (transformCase_ == 2) { + javascriptUdfBuilder_.mergeFrom(value); + } else { + javascriptUdfBuilder_.setMessage(value); + } + } + transformCase_ = 2; + return this; + } + + /** + * + * + *
    +     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +     * are specified on a resource, each must have a unique `function_name`.
    +     * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearJavascriptUdf() { + if (javascriptUdfBuilder_ == null) { + if (transformCase_ == 2) { + transformCase_ = 0; + transform_ = null; + onChanged(); + } + } else { + if (transformCase_ == 2) { + transformCase_ = 0; + transform_ = null; + } + javascriptUdfBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +     * are specified on a resource, each must have a unique `function_name`.
    +     * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.JavaScriptUDF.Builder getJavascriptUdfBuilder() { + return internalGetJavascriptUdfFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +     * are specified on a resource, each must have a unique `function_name`.
    +     * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDFOrBuilder getJavascriptUdfOrBuilder() { + if ((transformCase_ == 2) && (javascriptUdfBuilder_ != null)) { + return javascriptUdfBuilder_.getMessageOrBuilder(); + } else { + if (transformCase_ == 2) { + return (com.google.pubsub.v1.JavaScriptUDF) transform_; + } + return com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +     * are specified on a resource, each must have a unique `function_name`.
    +     * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.JavaScriptUDF, + com.google.pubsub.v1.JavaScriptUDF.Builder, + com.google.pubsub.v1.JavaScriptUDFOrBuilder> + internalGetJavascriptUdfFieldBuilder() { + if (javascriptUdfBuilder_ == null) { + if (!(transformCase_ == 2)) { + transform_ = com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance(); + } + javascriptUdfBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.JavaScriptUDF, + com.google.pubsub.v1.JavaScriptUDF.Builder, + com.google.pubsub.v1.JavaScriptUDFOrBuilder>( + (com.google.pubsub.v1.JavaScriptUDF) transform_, getParentForChildren(), isClean()); + transform_ = null; + } + transformCase_ = 2; + onChanged(); + return javascriptUdfBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.AIInference, + com.google.pubsub.v1.AIInference.Builder, + com.google.pubsub.v1.AIInferenceOrBuilder> + aiInferenceBuilder_; + + /** + * + * + *
    +     * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +     * requests built from the Pub/Sub message data and provided parameters will
    +     * be sent to.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the aiInference field is set. + */ + @java.lang.Override + public boolean hasAiInference() { + return transformCase_ == 6; + } + + /** + * + * + *
    +     * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +     * requests built from the Pub/Sub message data and provided parameters will
    +     * be sent to.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The aiInference. + */ + @java.lang.Override + public com.google.pubsub.v1.AIInference getAiInference() { + if (aiInferenceBuilder_ == null) { + if (transformCase_ == 6) { + return (com.google.pubsub.v1.AIInference) transform_; + } + return com.google.pubsub.v1.AIInference.getDefaultInstance(); + } else { + if (transformCase_ == 6) { + return aiInferenceBuilder_.getMessage(); + } + return com.google.pubsub.v1.AIInference.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +     * requests built from the Pub/Sub message data and provided parameters will
    +     * be sent to.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAiInference(com.google.pubsub.v1.AIInference value) { + if (aiInferenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transform_ = value; + onChanged(); + } else { + aiInferenceBuilder_.setMessage(value); + } + transformCase_ = 6; + return this; + } + + /** + * + * + *
    +     * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +     * requests built from the Pub/Sub message data and provided parameters will
    +     * be sent to.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAiInference(com.google.pubsub.v1.AIInference.Builder builderForValue) { + if (aiInferenceBuilder_ == null) { + transform_ = builderForValue.build(); + onChanged(); + } else { + aiInferenceBuilder_.setMessage(builderForValue.build()); + } + transformCase_ = 6; + return this; + } + + /** + * + * + *
    +     * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +     * requests built from the Pub/Sub message data and provided parameters will
    +     * be sent to.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAiInference(com.google.pubsub.v1.AIInference value) { + if (aiInferenceBuilder_ == null) { + if (transformCase_ == 6 + && transform_ != com.google.pubsub.v1.AIInference.getDefaultInstance()) { + transform_ = + com.google.pubsub.v1.AIInference.newBuilder( + (com.google.pubsub.v1.AIInference) transform_) + .mergeFrom(value) + .buildPartial(); + } else { + transform_ = value; + } + onChanged(); + } else { + if (transformCase_ == 6) { + aiInferenceBuilder_.mergeFrom(value); + } else { + aiInferenceBuilder_.setMessage(value); + } + } + transformCase_ = 6; + return this; + } + + /** + * + * + *
    +     * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +     * requests built from the Pub/Sub message data and provided parameters will
    +     * be sent to.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAiInference() { + if (aiInferenceBuilder_ == null) { + if (transformCase_ == 6) { + transformCase_ = 0; + transform_ = null; + onChanged(); + } + } else { + if (transformCase_ == 6) { + transformCase_ = 0; + transform_ = null; + } + aiInferenceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +     * requests built from the Pub/Sub message data and provided parameters will
    +     * be sent to.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.AIInference.Builder getAiInferenceBuilder() { + return internalGetAiInferenceFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +     * requests built from the Pub/Sub message data and provided parameters will
    +     * be sent to.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.AIInferenceOrBuilder getAiInferenceOrBuilder() { + if ((transformCase_ == 6) && (aiInferenceBuilder_ != null)) { + return aiInferenceBuilder_.getMessageOrBuilder(); + } else { + if (transformCase_ == 6) { + return (com.google.pubsub.v1.AIInference) transform_; + } + return com.google.pubsub.v1.AIInference.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +     * requests built from the Pub/Sub message data and provided parameters will
    +     * be sent to.
    +     * 
    + * + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.AIInference, + com.google.pubsub.v1.AIInference.Builder, + com.google.pubsub.v1.AIInferenceOrBuilder> + internalGetAiInferenceFieldBuilder() { + if (aiInferenceBuilder_ == null) { + if (!(transformCase_ == 6)) { + transform_ = com.google.pubsub.v1.AIInference.getDefaultInstance(); + } + aiInferenceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.AIInference, + com.google.pubsub.v1.AIInference.Builder, + com.google.pubsub.v1.AIInferenceOrBuilder>( + (com.google.pubsub.v1.AIInference) transform_, getParentForChildren(), isClean()); + transform_ = null; + } + transformCase_ = 6; + onChanged(); + return aiInferenceBuilder_; + } + + private boolean enabled_; + + /** + * + * + *
    +     * Optional. This field is deprecated, use the `disabled` field to disable
    +     * transforms.
    +     * 
    + * + * bool enabled = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * @deprecated google.pubsub.v1.MessageTransform.enabled is deprecated. See + * google/pubsub/v1/pubsub.proto;l=857 + * @return The enabled. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean getEnabled() { + return enabled_; + } + + /** + * + * + *
    +     * Optional. This field is deprecated, use the `disabled` field to disable
    +     * transforms.
    +     * 
    + * + * bool enabled = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * @deprecated google.pubsub.v1.MessageTransform.enabled is deprecated. See + * google/pubsub/v1/pubsub.proto;l=857 + * @param value The enabled to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. This field is deprecated, use the `disabled` field to disable
    +     * transforms.
    +     * 
    + * + * bool enabled = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * @deprecated google.pubsub.v1.MessageTransform.enabled is deprecated. See + * google/pubsub/v1/pubsub.proto;l=857 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000004); + enabled_ = false; + onChanged(); + return this; + } + + private boolean disabled_; + + /** + * + * + *
    +     * Optional. If true, the transform is disabled and will not be applied to
    +     * messages. Defaults to `false`.
    +     * 
    + * + * bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disabled. + */ + @java.lang.Override + public boolean getDisabled() { + return disabled_; + } + + /** + * + * + *
    +     * Optional. If true, the transform is disabled and will not be applied to
    +     * messages. Defaults to `false`.
    +     * 
    + * + * bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The disabled to set. + * @return This builder for chaining. + */ + public Builder setDisabled(boolean value) { + + disabled_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. If true, the transform is disabled and will not be applied to
    +     * messages. Defaults to `false`.
    +     * 
    + * + * bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisabled() { + bitField0_ = (bitField0_ & ~0x00000008); + disabled_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.MessageTransform) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.MessageTransform) + private static final com.google.pubsub.v1.MessageTransform DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.MessageTransform(); + } + + public static com.google.pubsub.v1.MessageTransform getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MessageTransform parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.MessageTransform getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransformOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransformOrBuilder.java new file mode 100644 index 000000000..9c31737d0 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransformOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.pubsub.v1; + +@com.google.protobuf.Generated +public interface MessageTransformOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.MessageTransform) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +   * are specified on a resource, each must have a unique `function_name`.
    +   * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the javascriptUdf field is set. + */ + boolean hasJavascriptUdf(); + + /** + * + * + *
    +   * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +   * are specified on a resource, each must have a unique `function_name`.
    +   * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The javascriptUdf. + */ + com.google.pubsub.v1.JavaScriptUDF getJavascriptUdf(); + + /** + * + * + *
    +   * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
    +   * are specified on a resource, each must have a unique `function_name`.
    +   * 
    + * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.JavaScriptUDFOrBuilder getJavascriptUdfOrBuilder(); + + /** + * + * + *
    +   * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +   * requests built from the Pub/Sub message data and provided parameters will
    +   * be sent to.
    +   * 
    + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the aiInference field is set. + */ + boolean hasAiInference(); + + /** + * + * + *
    +   * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +   * requests built from the Pub/Sub message data and provided parameters will
    +   * be sent to.
    +   * 
    + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The aiInference. + */ + com.google.pubsub.v1.AIInference getAiInference(); + + /** + * + * + *
    +   * Optional. AI Inference. Specifies the Vertex AI endpoint that inference
    +   * requests built from the Pub/Sub message data and provided parameters will
    +   * be sent to.
    +   * 
    + * + * .google.pubsub.v1.AIInference ai_inference = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.AIInferenceOrBuilder getAiInferenceOrBuilder(); + + /** + * + * + *
    +   * Optional. This field is deprecated, use the `disabled` field to disable
    +   * transforms.
    +   * 
    + * + * bool enabled = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * @deprecated google.pubsub.v1.MessageTransform.enabled is deprecated. See + * google/pubsub/v1/pubsub.proto;l=857 + * @return The enabled. + */ + @java.lang.Deprecated + boolean getEnabled(); + + /** + * + * + *
    +   * Optional. If true, the transform is disabled and will not be applied to
    +   * messages. Defaults to `false`.
    +   * 
    + * + * bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disabled. + */ + boolean getDisabled(); + + com.google.pubsub.v1.MessageTransform.TransformCase getTransformCase(); +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequest.java index b9417cac9..383bd5c0e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ModifyAckDeadlineRequest} */ -public final class ModifyAckDeadlineRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ModifyAckDeadlineRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ModifyAckDeadlineRequest) ModifyAckDeadlineRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModifyAckDeadlineRequest"); + } + // Use ModifyAckDeadlineRequest.newBuilder() to construct. - private ModifyAckDeadlineRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ModifyAckDeadlineRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ModifyAckDeadlineRequest() { ackIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ModifyAckDeadlineRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object subscription_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getSubscription() { return s; } } + /** * * @@ -126,6 +135,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList ackIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -140,6 +150,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { public com.google.protobuf.ProtocolStringList getAckIdsList() { return ackIds_; } + /** * * @@ -154,6 +165,7 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { public int getAckIdsCount() { return ackIds_.size(); } + /** * * @@ -169,6 +181,7 @@ public int getAckIdsCount() { public java.lang.String getAckIds(int index) { return ackIds_.get(index); } + /** * * @@ -187,6 +200,7 @@ public com.google.protobuf.ByteString getAckIdsBytes(int index) { public static final int ACK_DEADLINE_SECONDS_FIELD_NUMBER = 3; private int ackDeadlineSeconds_ = 0; + /** * * @@ -225,14 +239,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); } if (ackDeadlineSeconds_ != 0) { output.writeInt32(3, ackDeadlineSeconds_); } for (int i = 0; i < ackIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ackIds_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 4, ackIds_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -243,8 +257,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); } if (ackDeadlineSeconds_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, ackDeadlineSeconds_); @@ -337,38 +351,38 @@ public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseFrom( public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -391,10 +405,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -404,7 +419,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ModifyAckDeadlineRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ModifyAckDeadlineRequest) com.google.pubsub.v1.ModifyAckDeadlineRequestOrBuilder { @@ -414,7 +429,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_fieldAccessorTable @@ -426,7 +441,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ModifyAckDeadlineRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -485,39 +500,6 @@ private void buildPartial0(com.google.pubsub.v1.ModifyAckDeadlineRequest 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.pubsub.v1.ModifyAckDeadlineRequest) { @@ -613,6 +595,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object subscription_ = ""; + /** * * @@ -638,6 +621,7 @@ public java.lang.String getSubscription() { return (java.lang.String) ref; } } + /** * * @@ -663,6 +647,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -687,6 +672,7 @@ public Builder setSubscription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -707,6 +693,7 @@ public Builder clearSubscription() { onChanged(); return this; } + /** * * @@ -742,6 +729,7 @@ private void ensureAckIdsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -757,6 +745,7 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { ackIds_.makeImmutable(); return ackIds_; } + /** * * @@ -771,6 +760,7 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { public int getAckIdsCount() { return ackIds_.size(); } + /** * * @@ -786,6 +776,7 @@ public int getAckIdsCount() { public java.lang.String getAckIds(int index) { return ackIds_.get(index); } + /** * * @@ -801,6 +792,7 @@ public java.lang.String getAckIds(int index) { public com.google.protobuf.ByteString getAckIdsBytes(int index) { return ackIds_.getByteString(index); } + /** * * @@ -824,6 +816,7 @@ public Builder setAckIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -846,6 +839,7 @@ public Builder addAckIds(java.lang.String value) { onChanged(); return this; } + /** * * @@ -865,6 +859,7 @@ public Builder addAllAckIds(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -883,6 +878,7 @@ public Builder clearAckIds() { onChanged(); return this; } + /** * * @@ -908,6 +904,7 @@ public Builder addAckIdsBytes(com.google.protobuf.ByteString value) { } private int ackDeadlineSeconds_; + /** * * @@ -931,6 +928,7 @@ public Builder addAckIdsBytes(com.google.protobuf.ByteString value) { public int getAckDeadlineSeconds() { return ackDeadlineSeconds_; } + /** * * @@ -958,6 +956,7 @@ public Builder setAckDeadlineSeconds(int value) { onChanged(); return this; } + /** * * @@ -984,17 +983,6 @@ public Builder clearAckDeadlineSeconds() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ModifyAckDeadlineRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequestOrBuilder.java index c148ebc72..56439946d 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ModifyAckDeadlineRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ModifyAckDeadlineRequest) @@ -39,6 +41,7 @@ public interface ModifyAckDeadlineRequestOrBuilder * @return The subscription. */ java.lang.String getSubscription(); + /** * * @@ -67,6 +70,7 @@ public interface ModifyAckDeadlineRequestOrBuilder * @return A list containing the ackIds. */ java.util.List getAckIdsList(); + /** * * @@ -79,6 +83,7 @@ public interface ModifyAckDeadlineRequestOrBuilder * @return The count of ackIds. */ int getAckIdsCount(); + /** * * @@ -92,6 +97,7 @@ public interface ModifyAckDeadlineRequestOrBuilder * @return The ackIds at the given index. */ java.lang.String getAckIds(int index); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java index 54cab839b..0a0181ec3 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ModifyPushConfigRequest} */ -public final class ModifyPushConfigRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ModifyPushConfigRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ModifyPushConfigRequest) ModifyPushConfigRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModifyPushConfigRequest"); + } + // Use ModifyPushConfigRequest.newBuilder() to construct. - private ModifyPushConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ModifyPushConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private ModifyPushConfigRequest() { subscription_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ModifyPushConfigRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ModifyPushConfigRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object subscription_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getSubscription() { return s; } } + /** * * @@ -123,6 +132,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { public static final int PUSH_CONFIG_FIELD_NUMBER = 2; private com.google.pubsub.v1.PushConfig pushConfig_; + /** * * @@ -144,6 +154,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { public boolean hasPushConfig() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -165,6 +176,7 @@ public boolean hasPushConfig() { public com.google.pubsub.v1.PushConfig getPushConfig() { return pushConfig_ == null ? com.google.pubsub.v1.PushConfig.getDefaultInstance() : pushConfig_; } + /** * * @@ -199,8 +211,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getPushConfig()); @@ -214,8 +226,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPushConfig()); @@ -300,38 +312,38 @@ public static com.google.pubsub.v1.ModifyPushConfigRequest parseFrom( public static com.google.pubsub.v1.ModifyPushConfigRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ModifyPushConfigRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ModifyPushConfigRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ModifyPushConfigRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ModifyPushConfigRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ModifyPushConfigRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -354,10 +366,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -367,7 +380,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ModifyPushConfigRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ModifyPushConfigRequest) com.google.pubsub.v1.ModifyPushConfigRequestOrBuilder { @@ -377,7 +390,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ModifyPushConfigRequest_fieldAccessorTable @@ -391,14 +404,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPushConfigFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPushConfigFieldBuilder(); } } @@ -459,39 +472,6 @@ private void buildPartial0(com.google.pubsub.v1.ModifyPushConfigRequest result) result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.ModifyPushConfigRequest) { @@ -546,7 +526,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getPushConfigFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPushConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -570,6 +551,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object subscription_ = ""; + /** * * @@ -595,6 +577,7 @@ public java.lang.String getSubscription() { return (java.lang.String) ref; } } + /** * * @@ -620,6 +603,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -644,6 +628,7 @@ public Builder setSubscription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -664,6 +649,7 @@ public Builder clearSubscription() { onChanged(); return this; } + /** * * @@ -691,11 +677,12 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { } private com.google.pubsub.v1.PushConfig pushConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PushConfig, com.google.pubsub.v1.PushConfig.Builder, com.google.pubsub.v1.PushConfigOrBuilder> pushConfigBuilder_; + /** * * @@ -716,6 +703,7 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { public boolean hasPushConfig() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -742,6 +730,7 @@ public com.google.pubsub.v1.PushConfig getPushConfig() { return pushConfigBuilder_.getMessage(); } } + /** * * @@ -770,6 +759,7 @@ public Builder setPushConfig(com.google.pubsub.v1.PushConfig value) { onChanged(); return this; } + /** * * @@ -795,6 +785,7 @@ public Builder setPushConfig(com.google.pubsub.v1.PushConfig.Builder builderForV onChanged(); return this; } + /** * * @@ -828,6 +819,7 @@ public Builder mergePushConfig(com.google.pubsub.v1.PushConfig value) { } return this; } + /** * * @@ -853,6 +845,7 @@ public Builder clearPushConfig() { onChanged(); return this; } + /** * * @@ -871,8 +864,9 @@ public Builder clearPushConfig() { public com.google.pubsub.v1.PushConfig.Builder getPushConfigBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getPushConfigFieldBuilder().getBuilder(); + return internalGetPushConfigFieldBuilder().getBuilder(); } + /** * * @@ -897,6 +891,7 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { : pushConfig_; } } + /** * * @@ -912,14 +907,14 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { * .google.pubsub.v1.PushConfig push_config = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PushConfig, com.google.pubsub.v1.PushConfig.Builder, com.google.pubsub.v1.PushConfigOrBuilder> - getPushConfigFieldBuilder() { + internalGetPushConfigFieldBuilder() { if (pushConfigBuilder_ == null) { pushConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PushConfig, com.google.pubsub.v1.PushConfig.Builder, com.google.pubsub.v1.PushConfigOrBuilder>( @@ -929,17 +924,6 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { return pushConfigBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ModifyPushConfigRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequestOrBuilder.java index 29779beff..25f579d74 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ModifyPushConfigRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ModifyPushConfigRequest) @@ -39,6 +41,7 @@ public interface ModifyPushConfigRequestOrBuilder * @return The subscription. */ java.lang.String getSubscription(); + /** * * @@ -73,6 +76,7 @@ public interface ModifyPushConfigRequestOrBuilder * @return Whether the pushConfig field is set. */ boolean hasPushConfig(); + /** * * @@ -91,6 +95,7 @@ public interface ModifyPushConfigRequestOrBuilder * @return The pushConfig. */ com.google.pubsub.v1.PushConfig getPushConfig(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PlatformLogsSettings.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PlatformLogsSettings.java index a63c3a4df..1135d99de 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PlatformLogsSettings.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PlatformLogsSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.PlatformLogsSettings} */ -public final class PlatformLogsSettings extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PlatformLogsSettings extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.PlatformLogsSettings) PlatformLogsSettingsOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PlatformLogsSettings"); + } + // Use PlatformLogsSettings.newBuilder() to construct. - private PlatformLogsSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PlatformLogsSettings(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private PlatformLogsSettings() { severity_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PlatformLogsSettings(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PlatformLogsSettings_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PlatformLogsSettings_fieldAccessorTable @@ -136,6 +143,16 @@ public enum Severity implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Severity"); + } + /** * * @@ -146,6 +163,7 @@ public enum Severity implements com.google.protobuf.ProtocolMessageEnum { * SEVERITY_UNSPECIFIED = 0; */ public static final int SEVERITY_UNSPECIFIED_VALUE = 0; + /** * * @@ -156,6 +174,7 @@ public enum Severity implements com.google.protobuf.ProtocolMessageEnum { * DISABLED = 1; */ public static final int DISABLED_VALUE = 1; + /** * * @@ -166,6 +185,7 @@ public enum Severity implements com.google.protobuf.ProtocolMessageEnum { * DEBUG = 2; */ public static final int DEBUG_VALUE = 2; + /** * * @@ -176,6 +196,7 @@ public enum Severity implements com.google.protobuf.ProtocolMessageEnum { * INFO = 3; */ public static final int INFO_VALUE = 3; + /** * * @@ -186,6 +207,7 @@ public enum Severity implements com.google.protobuf.ProtocolMessageEnum { * WARNING = 4; */ public static final int WARNING_VALUE = 4; + /** * * @@ -261,7 +283,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.pubsub.v1.PlatformLogsSettings.getDescriptor().getEnumTypes().get(0); } @@ -288,6 +310,7 @@ private Severity(int value) { public static final int SEVERITY_FIELD_NUMBER = 1; private int severity_ = 0; + /** * * @@ -305,6 +328,7 @@ private Severity(int value) { public int getSeverityValue() { return severity_; } + /** * * @@ -430,38 +454,38 @@ public static com.google.pubsub.v1.PlatformLogsSettings parseFrom( public static com.google.pubsub.v1.PlatformLogsSettings parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PlatformLogsSettings parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PlatformLogsSettings parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.PlatformLogsSettings parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PlatformLogsSettings parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PlatformLogsSettings parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -484,10 +508,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -497,7 +522,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.PlatformLogsSettings} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PlatformLogsSettings) com.google.pubsub.v1.PlatformLogsSettingsOrBuilder { @@ -507,7 +532,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PlatformLogsSettings_fieldAccessorTable @@ -519,7 +544,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.PlatformLogsSettings.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -569,39 +594,6 @@ private void buildPartial0(com.google.pubsub.v1.PlatformLogsSettings 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.pubsub.v1.PlatformLogsSettings) { @@ -669,6 +661,7 @@ public Builder mergeFrom( private int bitField0_; private int severity_ = 0; + /** * * @@ -686,6 +679,7 @@ public Builder mergeFrom( public int getSeverityValue() { return severity_; } + /** * * @@ -706,6 +700,7 @@ public Builder setSeverityValue(int value) { onChanged(); return this; } + /** * * @@ -727,6 +722,7 @@ public com.google.pubsub.v1.PlatformLogsSettings.Severity getSeverity() { ? com.google.pubsub.v1.PlatformLogsSettings.Severity.UNRECOGNIZED : result; } + /** * * @@ -750,6 +746,7 @@ public Builder setSeverity(com.google.pubsub.v1.PlatformLogsSettings.Severity va onChanged(); return this; } + /** * * @@ -770,17 +767,6 @@ public Builder clearSeverity() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PlatformLogsSettings) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PlatformLogsSettingsOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PlatformLogsSettingsOrBuilder.java index fbaf39e00..e01f7b068 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PlatformLogsSettingsOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PlatformLogsSettingsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface PlatformLogsSettingsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PlatformLogsSettings) @@ -38,6 +40,7 @@ public interface PlatformLogsSettingsOrBuilder * @return The enum numeric value on the wire for severity. */ int getSeverityValue(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectName.java index 64195e3fc..a4f599b17 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequest.java index 3d14d1cb7..a98f3bd07 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.PublishRequest} */ -public final class PublishRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PublishRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.PublishRequest) PublishRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PublishRequest"); + } + // Use PublishRequest.newBuilder() to construct. - private PublishRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PublishRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private PublishRequest() { messages_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PublishRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PublishRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PublishRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object topic_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getTopic() { return s; } } + /** * * @@ -125,6 +134,7 @@ public com.google.protobuf.ByteString getTopicBytes() { @SuppressWarnings("serial") private java.util.List messages_; + /** * * @@ -140,6 +150,7 @@ public com.google.protobuf.ByteString getTopicBytes() { public java.util.List getMessagesList() { return messages_; } + /** * * @@ -156,6 +167,7 @@ public java.util.List getMessagesList() { getMessagesOrBuilderList() { return messages_; } + /** * * @@ -171,6 +183,7 @@ public java.util.List getMessagesList() { public int getMessagesCount() { return messages_.size(); } + /** * * @@ -186,6 +199,7 @@ public int getMessagesCount() { public com.google.pubsub.v1.PubsubMessage getMessages(int index) { return messages_.get(index); } + /** * * @@ -216,8 +230,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, topic_); } for (int i = 0; i < messages_.size(); i++) { output.writeMessage(2, messages_.get(i)); @@ -231,8 +245,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, topic_); } for (int i = 0; i < messages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, messages_.get(i)); @@ -312,38 +326,38 @@ public static com.google.pubsub.v1.PublishRequest parseFrom( public static com.google.pubsub.v1.PublishRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PublishRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PublishRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.PublishRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PublishRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PublishRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -366,10 +380,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -379,7 +394,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.PublishRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PublishRequest) com.google.pubsub.v1.PublishRequestOrBuilder { @@ -389,7 +404,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PublishRequest_fieldAccessorTable @@ -401,7 +416,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.PublishRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -470,39 +485,6 @@ private void buildPartial0(com.google.pubsub.v1.PublishRequest 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.pubsub.v1.PublishRequest) { @@ -539,8 +521,8 @@ public Builder mergeFrom(com.google.pubsub.v1.PublishRequest other) { messages_ = other.messages_; bitField0_ = (bitField0_ & ~0x00000002); messagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMessagesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMessagesFieldBuilder() : null; } else { messagesBuilder_.addAllMessages(other.messages_); @@ -612,6 +594,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object topic_ = ""; + /** * * @@ -637,6 +620,7 @@ public java.lang.String getTopic() { return (java.lang.String) ref; } } + /** * * @@ -662,6 +646,7 @@ public com.google.protobuf.ByteString getTopicBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -686,6 +671,7 @@ public Builder setTopic(java.lang.String value) { onChanged(); return this; } + /** * * @@ -706,6 +692,7 @@ public Builder clearTopic() { onChanged(); return this; } + /** * * @@ -742,7 +729,7 @@ private void ensureMessagesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.PubsubMessage, com.google.pubsub.v1.PubsubMessage.Builder, com.google.pubsub.v1.PubsubMessageOrBuilder> @@ -766,6 +753,7 @@ public java.util.List getMessagesList() { return messagesBuilder_.getMessageList(); } } + /** * * @@ -784,6 +772,7 @@ public int getMessagesCount() { return messagesBuilder_.getCount(); } } + /** * * @@ -802,6 +791,7 @@ public com.google.pubsub.v1.PubsubMessage getMessages(int index) { return messagesBuilder_.getMessage(index); } } + /** * * @@ -826,6 +816,7 @@ public Builder setMessages(int index, com.google.pubsub.v1.PubsubMessage value) } return this; } + /** * * @@ -848,6 +839,7 @@ public Builder setMessages( } return this; } + /** * * @@ -872,6 +864,7 @@ public Builder addMessages(com.google.pubsub.v1.PubsubMessage value) { } return this; } + /** * * @@ -896,6 +889,7 @@ public Builder addMessages(int index, com.google.pubsub.v1.PubsubMessage value) } return this; } + /** * * @@ -917,6 +911,7 @@ public Builder addMessages(com.google.pubsub.v1.PubsubMessage.Builder builderFor } return this; } + /** * * @@ -939,6 +934,7 @@ public Builder addMessages( } return this; } + /** * * @@ -961,6 +957,7 @@ public Builder addAllMessages( } return this; } + /** * * @@ -982,6 +979,7 @@ public Builder clearMessages() { } return this; } + /** * * @@ -1003,6 +1001,7 @@ public Builder removeMessages(int index) { } return this; } + /** * * @@ -1015,8 +1014,9 @@ public Builder removeMessages(int index) { * */ public com.google.pubsub.v1.PubsubMessage.Builder getMessagesBuilder(int index) { - return getMessagesFieldBuilder().getBuilder(index); + return internalGetMessagesFieldBuilder().getBuilder(index); } + /** * * @@ -1035,6 +1035,7 @@ public com.google.pubsub.v1.PubsubMessageOrBuilder getMessagesOrBuilder(int inde return messagesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1054,6 +1055,7 @@ public com.google.pubsub.v1.PubsubMessageOrBuilder getMessagesOrBuilder(int inde return java.util.Collections.unmodifiableList(messages_); } } + /** * * @@ -1066,9 +1068,10 @@ public com.google.pubsub.v1.PubsubMessageOrBuilder getMessagesOrBuilder(int inde * */ public com.google.pubsub.v1.PubsubMessage.Builder addMessagesBuilder() { - return getMessagesFieldBuilder() + return internalGetMessagesFieldBuilder() .addBuilder(com.google.pubsub.v1.PubsubMessage.getDefaultInstance()); } + /** * * @@ -1081,9 +1084,10 @@ public com.google.pubsub.v1.PubsubMessage.Builder addMessagesBuilder() { * */ public com.google.pubsub.v1.PubsubMessage.Builder addMessagesBuilder(int index) { - return getMessagesFieldBuilder() + return internalGetMessagesFieldBuilder() .addBuilder(index, com.google.pubsub.v1.PubsubMessage.getDefaultInstance()); } + /** * * @@ -1096,17 +1100,17 @@ public com.google.pubsub.v1.PubsubMessage.Builder addMessagesBuilder(int index) * */ public java.util.List getMessagesBuilderList() { - return getMessagesFieldBuilder().getBuilderList(); + return internalGetMessagesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.PubsubMessage, com.google.pubsub.v1.PubsubMessage.Builder, com.google.pubsub.v1.PubsubMessageOrBuilder> - getMessagesFieldBuilder() { + internalGetMessagesFieldBuilder() { if (messagesBuilder_ == null) { messagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.PubsubMessage, com.google.pubsub.v1.PubsubMessage.Builder, com.google.pubsub.v1.PubsubMessageOrBuilder>( @@ -1116,17 +1120,6 @@ public java.util.List getMessagesBui return messagesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PublishRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequestOrBuilder.java index 612be7a12..18f0e8e57 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface PublishRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PublishRequest) @@ -39,6 +41,7 @@ public interface PublishRequestOrBuilder * @return The topic. */ java.lang.String getTopic(); + /** * * @@ -67,6 +70,7 @@ public interface PublishRequestOrBuilder * */ java.util.List getMessagesList(); + /** * * @@ -79,6 +83,7 @@ public interface PublishRequestOrBuilder * */ com.google.pubsub.v1.PubsubMessage getMessages(int index); + /** * * @@ -91,6 +96,7 @@ public interface PublishRequestOrBuilder * */ int getMessagesCount(); + /** * * @@ -103,6 +109,7 @@ public interface PublishRequestOrBuilder * */ java.util.List getMessagesOrBuilderList(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishResponse.java index d9a71ff8b..d00cf0040 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.PublishResponse} */ -public final class PublishResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PublishResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.PublishResponse) PublishResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PublishResponse"); + } + // Use PublishResponse.newBuilder() to construct. - private PublishResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PublishResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private PublishResponse() { messageIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PublishResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PublishResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PublishResponse_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList messageIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -84,6 +92,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public com.google.protobuf.ProtocolStringList getMessageIdsList() { return messageIds_; } + /** * * @@ -100,6 +109,7 @@ public com.google.protobuf.ProtocolStringList getMessageIdsList() { public int getMessageIdsCount() { return messageIds_.size(); } + /** * * @@ -117,6 +127,7 @@ public int getMessageIdsCount() { public java.lang.String getMessageIds(int index) { return messageIds_.get(index); } + /** * * @@ -150,7 +161,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < messageIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, messageIds_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 1, messageIds_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -241,38 +252,38 @@ public static com.google.pubsub.v1.PublishResponse parseFrom( public static com.google.pubsub.v1.PublishResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PublishResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PublishResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.PublishResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PublishResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PublishResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -295,10 +306,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -308,7 +320,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.PublishResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PublishResponse) com.google.pubsub.v1.PublishResponseOrBuilder { @@ -318,7 +330,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PublishResponse_fieldAccessorTable @@ -330,7 +342,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.PublishResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -380,39 +392,6 @@ private void buildPartial0(com.google.pubsub.v1.PublishResponse 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.pubsub.v1.PublishResponse) { @@ -496,6 +475,7 @@ private void ensureMessageIdsIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -513,6 +493,7 @@ public com.google.protobuf.ProtocolStringList getMessageIdsList() { messageIds_.makeImmutable(); return messageIds_; } + /** * * @@ -529,6 +510,7 @@ public com.google.protobuf.ProtocolStringList getMessageIdsList() { public int getMessageIdsCount() { return messageIds_.size(); } + /** * * @@ -546,6 +528,7 @@ public int getMessageIdsCount() { public java.lang.String getMessageIds(int index) { return messageIds_.get(index); } + /** * * @@ -563,6 +546,7 @@ public java.lang.String getMessageIds(int index) { public com.google.protobuf.ByteString getMessageIdsBytes(int index) { return messageIds_.getByteString(index); } + /** * * @@ -588,6 +572,7 @@ public Builder setMessageIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -612,6 +597,7 @@ public Builder addMessageIds(java.lang.String value) { onChanged(); return this; } + /** * * @@ -633,6 +619,7 @@ public Builder addAllMessageIds(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -653,6 +640,7 @@ public Builder clearMessageIds() { onChanged(); return this; } + /** * * @@ -679,17 +667,6 @@ public Builder addMessageIdsBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PublishResponse) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishResponseOrBuilder.java index 0b9a71790..067a2b264 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PublishResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface PublishResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PublishResponse) @@ -38,6 +40,7 @@ public interface PublishResponseOrBuilder * @return A list containing the messageIds. */ java.util.List getMessageIdsList(); + /** * * @@ -52,6 +55,7 @@ public interface PublishResponseOrBuilder * @return The count of messageIds. */ int getMessageIdsCount(); + /** * * @@ -67,6 +71,7 @@ public interface PublishResponseOrBuilder * @return The messageIds at the given index. */ java.lang.String getMessageIds(int index); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java index b97bf7147..ef7fcebb9 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessage.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -35,13 +36,25 @@ * * Protobuf type {@code google.pubsub.v1.PubsubMessage} */ -public final class PubsubMessage extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PubsubMessage extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.PubsubMessage) PubsubMessageOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PubsubMessage"); + } + // Use PubsubMessage.newBuilder() to construct. - private PubsubMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PubsubMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -51,12 +64,6 @@ private PubsubMessage() { orderingKey_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PubsubMessage(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PubsubMessage_descriptor; @@ -75,7 +82,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PubsubMessage_fieldAccessorTable @@ -87,6 +94,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl private int bitField0_; public static final int DATA_FIELD_NUMBER = 1; private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -130,6 +138,7 @@ private com.google.protobuf.MapField interna public int getAttributesCount() { return internalGetAttributes().getMap().size(); } + /** * * @@ -149,12 +158,14 @@ public boolean containsAttributes(java.lang.String key) { } return internalGetAttributes().getMap().containsKey(key); } + /** Use {@link #getAttributesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getAttributes() { return getAttributesMap(); } + /** * * @@ -171,6 +182,7 @@ public java.util.Map getAttributes() { public java.util.Map getAttributesMap() { return internalGetAttributes().getMap(); } + /** * * @@ -194,6 +206,7 @@ public java.util.Map getAttributesMap() { java.util.Map map = internalGetAttributes().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -222,6 +235,7 @@ public java.lang.String getAttributesOrThrow(java.lang.String key) { @SuppressWarnings("serial") private volatile java.lang.Object messageId_ = ""; + /** * * @@ -248,6 +262,7 @@ public java.lang.String getMessageId() { return s; } } + /** * * @@ -277,6 +292,7 @@ public com.google.protobuf.ByteString getMessageIdBytes() { public static final int PUBLISH_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp publishTime_; + /** * * @@ -294,6 +310,7 @@ public com.google.protobuf.ByteString getMessageIdBytes() { public boolean hasPublishTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -311,6 +328,7 @@ public boolean hasPublishTime() { public com.google.protobuf.Timestamp getPublishTime() { return publishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : publishTime_; } + /** * * @@ -331,6 +349,7 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object orderingKey_ = ""; + /** * * @@ -361,6 +380,7 @@ public java.lang.String getOrderingKey() { return s; } } + /** * * @@ -409,16 +429,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!data_.isEmpty()) { output.writeBytes(1, data_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 2); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(messageId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, messageId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, messageId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getPublishTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderingKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderingKey_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderingKey_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderingKey_); } getUnknownFields().writeTo(output); } @@ -442,14 +462,14 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, attributes__); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(messageId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, messageId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, messageId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPublishTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderingKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderingKey_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderingKey_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderingKey_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -540,38 +560,38 @@ public static com.google.pubsub.v1.PubsubMessage parseFrom( public static com.google.pubsub.v1.PubsubMessage parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PubsubMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PubsubMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.PubsubMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PubsubMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PubsubMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -594,10 +614,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -614,7 +635,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.PubsubMessage} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PubsubMessage) com.google.pubsub.v1.PubsubMessageOrBuilder { @@ -646,7 +667,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PubsubMessage_fieldAccessorTable @@ -660,14 +681,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPublishTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPublishTimeFieldBuilder(); } } @@ -741,39 +762,6 @@ private void buildPartial0(com.google.pubsub.v1.PubsubMessage result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.PubsubMessage) { @@ -786,7 +774,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.pubsub.v1.PubsubMessage other) { if (other == com.google.pubsub.v1.PubsubMessage.getDefaultInstance()) return this; - if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getData().isEmpty()) { setData(other.getData()); } internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); @@ -856,7 +844,8 @@ public Builder mergeFrom( } // case 26 case 34: { - input.readMessage(getPublishTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPublishTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -886,6 +875,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -902,6 +892,7 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getData() { return data_; } + /** * * @@ -924,6 +915,7 @@ public Builder setData(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -971,6 +963,7 @@ public Builder clearData() { public int getAttributesCount() { return internalGetAttributes().getMap().size(); } + /** * * @@ -990,12 +983,14 @@ public boolean containsAttributes(java.lang.String key) { } return internalGetAttributes().getMap().containsKey(key); } + /** Use {@link #getAttributesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getAttributes() { return getAttributesMap(); } + /** * * @@ -1012,6 +1007,7 @@ public java.util.Map getAttributes() { public java.util.Map getAttributesMap() { return internalGetAttributes().getMap(); } + /** * * @@ -1035,6 +1031,7 @@ public java.util.Map getAttributesMap() { java.util.Map map = internalGetAttributes().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -1064,6 +1061,7 @@ public Builder clearAttributes() { internalGetMutableAttributes().getMutableMap().clear(); return this; } + /** * * @@ -1083,12 +1081,14 @@ public Builder removeAttributes(java.lang.String key) { internalGetMutableAttributes().getMutableMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableAttributes() { bitField0_ |= 0x00000002; return internalGetMutableAttributes().getMutableMap(); } + /** * * @@ -1112,6 +1112,7 @@ public Builder putAttributes(java.lang.String key, java.lang.String value) { bitField0_ |= 0x00000002; return this; } + /** * * @@ -1131,6 +1132,7 @@ public Builder putAllAttributes(java.util.Map publishTimeBuilder_; + /** * * @@ -1273,6 +1280,7 @@ public Builder setMessageIdBytes(com.google.protobuf.ByteString value) { public boolean hasPublishTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1295,6 +1303,7 @@ public com.google.protobuf.Timestamp getPublishTime() { return publishTimeBuilder_.getMessage(); } } + /** * * @@ -1319,6 +1328,7 @@ public Builder setPublishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1340,6 +1350,7 @@ public Builder setPublishTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -1369,6 +1380,7 @@ public Builder mergePublishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1390,6 +1402,7 @@ public Builder clearPublishTime() { onChanged(); return this; } + /** * * @@ -1404,8 +1417,9 @@ public Builder clearPublishTime() { public com.google.protobuf.Timestamp.Builder getPublishTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getPublishTimeFieldBuilder().getBuilder(); + return internalGetPublishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1426,6 +1440,7 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() { : publishTime_; } } + /** * * @@ -1437,14 +1452,14 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() { * * .google.protobuf.Timestamp publish_time = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getPublishTimeFieldBuilder() { + internalGetPublishTimeFieldBuilder() { if (publishTimeBuilder_ == null) { publishTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1455,6 +1470,7 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() { } private java.lang.Object orderingKey_ = ""; + /** * * @@ -1484,6 +1500,7 @@ public java.lang.String getOrderingKey() { return (java.lang.String) ref; } } + /** * * @@ -1513,6 +1530,7 @@ public com.google.protobuf.ByteString getOrderingKeyBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1541,6 +1559,7 @@ public Builder setOrderingKey(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1565,6 +1584,7 @@ public Builder clearOrderingKey() { onChanged(); return this; } + /** * * @@ -1595,17 +1615,6 @@ public Builder setOrderingKeyBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PubsubMessage) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java index 763d033d3..801741079 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface PubsubMessageOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PubsubMessage) @@ -51,6 +53,7 @@ public interface PubsubMessageOrBuilder * */ int getAttributesCount(); + /** * * @@ -64,9 +67,11 @@ public interface PubsubMessageOrBuilder * */ boolean containsAttributes(java.lang.String key); + /** Use {@link #getAttributesMap()} instead. */ @java.lang.Deprecated java.util.Map getAttributes(); + /** * * @@ -80,6 +85,7 @@ public interface PubsubMessageOrBuilder * */ java.util.Map getAttributesMap(); + /** * * @@ -97,6 +103,7 @@ java.lang.String getAttributesOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); + /** * * @@ -126,6 +133,7 @@ java.lang.String getAttributesOrDefault( * @return The messageId. */ java.lang.String getMessageId(); + /** * * @@ -156,6 +164,7 @@ java.lang.String getAttributesOrDefault( * @return Whether the publishTime field is set. */ boolean hasPublishTime(); + /** * * @@ -170,6 +179,7 @@ java.lang.String getAttributesOrDefault( * @return The publishTime. */ com.google.protobuf.Timestamp getPublishTime(); + /** * * @@ -202,6 +212,7 @@ java.lang.String getAttributesOrDefault( * @return The orderingKey. */ java.lang.String getOrderingKey(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java index 28c7f6b27..10ab7cdd2 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; -public final class PubsubProto { +@com.google.protobuf.Generated +public final class PubsubProto extends com.google.protobuf.GeneratedFile { private PubsubProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PubsubProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,291 +42,359 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_MessageStoragePolicy_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_MessageStoragePolicy_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_SchemaSettings_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_SchemaSettings_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_IngestionDataSourceSettings_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsKinesis_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsKinesis_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_TextFormat_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_TextFormat_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_AvroFormat_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_AvroFormat_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_IngestionDataSourceSettings_AzureEventHubs_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_IngestionDataSourceSettings_AzureEventHubs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsMsk_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsMsk_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_IngestionDataSourceSettings_ConfluentCloud_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_IngestionDataSourceSettings_ConfluentCloud_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_PlatformLogsSettings_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_PlatformLogsSettings_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_IngestionFailureEvent_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_IngestionFailureEvent_ApiViolationReason_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_IngestionFailureEvent_ApiViolationReason_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_IngestionFailureEvent_AvroFailureReason_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_IngestionFailureEvent_AvroFailureReason_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_IngestionFailureEvent_SchemaViolationReason_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_IngestionFailureEvent_SchemaViolationReason_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_IngestionFailureEvent_MessageTransformationFailureReason_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_IngestionFailureEvent_MessageTransformationFailureReason_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_IngestionFailureEvent_AwsMskFailureReason_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_IngestionFailureEvent_AwsMskFailureReason_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_IngestionFailureEvent_AzureEventHubsFailureReason_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_IngestionFailureEvent_AzureEventHubsFailureReason_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_IngestionFailureEvent_ConfluentCloudFailureReason_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_IngestionFailureEvent_ConfluentCloudFailureReason_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_IngestionFailureEvent_AwsKinesisFailureReason_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_IngestionFailureEvent_AwsKinesisFailureReason_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_JavaScriptUDF_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_JavaScriptUDF_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_AIInference_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_AIInference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_AIInference_UnstructuredInference_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_AIInference_UnstructuredInference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_MessageTransform_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_MessageTransform_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_Topic_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_Topic_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_Topic_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_Topic_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_Topic_TagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_Topic_TagsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_PubsubMessage_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_PubsubMessage_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_PubsubMessage_AttributesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_PubsubMessage_AttributesEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_GetTopicRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_GetTopicRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_UpdateTopicRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_UpdateTopicRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_PublishRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_PublishRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_PublishResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_PublishResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListTopicsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ListTopicsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListTopicsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ListTopicsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_DeleteTopicRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_DetachSubscriptionRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_DetachSubscriptionResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_Subscription_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_Subscription_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_Subscription_AnalyticsHubSubscriptionInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_Subscription_AnalyticsHubSubscriptionInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_Subscription_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_Subscription_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_Subscription_TagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_Subscription_TagsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_RetryPolicy_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_RetryPolicy_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_DeadLetterPolicy_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_DeadLetterPolicy_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ExpirationPolicy_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ExpirationPolicy_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_PushConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_PushConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_PushConfig_OidcToken_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_PushConfig_OidcToken_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_PushConfig_PubsubWrapper_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_PushConfig_PubsubWrapper_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_PushConfig_NoWrapper_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_PushConfig_NoWrapper_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_PushConfig_AttributesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_PushConfig_AttributesEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_BigQueryConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_BigQueryConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_BigtableConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_BigtableConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_CloudStorageConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_CloudStorageConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_CloudStorageConfig_TextConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_CloudStorageConfig_TextConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_CloudStorageConfig_AvroConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_CloudStorageConfig_AvroConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ReceivedMessage_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ReceivedMessage_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_GetSubscriptionRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_UpdateSubscriptionRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ListSubscriptionsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ListSubscriptionsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_DeleteSubscriptionRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ModifyPushConfigRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_PullRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_PullRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_PullResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_PullResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_AcknowledgeRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_StreamingPullRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_StreamingPullRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_StreamingPullResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_StreamingPullResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_CreateSnapshotRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_CreateSnapshotRequest_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_CreateSnapshotRequest_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_CreateSnapshotRequest_TagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_pubsub_v1_CreateSnapshotRequest_TagsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_UpdateSnapshotRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_Snapshot_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_Snapshot_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_Snapshot_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_Snapshot_LabelsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_GetSnapshotRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ListSnapshotsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ListSnapshotsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_DeleteSnapshotRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_SeekRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_SeekRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_SeekResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_SeekResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -325,421 +405,708 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n\035google/pubsub/v1/pubsub.proto\022\020google." + "\n" + + "\035google/pubsub/v1/pubsub.proto\022\020google." + "pubsub.v1\032\034google/api/annotations.proto\032" + "\027google/api/client.proto\032\037google/api/fie" + "ld_behavior.proto\032\031google/api/resource.p" - + "roto\032\036google/protobuf/duration.proto\032\033go" - + "ogle/protobuf/empty.proto\032 google/protob" - + "uf/field_mask.proto\032\037google/protobuf/tim" - + "estamp.proto\032\035google/pubsub/v1/schema.pr" - + "oto\"a\n\024MessageStoragePolicy\022(\n\033allowed_p" - + "ersistence_regions\030\001 \003(\tB\003\340A\001\022\037\n\022enforce" - + "_in_transit\030\002 \001(\010B\003\340A\001\"\270\001\n\016SchemaSetting" - + "s\0224\n\006schema\030\001 \001(\tB$\340A\002\372A\036\n\034pubsub.google" - + "apis.com/Schema\0221\n\010encoding\030\002 \001(\0162\032.goog" - + "le.pubsub.v1.EncodingB\003\340A\001\022\036\n\021first_revi" - + "sion_id\030\003 \001(\tB\003\340A\001\022\035\n\020last_revision_id\030\004" - + " \001(\tB\003\340A\001\"\251\013\n\033IngestionDataSourceSetting" - + "s\022T\n\013aws_kinesis\030\001 \001(\01328.google.pubsub.v" - + "1.IngestionDataSourceSettings.AwsKinesis" - + "B\003\340A\001H\000\022X\n\rcloud_storage\030\002 \001(\0132:.google." - + "pubsub.v1.IngestionDataSourceSettings.Cl" - + "oudStorageB\003\340A\001H\000\022K\n\026platform_logs_setti" - + "ngs\030\004 \001(\0132&.google.pubsub.v1.PlatformLog" - + "sSettingsB\003\340A\001\032\352\002\n\nAwsKinesis\022R\n\005state\030\001" - + " \001(\0162>.google.pubsub.v1.IngestionDataSou" - + "rceSettings.AwsKinesis.StateB\003\340A\003\022\027\n\nstr" - + "eam_arn\030\002 \001(\tB\003\340A\002\022\031\n\014consumer_arn\030\003 \001(\t" - + "B\003\340A\002\022\031\n\014aws_role_arn\030\004 \001(\tB\003\340A\002\022 \n\023gcp_" - + "service_account\030\005 \001(\tB\003\340A\002\"\226\001\n\005State\022\025\n\021" - + "STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\035\n\031KINES" - + "IS_PERMISSION_DENIED\020\002\022\035\n\031PUBLISH_PERMIS" - + "SION_DENIED\020\003\022\024\n\020STREAM_NOT_FOUND\020\004\022\026\n\022C" - + "ONSUMER_NOT_FOUND\020\005\032\225\006\n\014CloudStorage\022T\n\005" - + "state\030\001 \001(\0162@.google.pubsub.v1.Ingestion" - + "DataSourceSettings.CloudStorage.StateB\003\340" - + "A\003\022\023\n\006bucket\030\002 \001(\tB\003\340A\001\022a\n\013text_format\030\003" - + " \001(\0132E.google.pubsub.v1.IngestionDataSou" - + "rceSettings.CloudStorage.TextFormatB\003\340A\001" - + "H\000\022a\n\013avro_format\030\004 \001(\0132E.google.pubsub." - + "v1.IngestionDataSourceSettings.CloudStor" - + "age.AvroFormatB\003\340A\001H\000\022n\n\022pubsub_avro_for" - + "mat\030\005 \001(\0132K.google.pubsub.v1.IngestionDa" - + "taSourceSettings.CloudStorage.PubSubAvro" - + "FormatB\003\340A\001H\000\022C\n\032minimum_object_create_t" - + "ime\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340" - + "A\001\022\027\n\nmatch_glob\030\t \001(\tB\003\340A\001\0327\n\nTextForma" - + "t\022\033\n\tdelimiter\030\001 \001(\tB\003\340A\001H\000\210\001\001B\014\n\n_delim" - + "iter\032\014\n\nAvroFormat\032\022\n\020PubSubAvroFormat\"\232" - + "\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIV" - + "E\020\001\022#\n\037CLOUD_STORAGE_PERMISSION_DENIED\020\002" - + "\022\035\n\031PUBLISH_PERMISSION_DENIED\020\003\022\024\n\020BUCKE" - + "T_NOT_FOUND\020\004\022\024\n\020TOO_MANY_OBJECTS\020\005B\016\n\014i" - + "nput_formatB\010\n\006source\"\277\001\n\024PlatformLogsSe" - + "ttings\022F\n\010severity\030\001 \001(\0162/.google.pubsub" - + ".v1.PlatformLogsSettings.SeverityB\003\340A\001\"_" - + "\n\010Severity\022\030\n\024SEVERITY_UNSPECIFIED\020\000\022\014\n\010" - + "DISABLED\020\001\022\t\n\005DEBUG\020\002\022\010\n\004INFO\020\003\022\013\n\007WARNI" - + "NG\020\004\022\t\n\005ERROR\020\005\"\221\004\n\025IngestionFailureEven" - + "t\022\022\n\005topic\030\001 \001(\tB\003\340A\002\022\032\n\rerror_message\030\002" - + " \001(\tB\003\340A\002\022a\n\025cloud_storage_failure\030\003 \001(\013" - + "2;.google.pubsub.v1.IngestionFailureEven" - + "t.CloudStorageFailureB\003\340A\001H\000\032\024\n\022ApiViola" - + "tionReason\032\023\n\021AvroFailureReason\032\256\002\n\023Clou" - + "dStorageFailure\022\023\n\006bucket\030\001 \001(\tB\003\340A\001\022\030\n\013" - + "object_name\030\002 \001(\tB\003\340A\001\022\036\n\021object_generat" - + "ion\030\003 \001(\003B\003\340A\001\022]\n\023avro_failure_reason\030\005 " - + "\001(\01329.google.pubsub.v1.IngestionFailureE" - + "vent.AvroFailureReasonB\003\340A\001H\000\022_\n\024api_vio" - + "lation_reason\030\006 \001(\0132:.google.pubsub.v1.I" - + "ngestionFailureEvent.ApiViolationReasonB" - + "\003\340A\001H\000B\010\n\006reasonB\t\n\007failure\"\272\005\n\005Topic\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\002\0228\n\006labels\030\002 \003(\0132#.googl" - + "e.pubsub.v1.Topic.LabelsEntryB\003\340A\001\022K\n\026me" - + "ssage_storage_policy\030\003 \001(\0132&.google.pubs" - + "ub.v1.MessageStoragePolicyB\003\340A\001\022\031\n\014kms_k" - + "ey_name\030\005 \001(\tB\003\340A\001\022>\n\017schema_settings\030\006 " - + "\001(\0132 .google.pubsub.v1.SchemaSettingsB\003\340" - + "A\001\022\032\n\rsatisfies_pzs\030\007 \001(\010B\003\340A\001\022B\n\032messag" - + "e_retention_duration\030\010 \001(\0132\031.google.prot" - + "obuf.DurationB\003\340A\001\0221\n\005state\030\t \001(\0162\035.goog" - + "le.pubsub.v1.Topic.StateB\003\340A\003\022Z\n\036ingesti" - + "on_data_source_settings\030\n \001(\0132-.google.p" - + "ubsub.v1.IngestionDataSourceSettingsB\003\340A" - + "\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" - + " \001(\t:\0028\001\"H\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000" - + "\022\n\n\006ACTIVE\020\001\022\034\n\030INGESTION_RESOURCE_ERROR" - + "\020\002:T\352AQ\n\033pubsub.googleapis.com/Topic\022!pr" - + "ojects/{project}/topics/{topic}\022\017_delete" - + "d-topic_\"\200\002\n\rPubsubMessage\022\021\n\004data\030\001 \001(\014" - + "B\003\340A\001\022H\n\nattributes\030\002 \003(\0132/.google.pubsu" - + "b.v1.PubsubMessage.AttributesEntryB\003\340A\001\022" - + "\022\n\nmessage_id\030\003 \001(\t\0220\n\014publish_time\030\004 \001(" - + "\0132\032.google.protobuf.Timestamp\022\031\n\014orderin" - + "g_key\030\005 \001(\tB\003\340A\001\0321\n\017AttributesEntry\022\013\n\003k" - + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"E\n\017GetTopicR" - + "equest\0222\n\005topic\030\001 \001(\tB#\340A\002\372A\035\n\033pubsub.go" - + "ogleapis.com/Topic\"w\n\022UpdateTopicRequest" - + "\022+\n\005topic\030\001 \001(\0132\027.google.pubsub.v1.Topic" - + "B\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.prot" - + "obuf.FieldMaskB\003\340A\002\"|\n\016PublishRequest\0222\n" - + "\005topic\030\001 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis." - + "com/Topic\0226\n\010messages\030\002 \003(\0132\037.google.pub" - + "sub.v1.PubsubMessageB\003\340A\002\"+\n\017PublishResp" - + "onse\022\030\n\013message_ids\030\001 \003(\tB\003\340A\001\"\212\001\n\021ListT" - + "opicsRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+c" - + "loudresourcemanager.googleapis.com/Proje" - + "ct\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token" - + "\030\003 \001(\tB\003\340A\001\"`\n\022ListTopicsResponse\022,\n\006top" - + "ics\030\001 \003(\0132\027.google.pubsub.v1.TopicB\003\340A\001\022" - + "\034\n\017next_page_token\030\002 \001(\tB\003\340A\001\"\204\001\n\035ListTo" - + "picSubscriptionsRequest\0222\n\005topic\030\001 \001(\tB#" - + "\340A\002\372A\035\n\033pubsub.googleapis.com/Topic\022\026\n\tp" - + "age_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB" - + "\003\340A\001\"\201\001\n\036ListTopicSubscriptionsResponse\022" - + "A\n\rsubscriptions\030\001 \003(\tB*\340A\001\372A$\n\"pubsub.g" - + "oogleapis.com/Subscription\022\034\n\017next_page_" - + "token\030\002 \001(\tB\003\340A\001\"\200\001\n\031ListTopicSnapshotsR" - + "equest\0222\n\005topic\030\001 \001(\tB#\340A\002\372A\035\n\033pubsub.go" - + "ogleapis.com/Topic\022\026\n\tpage_size\030\002 \001(\005B\003\340" - + "A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"R\n\032ListTopic" - + "SnapshotsResponse\022\026\n\tsnapshots\030\001 \003(\tB\003\340A" - + "\001\022\034\n\017next_page_token\030\002 \001(\tB\003\340A\001\"H\n\022Delet" - + "eTopicRequest\0222\n\005topic\030\001 \001(\tB#\340A\002\372A\035\n\033pu" - + "bsub.googleapis.com/Topic\"]\n\031DetachSubsc" - + "riptionRequest\022@\n\014subscription\030\001 \001(\tB*\340A" - + "\002\372A$\n\"pubsub.googleapis.com/Subscription" - + "\"\034\n\032DetachSubscriptionResponse\"\253\n\n\014Subsc" - + "ription\022\021\n\004name\030\001 \001(\tB\003\340A\002\0222\n\005topic\030\002 \001(" - + "\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/Topic\0226" - + "\n\013push_config\030\004 \001(\0132\034.google.pubsub.v1.P" - + "ushConfigB\003\340A\001\022>\n\017bigquery_config\030\022 \001(\0132" - + " .google.pubsub.v1.BigQueryConfigB\003\340A\001\022G" - + "\n\024cloud_storage_config\030\026 \001(\0132$.google.pu" - + "bsub.v1.CloudStorageConfigB\003\340A\001\022!\n\024ack_d" - + "eadline_seconds\030\005 \001(\005B\003\340A\001\022\"\n\025retain_ack" - + "ed_messages\030\007 \001(\010B\003\340A\001\022B\n\032message_retent" - + "ion_duration\030\010 \001(\0132\031.google.protobuf.Dur" - + "ationB\003\340A\001\022?\n\006labels\030\t \003(\0132*.google.pubs" - + "ub.v1.Subscription.LabelsEntryB\003\340A\001\022$\n\027e" - + "nable_message_ordering\030\n \001(\010B\003\340A\001\022B\n\021exp" - + "iration_policy\030\013 \001(\0132\".google.pubsub.v1." - + "ExpirationPolicyB\003\340A\001\022\023\n\006filter\030\014 \001(\tB\003\340" - + "A\001\022C\n\022dead_letter_policy\030\r \001(\0132\".google." - + "pubsub.v1.DeadLetterPolicyB\003\340A\001\0228\n\014retry" - + "_policy\030\016 \001(\0132\035.google.pubsub.v1.RetryPo" - + "licyB\003\340A\001\022\025\n\010detached\030\017 \001(\010B\003\340A\001\022)\n\034enab" - + "le_exactly_once_delivery\030\020 \001(\010B\003\340A\001\022H\n t" - + "opic_message_retention_duration\030\021 \001(\0132\031." - + "google.protobuf.DurationB\003\340A\003\0228\n\005state\030\023" - + " \001(\0162$.google.pubsub.v1.Subscription.Sta" - + "teB\003\340A\003\022i\n\037analytics_hub_subscription_in" - + "fo\030\027 \001(\0132;.google.pubsub.v1.Subscription" - + ".AnalyticsHubSubscriptionInfoB\003\340A\003\032O\n\034An" - + "alyticsHubSubscriptionInfo\022\024\n\007listing\030\001 " - + "\001(\tB\003\340A\001\022\031\n\014subscription\030\002 \001(\tB\003\340A\001\032-\n\013L" - + "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" - + "8\001\">\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006AC" - + "TIVE\020\001\022\022\n\016RESOURCE_ERROR\020\002:X\352AU\n\"pubsub." - + "googleapis.com/Subscription\022/projects/{p" - + "roject}/subscriptions/{subscription}\"\177\n\013" - + "RetryPolicy\0227\n\017minimum_backoff\030\001 \001(\0132\031.g" - + "oogle.protobuf.DurationB\003\340A\001\0227\n\017maximum_" - + "backoff\030\002 \001(\0132\031.google.protobuf.Duration" - + "B\003\340A\001\"V\n\020DeadLetterPolicy\022\036\n\021dead_letter" - + "_topic\030\001 \001(\tB\003\340A\001\022\"\n\025max_delivery_attemp" - + "ts\030\002 \001(\005B\003\340A\001\"?\n\020ExpirationPolicy\022+\n\003ttl" - + "\030\001 \001(\0132\031.google.protobuf.DurationB\003\340A\001\"\232" - + "\004\n\nPushConfig\022\032\n\rpush_endpoint\030\001 \001(\tB\003\340A" - + "\001\022E\n\nattributes\030\002 \003(\0132,.google.pubsub.v1" - + ".PushConfig.AttributesEntryB\003\340A\001\022A\n\noidc" - + "_token\030\003 \001(\0132&.google.pubsub.v1.PushConf" - + "ig.OidcTokenB\003\340A\001H\000\022I\n\016pubsub_wrapper\030\004 " - + "\001(\0132*.google.pubsub.v1.PushConfig.Pubsub" - + "WrapperB\003\340A\001H\001\022A\n\nno_wrapper\030\005 \001(\0132&.goo" - + "gle.pubsub.v1.PushConfig.NoWrapperB\003\340A\001H" - + "\001\032F\n\tOidcToken\022\"\n\025service_account_email\030" - + "\001 \001(\tB\003\340A\001\022\025\n\010audience\030\002 \001(\tB\003\340A\001\032\017\n\rPub" - + "subWrapper\032(\n\tNoWrapper\022\033\n\016write_metadat" - + "a\030\001 \001(\010B\003\340A\001\0321\n\017AttributesEntry\022\013\n\003key\030\001" - + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\027\n\025authenticatio" - + "n_methodB\t\n\007wrapper\"\216\003\n\016BigQueryConfig\022\022" - + "\n\005table\030\001 \001(\tB\003\340A\001\022\035\n\020use_topic_schema\030\002" - + " \001(\010B\003\340A\001\022\033\n\016write_metadata\030\003 \001(\010B\003\340A\001\022 " - + "\n\023drop_unknown_fields\030\004 \001(\010B\003\340A\001\022:\n\005stat" - + "e\030\005 \001(\0162&.google.pubsub.v1.BigQueryConfi" - + "g.StateB\003\340A\003\022\035\n\020use_table_schema\030\006 \001(\010B\003" - + "\340A\001\022\"\n\025service_account_email\030\007 \001(\tB\003\340A\001\"" - + "\212\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTI" - + "VE\020\001\022\025\n\021PERMISSION_DENIED\020\002\022\r\n\tNOT_FOUND" - + "\020\003\022\023\n\017SCHEMA_MISMATCH\020\004\022#\n\037IN_TRANSIT_LO" - + "CATION_RESTRICTION\020\005\"\351\005\n\022CloudStorageCon" - + "fig\022\023\n\006bucket\030\001 \001(\tB\003\340A\002\022\034\n\017filename_pre" - + "fix\030\002 \001(\tB\003\340A\001\022\034\n\017filename_suffix\030\003 \001(\tB" - + "\003\340A\001\022%\n\030filename_datetime_format\030\n \001(\tB\003" - + "\340A\001\022K\n\013text_config\030\004 \001(\0132/.google.pubsub" - + ".v1.CloudStorageConfig.TextConfigB\003\340A\001H\000" - + "\022K\n\013avro_config\030\005 \001(\0132/.google.pubsub.v1" - + ".CloudStorageConfig.AvroConfigB\003\340A\001H\000\0224\n" - + "\014max_duration\030\006 \001(\0132\031.google.protobuf.Du" - + "rationB\003\340A\001\022\026\n\tmax_bytes\030\007 \001(\003B\003\340A\001\022\031\n\014m" - + "ax_messages\030\010 \001(\003B\003\340A\001\022>\n\005state\030\t \001(\0162*." - + "google.pubsub.v1.CloudStorageConfig.Stat" - + "eB\003\340A\003\022\"\n\025service_account_email\030\013 \001(\tB\003\340" - + "A\001\032\014\n\nTextConfig\032H\n\nAvroConfig\022\033\n\016write_" - + "metadata\030\001 \001(\010B\003\340A\001\022\035\n\020use_topic_schema\030" - + "\002 \001(\010B\003\340A\001\"\212\001\n\005State\022\025\n\021STATE_UNSPECIFIE" - + "D\020\000\022\n\n\006ACTIVE\020\001\022\025\n\021PERMISSION_DENIED\020\002\022\r" - + "\n\tNOT_FOUND\020\003\022#\n\037IN_TRANSIT_LOCATION_RES" - + "TRICTION\020\004\022\023\n\017SCHEMA_MISMATCH\020\005B\017\n\routpu" - + "t_format\"|\n\017ReceivedMessage\022\023\n\006ack_id\030\001 " - + "\001(\tB\003\340A\001\0225\n\007message\030\002 \001(\0132\037.google.pubsu" - + "b.v1.PubsubMessageB\003\340A\001\022\035\n\020delivery_atte" - + "mpt\030\003 \001(\005B\003\340A\001\"Z\n\026GetSubscriptionRequest" - + "\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.g" - + "oogleapis.com/Subscription\"\214\001\n\031UpdateSub" - + "scriptionRequest\0229\n\014subscription\030\001 \001(\0132\036" - + ".google.pubsub.v1.SubscriptionB\003\340A\002\0224\n\013u" - + "pdate_mask\030\002 \001(\0132\032.google.protobuf.Field" - + "MaskB\003\340A\002\"\221\001\n\030ListSubscriptionsRequest\022D" - + "\n\007project\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcema" - + "nager.googleapis.com/Project\022\026\n\tpage_siz" - + "e\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"u\n" - + "\031ListSubscriptionsResponse\022:\n\rsubscripti" - + "ons\030\001 \003(\0132\036.google.pubsub.v1.Subscriptio" - + "nB\003\340A\001\022\034\n\017next_page_token\030\002 \001(\tB\003\340A\001\"]\n\031" - + "DeleteSubscriptionRequest\022@\n\014subscriptio" - + "n\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/S" - + "ubscription\"\223\001\n\027ModifyPushConfigRequest\022" - + "@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.go" - + "ogleapis.com/Subscription\0226\n\013push_config" - + "\030\002 \001(\0132\034.google.pubsub.v1.PushConfigB\003\340A" - + "\002\"\215\001\n\013PullRequest\022@\n\014subscription\030\001 \001(\tB" + + "roto\032\036google/protobuf/duration.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\032\034google/protobuf/str" + + "uct.proto\032\037google/protobuf/timestamp.proto\032\035google/pubsub/v1/schema.proto\"a\n" + + "\024MessageStoragePolicy\022(\n" + + "\033allowed_persistence_regions\030\001 \003(\tB\003\340A\001\022\037\n" + + "\022enforce_in_transit\030\002 \001(\010B\003\340A\001\"\270\001\n" + + "\016SchemaSettings\0224\n" + + "\006schema\030\001 \001(\tB$\340A\002\372A\036\n" + + "\034pubsub.googleapis.com/Schema\0221\n" + + "\010encoding\030\002 \001(\0162\032.google.pubsub.v1.EncodingB\003\340A\001\022\036\n" + + "\021first_revision_id\030\003 \001(\tB\003\340A\001\022\035\n" + + "\020last_revision_id\030\004 \001(\tB\003\340A\001\"\350\027\n" + + "\033IngestionDataSourceSettings\022T\n" + + "\013aws_kinesis\030\001" + + " \001(\01328.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesisB\003\340A\001H\000\022X\n" + + "\r" + + "cloud_storage\030\002 \001(\0132:.google.pubsub.v1." + + "IngestionDataSourceSettings.CloudStorageB\003\340A\001H\000\022]\n" + + "\020azure_event_hubs\030\003 \001(\0132<.goog" + + "le.pubsub.v1.IngestionDataSourceSettings.AzureEventHubsB\003\340A\001H\000\022L\n" + + "\007aws_msk\030\005 \001(\0132" + + "4.google.pubsub.v1.IngestionDataSourceSettings.AwsMskB\003\340A\001H\000\022\\\n" + + "\017confluent_cloud\030\006" + + " \001(\0132<.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloudB\003\340A\001H\000\022K\n" + + "\026platform_logs_settings\030\004" + + " \001(\0132&.google.pubsub.v1.PlatformLogsSettingsB\003\340A\001\032\352\002\n\n" + + "AwsKinesis\022R\n" + + "\005state\030\001 \001(\0162>.google.pubsub.v1" + + ".IngestionDataSourceSettings.AwsKinesis.StateB\003\340A\003\022\027\n\n" + + "stream_arn\030\002 \001(\tB\003\340A\002\022\031\n" + + "\014consumer_arn\030\003 \001(\tB\003\340A\002\022\031\n" + + "\014aws_role_arn\030\004 \001(\tB\003\340A\002\022 \n" + + "\023gcp_service_account\030\005 \001(\tB\003\340A\002\"\226\001\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022\035\n" + + "\031KINESIS_PERMISSION_DENIED\020\002\022\035\n" + + "\031PUBLISH_PERMISSION_DENIED\020\003\022\024\n" + + "\020STREAM_NOT_FOUND\020\004\022\026\n" + + "\022CONSUMER_NOT_FOUND\020\005\032\225\006\n" + + "\014CloudStorage\022T\n" + + "\005state\030\001 \001(\0162@.google.pu" + + "bsub.v1.IngestionDataSourceSettings.CloudStorage.StateB\003\340A\003\022\023\n" + + "\006bucket\030\002 \001(\tB\003\340A\001\022a\n" + + "\013text_format\030\003 \001(\0132E.google.pubsub.v1" + + ".IngestionDataSourceSettings.CloudStorage.TextFormatB\003\340A\001H\000\022a\n" + + "\013avro_format\030\004 \001(\0132E.google.pubsub.v1.IngestionDataSourceS" + + "ettings.CloudStorage.AvroFormatB\003\340A\001H\000\022n\n" + + "\022pubsub_avro_format\030\005 \001(\0132K.google.pubs" + + "ub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormatB\003\340A\001H\000\022C\n" + + "\032minimum_object_create_time\030\006" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\001\022\027\n\n" + + "match_glob\030\t \001(\tB\003\340A\001\0327\n\n" + + "TextFormat\022\033\n" + + "\tdelimiter\030\001 \001(\tB\003\340A\001H\000\210\001\001B\014\n\n" + + "_delimiter\032\014\n\n" + + "AvroFormat\032\022\n" + + "\020PubSubAvroFormat\"\232\001\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022#\n" + + "\037CLOUD_STORAGE_PERMISSION_DENIED\020\002\022\035\n" + + "\031PUBLISH_PERMISSION_DENIED\020\003\022\024\n" + + "\020BUCKET_NOT_FOUND\020\004\022\024\n" + + "\020TOO_MANY_OBJECTS\020\005B\016\n" + + "\014input_format\032\377\003\n" + + "\016AzureEventHubs\022V\n" + + "\005state\030\001 \001(\0162B.google.pubsub.v" + + "1.IngestionDataSourceSettings.AzureEventHubs.StateB\003\340A\003\022\033\n" + + "\016resource_group\030\002 \001(\tB\003\340A\001\022\026\n" + + "\tnamespace\030\003 \001(\tB\003\340A\001\022\026\n" + + "\tevent_hub\030\004 \001(\tB\003\340A\001\022\026\n" + + "\tclient_id\030\005 \001(\tB\003\340A\001\022\026\n" + + "\ttenant_id\030\006 \001(\tB\003\340A\001\022\034\n" + + "\017subscription_id\030\007 \001(\tB\003\340A\001\022 \n" + + "\023gcp_service_account\030\010 \001(\tB\003\340A\001\"\327\001\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022 \n" + + "\034EVENT_HUBS_PERMISSION_DENIED\020\002\022\035\n" + + "\031PUBLISH_PERMISSION_DENIED\020\003\022\027\n" + + "\023NAMESPACE_NOT_FOUND\020\004\022\027\n" + + "\023EVENT_HUB_NOT_FOUND\020\005\022\032\n" + + "\026SUBSCRIPTION_NOT_FOUND\020\006\022\034\n" + + "\030RESOURCE_GROUP_NOT_FOUND\020\007\032\366\002\n" + + "\006AwsMsk\022N\n" + + "\005state\030\001" + + " \001(\0162:.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.StateB\003\340A\003\022\030\n" + + "\013cluster_arn\030\002 \001(\tB\003\340A\002\0222\n" + + "\005topic\030\003 \001(\tB#\340A\002\372A\035\n" + + "\033pubsub.googleapis.com/Topic\022\031\n" + + "\014aws_role_arn\030\004 \001(\tB\003\340A\002\022 \n" + + "\023gcp_service_account\030\005 \001(\tB\003\340A\002\"\220\001\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022\031\n" + + "\025MSK_PERMISSION_DENIED\020\002\022\035\n" + + "\031PUBLISH_PERMISSION_DENIED\020\003\022\025\n" + + "\021CLUSTER_NOT_FOUND\020\004\022\023\n" + + "\017TOPIC_NOT_FOUND\020\005\032\266\003\n" + + "\016ConfluentCloud\022V\n" + + "\005state\030\001 \001(\0162B.goog" + + "le.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.StateB\003\340A\003\022\035\n" + + "\020bootstrap_server\030\002 \001(\tB\003\340A\002\022\027\n\n" + + "cluster_id\030\003 \001(\tB\003\340A\002\022\022\n" + + "\005topic\030\004 \001(\tB\003\340A\002\022\035\n" + + "\020identity_pool_id\030\005 \001(\tB\003\340A\002\022 \n" + + "\023gcp_service_account\030\006 \001(\tB\003\340A\002\"\276\001\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022%\n" + + "!CONFLUENT_CLOUD_PERMISSION_DENIED\020\002\022\035\n" + + "\031PUBLISH_PERMISSION_DENIED\020\003\022 \n" + + "\034UNREACHABLE_BOOTSTRAP_SERVER\020\004\022\025\n" + + "\021CLUSTER_NOT_FOUND\020\005\022\023\n" + + "\017TOPIC_NOT_FOUND\020\006B\010\n" + + "\006source\"\277\001\n" + + "\024PlatformLogsSettings\022F\n" + + "\010severity\030\001" + + " \001(\0162/.google.pubsub.v1.PlatformLogsSettings.SeverityB\003\340A\001\"_\n" + + "\010Severity\022\030\n" + + "\024SEVERITY_UNSPECIFIED\020\000\022\014\n" + + "\010DISABLED\020\001\022\t\n" + + "\005DEBUG\020\002\022\010\n" + + "\004INFO\020\003\022\013\n" + + "\007WARNING\020\004\022\t\n" + + "\005ERROR\020\005\"\271\030\n" + + "\025IngestionFailureEvent\0222\n" + + "\005topic\030\001 \001(\tB#\340A\002\372A\035\n" + + "\033pubsub.googleapis.com/Topic\022\032\n\r" + + "error_message\030\002 \001(\tB\003\340A\002\022a\n" + + "\025cloud_storage_failure\030\003 \001(\0132;.google.pubsub.v1" + + ".IngestionFailureEvent.CloudStorageFailureB\003\340A\001H\000\022[\n" + + "\017aws_msk_failure\030\004 \001(\0132;.goo" + + "gle.pubsub.v1.IngestionFailureEvent.AwsMskFailureReasonB\003\340A\001H\000\022l\n" + + "\030azure_event_hubs_failure\030\005 \001(\0132C.google.pubsub.v1.Inge" + + "stionFailureEvent.AzureEventHubsFailureReasonB\003\340A\001H\000\022k\n" + + "\027confluent_cloud_failure\030\006 \001(\0132C.google.pubsub.v1.IngestionFailur" + + "eEvent.ConfluentCloudFailureReasonB\003\340A\001H\000\022c\n" + + "\023aws_kinesis_failure\030\007 \001(\0132?.google." + + "pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReasonB\003\340A\001H\000\032\024\n" + + "\022ApiViolationReason\032\023\n" + + "\021AvroFailureReason\032\027\n" + + "\025SchemaViolationReason\032$\n" + + "\"MessageTransformationFailureReason\032\230\004\n" + + "\023CloudStorageFailure\022\023\n" + + "\006bucket\030\001 \001(\tB\003\340A\001\022\030\n" + + "\013object_name\030\002 \001(\tB\003\340A\001\022\036\n" + + "\021object_generation\030\003 \001(\003B\003\340A\001\022]\n" + + "\023avro_failure_reason\030\005 \001(\01329.google.pubsub.v1." + + "IngestionFailureEvent.AvroFailureReasonB\003\340A\001H\000\022_\n" + + "\024api_violation_reason\030\006 \001(\0132:.g" + + "oogle.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\003\340A\001H\000\022e\n" + + "\027schema_violation_reason\030\007 \001(\0132=.google.pubsub.v1.Inge" + + "stionFailureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" + + "%message_transformation_failure_reason\030\010 \001(\0132J.google.pubsub.v1.Ingest" + + "ionFailureEvent.MessageTransformationFailureReasonB\003\340A\001H\000B\010\n" + + "\006reason\032\316\003\n" + + "\023AwsMskFailureReason\022\030\n" + + "\013cluster_arn\030\001 \001(\tB\003\340A\001\022\030\n" + + "\013kafka_topic\030\002 \001(\tB\003\340A\001\022\031\n" + + "\014partition_id\030\003 \001(\003B\003\340A\001\022\023\n" + + "\006offset\030\004 \001(\003B\003\340A\001\022_\n" + + "\024api_violation_reason\030\005 \001(\0132:.google.pubsub.v1" + + ".IngestionFailureEvent.ApiViolationReasonB\003\340A\001H\000\022e\n" + + "\027schema_violation_reason\030\006 \001(" + + "\0132=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" + + "%message_transformation_failure_reason\030\007 \001(\0132" + + "J.google.pubsub.v1.IngestionFailureEvent" + + ".MessageTransformationFailureReasonB\003\340A\001H\000B\010\n" + + "\006reason\032\322\003\n" + + "\033AzureEventHubsFailureReason\022\026\n" + + "\tnamespace\030\001 \001(\tB\003\340A\001\022\026\n" + + "\tevent_hub\030\002 \001(\tB\003\340A\001\022\031\n" + + "\014partition_id\030\003 \001(\003B\003\340A\001\022\023\n" + + "\006offset\030\004 \001(\003B\003\340A\001\022_\n" + + "\024api_violation_reason\030\005" + + " \001(\0132:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\003\340A\001H\000\022e\n" + + "\027schema_violation_reason\030\006 \001(\0132=.google." + + "pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" + + "%message_transformation_failure_reason\030\007 \001(\0132J.google.pu" + + "bsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonB\003\340A\001H\000B\010\n" + + "\006reason\032\325\003\n" + + "\033ConfluentCloudFailureReason\022\027\n\n" + + "cluster_id\030\001 \001(\tB\003\340A\001\022\030\n" + + "\013kafka_topic\030\002 \001(\tB\003\340A\001\022\031\n" + + "\014partition_id\030\003 \001(\003B\003\340A\001\022\023\n" + + "\006offset\030\004 \001(\003B\003\340A\001\022_\n" + + "\024api_violation_reason\030\005 \001" + + "(\0132:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\003\340A\001H\000\022e\n" + + "\027schema_violation_reason\030\006 \001(\0132=.google.pubsub.v" + + "1.IngestionFailureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" + + "%message_transformation_failure_reason\030\007 \001(\0132J.google.pubsub.v1." + + "IngestionFailureEvent.MessageTransformationFailureReasonB\003\340A\001H\000B\010\n" + + "\006reason\032\301\003\n" + + "\027AwsKinesisFailureReason\022\027\n\n" + + "stream_arn\030\001 \001(\tB\003\340A\001\022\032\n\r" + + "partition_key\030\002 \001(\tB\003\340A\001\022\034\n" + + "\017sequence_number\030\003 \001(\tB\003\340A\001\022e\n" + + "\027schema_violation_reason\030\004 \001(\0132=.google.pubsub.v1.Ing" + + "estionFailureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" + + "%message_transformation_failure_reason\030\005 \001(\0132J.google.pubsub.v1.Inges" + + "tionFailureEvent.MessageTransformationFailureReasonB\003\340A\001H\000\022_\n" + + "\024api_violation_reason\030\006" + + " \001(\0132:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\003\340A\001H\000B\010\n" + + "\006reasonB\t\n" + + "\007failure\">\n\r" + + "JavaScriptUDF\022\032\n\r" + + "function_name\030\001 \001(\tB\003\340A\002\022\021\n" + + "\004code\030\002 \001(\tB\003\340A\002\"\201\002\n" + + "\013AIInference\022\025\n" + + "\010endpoint\030\001 \001(\tB\003\340A\002\022Z\n" + + "\026unstructured_inference\030\002 \001(\01323.google" + + ".pubsub.v1.AIInference.UnstructuredInferenceB\003\340A\001H\000\022\"\n" + + "\025service_account_email\030\003 \001(\tB\003\340A\001\032I\n" + + "\025UnstructuredInference\0220\n\n" + + "parameters\030\001 \001(\0132\027.google.protobuf.StructB\003\340A\001B\020\n" + + "\016inference_mode\"\312\001\n" + + "\020MessageTransform\022>\n" + + "\016javascript_udf\030\002" + + " \001(\0132\037.google.pubsub.v1.JavaScriptUDFB\003\340A\001H\000\022:\n" + + "\014ai_inference\030\006" + + " \001(\0132\035.google.pubsub.v1.AIInferenceB\003\340A\001H\000\022\026\n" + + "\007enabled\030\003 \001(\010B\005\030\001\340A\001\022\025\n" + + "\010disabled\030\004 \001(\010B\003\340A\001B\013\n" + + "\ttransform\"\240\007\n" + + "\005Topic\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\002\340A\010\0228\n" + + "\006labels\030\002 \003(\0132#.google.pubsub.v1.Topic.LabelsEntryB\003\340A\001\022K\n" + + "\026message_storage_policy\030\003" + + " \001(\0132&.google.pubsub.v1.MessageStoragePolicyB\003\340A\001\022?\n" + + "\014kms_key_name\030\005 \001(\tB)\340A\001\372A#\n" + + "!cloudkms.googleapis.com/CryptoKey\022>\n" + + "\017schema_settings\030\006 \001(\0132" + + " .google.pubsub.v1.SchemaSettingsB\003\340A\001\022\032\n\r" + + "satisfies_pzs\030\007 \001(\010B\003\340A\001\022B\n" + + "\032message_retention_duration\030\010" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\0221\n" + + "\005state\030\t \001(\0162\035.google.pubsub.v1.Topic.StateB\003\340A\003\022Z\n" + + "\036ingestion_data_source_settings\030\n" + + " \001(\0132-.google.pubsub.v1.IngestionDataSourceSettingsB\003\340A\001\022C\n" + + "\022message_transforms\030\r" + + " \003(\0132\".google.pubsub.v1.MessageTransformB\003\340A\001\022:\n" + + "\004tags\030\016 \003(\0132!.google.pubsub.v1.Topic.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\"H\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022\034\n" + + "\030INGESTION_RESOURCE_ERROR\020\002:c\352A`\n" + + "\033pubsub.googleapis." + + "com/Topic\022!projects/{project}/topics/{topic}\022\017_deleted-topic_*\006topics2\005topic\"\200\002\n" + + "\r" + + "PubsubMessage\022\021\n" + + "\004data\030\001 \001(\014B\003\340A\001\022H\n\n" + + "attributes\030\002" + + " \003(\0132/.google.pubsub.v1.PubsubMessage.AttributesEntryB\003\340A\001\022\022\n\n" + + "message_id\030\003 \001(\t\0220\n" + + "\014publish_time\030\004 \001(\0132\032.google.protobuf.Timestamp\022\031\n" + + "\014ordering_key\030\005 \001(\tB\003\340A\001\0321\n" + + "\017AttributesEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"E\n" + + "\017GetTopicRequest\0222\n" + + "\005topic\030\001 \001(\tB#\340A\002\372A\035\n" + + "\033pubsub.googleapis.com/Topic\"w\n" + + "\022UpdateTopicRequest\022+\n" + + "\005topic\030\001 \001(\0132\027.google.pubsub.v1.TopicB\003\340A\002\0224\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"|\n" + + "\016PublishRequest\0222\n" + + "\005topic\030\001 \001(\tB#\340A\002\372A\035\n" + + "\033pubsub.googleapis.com/Topic\0226\n" + + "\010messages\030\002 \003(\0132\037.google.pubsub.v1.PubsubMessageB\003\340A\002\"+\n" + + "\017PublishResponse\022\030\n" + + "\013message_ids\030\001 \003(\tB\003\340A\001\"\212\001\n" + + "\021ListTopicsRequest\022D\n" + + "\007project\030\001 \001(\tB3\340A\002\372A-\n" + + "+cloudresourcemanager.googleapis.com/Project\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"`\n" + + "\022ListTopicsResponse\022,\n" + + "\006topics\030\001 \003(\0132\027.google.pubsub.v1.TopicB\003\340A\001\022\034\n" + + "\017next_page_token\030\002 \001(\tB\003\340A\001\"\204\001\n" + + "\035ListTopicSubscriptionsRequest\0222\n" + + "\005topic\030\001 \001(\tB#\340A\002\372A\035\n" + + "\033pubsub.googleapis.com/Topic\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"\201\001\n" + + "\036ListTopicSubscriptionsResponse\022A\n\r" + + "subscriptions\030\001 \003(\tB*\340A\001\372A$\n" + + "\"pubsub.googleapis.com/Subscription\022\034\n" + + "\017next_page_token\030\002 \001(\tB\003\340A\001\"\200\001\n" + + "\031ListTopicSnapshotsRequest\0222\n" + + "\005topic\030\001 \001(\tB#\340A\002\372A\035\n" + + "\033pubsub.googleapis.com/Topic\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"u\n" + + "\032ListTopicSnapshotsResponse\0229\n" + + "\tsnapshots\030\001 \003(\tB&\340A\001\372A \n" + + "\036pubsub.googleapis.com/Snapshot\022\034\n" + + "\017next_page_token\030\002 \001(\tB\003\340A\001\"H\n" + + "\022DeleteTopicRequest\0222\n" + + "\005topic\030\001 \001(\tB#\340A\002\372A\035\n" + + "\033pubsub.googleapis.com/Topic\"]\n" + + "\031DetachSubscriptionRequest\022@\n" + + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\"\034\n" + + "\032DetachSubscriptionResponse\"\350\014\n" + + "\014Subscription\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\002\340A\010\0222\n" + + "\005topic\030\002 \001(\tB#\340A\002\372A\035\n" + + "\033pubsub.googleapis.com/Topic\0226\n" + + "\013push_config\030\004" + + " \001(\0132\034.google.pubsub.v1.PushConfigB\003\340A\001\022>\n" + + "\017bigquery_config\030\022 \001(\0132" + + " .google.pubsub.v1.BigQueryConfigB\003\340A\001\022G\n" + + "\024cloud_storage_config\030\026" + + " \001(\0132$.google.pubsub.v1.CloudStorageConfigB\003\340A\001\022>\n" + + "\017bigtable_config\030\033 \001(\0132" + + " .google.pubsub.v1.BigtableConfigB\003\340A\001\022!\n" + + "\024ack_deadline_seconds\030\005 \001(\005B\003\340A\001\022\"\n" + + "\025retain_acked_messages\030\007 \001(\010B\003\340A\001\022B\n" + + "\032message_retention_duration\030\010" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\022?\n" + + "\006labels\030\t \003(\0132*.g" + + "oogle.pubsub.v1.Subscription.LabelsEntryB\003\340A\001\022$\n" + + "\027enable_message_ordering\030\n" + + " \001(\010B\003\340A\001\022B\n" + + "\021expiration_policy\030\013" + + " \001(\0132\".google.pubsub.v1.ExpirationPolicyB\003\340A\001\022\023\n" + + "\006filter\030\014 \001(\tB\003\340A\001\022C\n" + + "\022dead_letter_policy\030\r" + + " \001(\0132\".google.pubsub.v1.DeadLetterPolicyB\003\340A\001\0228\n" + + "\014retry_policy\030\016" + + " \001(\0132\035.google.pubsub.v1.RetryPolicyB\003\340A\001\022\025\n" + + "\010detached\030\017 \001(\010B\003\340A\001\022)\n" + + "\034enable_exactly_once_delivery\030\020 \001(\010B\003\340A\001\022H\n" + + " topic_message_retention_duration\030\021" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\003\0228\n" + + "\005state\030\023 \001(\0162$.google.pubsub.v1.Subscription.StateB\003\340A\003\022i\n" + + "\037analytics_hub_subscription_info\030\027 \001(\0132;.google.pubsub.v1.Su" + + "bscription.AnalyticsHubSubscriptionInfoB\003\340A\003\022C\n" + + "\022message_transforms\030\031" + + " \003(\0132\".google.pubsub.v1.MessageTransformB\003\340A\001\022A\n" + + "\004tags\030\032 \003(\0132(.google.pubsub.v1.Subscription.TagsEntryB" + + "\t\340A\004\340A\005\340A\001\032w\n" + + "\034AnalyticsHubSubscriptionInfo\022<\n" + + "\007listing\030\001 \001(\tB+\340A\001\372A%\n" + + "#analyticshub.googleapis.com/Listing\022\031\n" + + "\014subscription\030\002 \001(\tB\003\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\">\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022\022\n" + + "\016RESOURCE_ERROR\020\002:u\352Ar\n" + + "\"pubsub.googleapi" + + "s.com/Subscription\022/projects/{project}/subscriptions/{subscription}*\r" + + "subscriptions2\014subscription\"\177\n" + + "\013RetryPolicy\0227\n" + + "\017minimum_backoff\030\001" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\0227\n" + + "\017maximum_backoff\030\002 \001(\0132\031.google.protobuf.DurationB\003\340A\001\"v\n" + + "\020DeadLetterPolicy\022>\n" + + "\021dead_letter_topic\030\001 \001(\tB#\340A\001\372A\035\n" + + "\033pubsub.googleapis.com/Topic\022\"\n" + + "\025max_delivery_attempts\030\002 \001(\005B\003\340A\001\"?\n" + + "\020ExpirationPolicy\022+\n" + + "\003ttl\030\001 \001(\0132\031.google.protobuf.DurationB\003\340A\001\"\232\004\n\n" + + "PushConfig\022\032\n\r" + + "push_endpoint\030\001 \001(\tB\003\340A\001\022E\n\n" + + "attributes\030\002 \003(\0132,.goog" + + "le.pubsub.v1.PushConfig.AttributesEntryB\003\340A\001\022A\n\n" + + "oidc_token\030\003" + + " \001(\0132&.google.pubsub.v1.PushConfig.OidcTokenB\003\340A\001H\000\022I\n" + + "\016pubsub_wrapper\030\004" + + " \001(\0132*.google.pubsub.v1.PushConfig.PubsubWrapperB\003\340A\001H\001\022A\n\n" + + "no_wrapper\030\005" + + " \001(\0132&.google.pubsub.v1.PushConfig.NoWrapperB\003\340A\001H\001\032F\n" + + "\tOidcToken\022\"\n" + + "\025service_account_email\030\001 \001(\tB\003\340A\001\022\025\n" + + "\010audience\030\002 \001(\tB\003\340A\001\032\017\n\r" + + "PubsubWrapper\032(\n" + + "\tNoWrapper\022\033\n" + + "\016write_metadata\030\001 \001(\010B\003\340A\001\0321\n" + + "\017AttributesEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001B\027\n" + + "\025authentication_methodB\t\n" + + "\007wrapper\"\262\003\n" + + "\016BigQueryConfig\022\022\n" + + "\005table\030\001 \001(\tB\003\340A\001\022\035\n" + + "\020use_topic_schema\030\002 \001(\010B\003\340A\001\022\033\n" + + "\016write_metadata\030\003 \001(\010B\003\340A\001\022 \n" + + "\023drop_unknown_fields\030\004 \001(\010B\003\340A\001\022:\n" + + "\005state\030\005" + + " \001(\0162&.google.pubsub.v1.BigQueryConfig.StateB\003\340A\003\022\035\n" + + "\020use_table_schema\030\006 \001(\010B\003\340A\001\022\"\n" + + "\025service_account_email\030\007 \001(\tB\003\340A\001\"\256\001\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022\025\n" + + "\021PERMISSION_DENIED\020\002\022\r\n" + + "\tNOT_FOUND\020\003\022\023\n" + + "\017SCHEMA_MISMATCH\020\004\022#\n" + + "\037IN_TRANSIT_LOCATION_RESTRICTION\020\005\022\"\n" + + "\036VERTEX_AI_LOCATION_RESTRICTION\020\006\"\216\003\n" + + "\016BigtableConfig\022\022\n" + + "\005table\030\001 \001(\tB\003\340A\001\022\033\n" + + "\016app_profile_id\030\002 \001(\tB\003\340A\001\022\"\n" + + "\025service_account_email\030\003 \001(\tB\003\340A\001\022\033\n" + + "\016write_metadata\030\005 \001(\010B\003\340A\001\022:\n" + + "\005state\030\004" + + " \001(\0162&.google.pubsub.v1.BigtableConfig.StateB\003\340A\003\"\315\001\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022\r\n" + + "\tNOT_FOUND\020\002\022\035\n" + + "\031APP_PROFILE_MISCONFIGURED\020\003\022\025\n" + + "\021PERMISSION_DENIED\020\004\022\023\n" + + "\017SCHEMA_MISMATCH\020\005\022#\n" + + "\037IN_TRANSIT_LOCATION_RESTRICTION\020\006\022\"\n" + + "\036VERTEX_AI_LOCATION_RESTRICTION\020\007\"\215\006\n" + + "\022CloudStorageConfig\022\023\n" + + "\006bucket\030\001 \001(\tB\003\340A\002\022\034\n" + + "\017filename_prefix\030\002 \001(\tB\003\340A\001\022\034\n" + + "\017filename_suffix\030\003 \001(\tB\003\340A\001\022%\n" + + "\030filename_datetime_format\030\n" + + " \001(\tB\003\340A\001\022K\n" + + "\013text_config\030\004 \001(\0132/.goog" + + "le.pubsub.v1.CloudStorageConfig.TextConfigB\003\340A\001H\000\022K\n" + + "\013avro_config\030\005 \001(\0132/.google." + + "pubsub.v1.CloudStorageConfig.AvroConfigB\003\340A\001H\000\0224\n" + + "\014max_duration\030\006" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\022\026\n" + + "\tmax_bytes\030\007 \001(\003B\003\340A\001\022\031\n" + + "\014max_messages\030\010 \001(\003B\003\340A\001\022>\n" + + "\005state\030\t" + + " \001(\0162*.google.pubsub.v1.CloudStorageConfig.StateB\003\340A\003\022\"\n" + + "\025service_account_email\030\013 \001(\tB\003\340A\001\032\014\n\n" + + "TextConfig\032H\n\n" + + "AvroConfig\022\033\n" + + "\016write_metadata\030\001 \001(\010B\003\340A\001\022\035\n" + + "\020use_topic_schema\030\002 \001(\010B\003\340A\001\"\256\001\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022\025\n" + + "\021PERMISSION_DENIED\020\002\022\r\n" + + "\tNOT_FOUND\020\003\022#\n" + + "\037IN_TRANSIT_LOCATION_RESTRICTION\020\004\022\023\n" + + "\017SCHEMA_MISMATCH\020\005\022\"\n" + + "\036VERTEX_AI_LOCATION_RESTRICTION\020\006B\017\n\r" + + "output_format\"|\n" + + "\017ReceivedMessage\022\023\n" + + "\006ack_id\030\001 \001(\tB\003\340A\001\0225\n" + + "\007message\030\002" + + " \001(\0132\037.google.pubsub.v1.PubsubMessageB\003\340A\001\022\035\n" + + "\020delivery_attempt\030\003 \001(\005B\003\340A\001\"Z\n" + + "\026GetSubscriptionRequest\022@\n" + + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\"\214\001\n" + + "\031UpdateSubscriptionRequest\0229\n" + + "\014subscription\030\001 " + + "\001(\0132\036.google.pubsub.v1.SubscriptionB\003\340A\002\0224\n" + + "\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"\221\001\n" + + "\030ListSubscriptionsRequest\022D\n" + + "\007project\030\001 \001(\tB3\340A\002\372A-\n" + + "+cloudresourcemanager.googleapis.com/Project\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"u\n" + + "\031ListSubscriptionsResponse\022:\n\r" + + "subscriptions\030\001" + + " \003(\0132\036.google.pubsub.v1.SubscriptionB\003\340A\001\022\034\n" + + "\017next_page_token\030\002 \001(\tB\003\340A\001\"]\n" + + "\031DeleteSubscriptionRequest\022@\n" + + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\"\223\001\n" + + "\027ModifyPushConfigRequest\022@\n" + + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\0226\n" + + "\013push_config\030\002" + + " \001(\0132\034.google.pubsub.v1.PushConfigB\003\340A\002\"\215\001\n" + + "\013PullRequest\022@\n" + + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\022!\n" + + "\022return_immediately\030\002 \001(\010B\005\030\001\340A\001\022\031\n" + + "\014max_messages\030\003 \001(\005B\003\340A\002\"Q\n" + + "\014PullResponse\022A\n" + + "\021received_messages\030\001" + + " \003(\0132!.google.pubsub.v1.ReceivedMessageB\003\340A\001\"\225\001\n" + + "\030ModifyAckDeadlineRequest\022@\n" + + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\022\024\n" + + "\007ack_ids\030\004 \003(\tB\003\340A\002\022!\n" + + "\024ack_deadline_seconds\030\003 \001(\005B\003\340A\002\"l\n" + + "\022AcknowledgeRequest\022@\n" + + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\022\024\n" + + "\007ack_ids\030\002 \003(\tB\003\340A\002\"\346\002\n" + + "\024StreamingPullRequest\022@\n" + + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\022\024\n" + + "\007ack_ids\030\002 \003(\tB\003\340A\001\022$\n" + + "\027modify_deadline_seconds\030\003 \003(\005B\003\340A\001\022$\n" + + "\027modify_deadline_ack_ids\030\004 \003(\tB\003\340A\001\022(\n" + + "\033stream_ack_deadline_seconds\030\005 \001(\005B\003\340A\002\022\026\n" + + "\tclient_id\030\006 \001(\tB\003\340A\001\022%\n" + + "\030max_outstanding_messages\030\007 \001(\003B\003\340A\001\022\"\n" + + "\025max_outstanding_bytes\030\010 \001(\003B\003\340A\001\022\035\n" + + "\020protocol_version\030\n" + + " \001(\003B\003\340A\001\"\236\006\n" + + "\025StreamingPullResponse\022A\n" + + "\021received_messages\030\001" + + " \003(\0132!.google.pubsub.v1.ReceivedMessageB\003\340A\001\022f\n" + + "\030acknowl", + "edge_confirmation\030\005 \001(\0132?.google.pubsub." + + "v1.StreamingPullResponse.AcknowledgeConf" + + "irmationB\003\340A\001\022t\n modify_ack_deadline_con" + + "firmation\030\003 \001(\0132E.google.pubsub.v1.Strea" + + "mingPullResponse.ModifyAckDeadlineConfir" + + "mationB\003\340A\001\022d\n\027subscription_properties\030\004" + + " \001(\0132>.google.pubsub.v1.StreamingPullRes" + + "ponse.SubscriptionPropertiesB\003\340A\001\032\224\001\n\027Ac" + + "knowledgeConfirmation\022\024\n\007ack_ids\030\001 \003(\tB\003" + + "\340A\001\022\034\n\017invalid_ack_ids\030\002 \003(\tB\003\340A\001\022\036\n\021uno" + + "rdered_ack_ids\030\003 \003(\tB\003\340A\001\022%\n\030temporary_f" + + "ailed_ack_ids\030\004 \003(\tB\003\340A\001\032z\n\035ModifyAckDea" + + "dlineConfirmation\022\024\n\007ack_ids\030\001 \003(\tB\003\340A\001\022" + + "\034\n\017invalid_ack_ids\030\002 \003(\tB\003\340A\001\022%\n\030tempora" + + "ry_failed_ack_ids\030\003 \003(\tB\003\340A\001\032k\n\026Subscrip" + + "tionProperties\022*\n\035exactly_once_delivery_" + + "enabled\030\001 \001(\010B\003\340A\001\022%\n\030message_ordering_e" + + "nabled\030\002 \001(\010B\003\340A\001\"\201\003\n\025CreateSnapshotRequ" + + "est\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036pubsub.google" + + "apis.com/Snapshot\022@\n\014subscription\030\002 \001(\tB" + "*\340A\002\372A$\n\"pubsub.googleapis.com/Subscript" - + "ion\022!\n\022return_immediately\030\002 \001(\010B\005\030\001\340A\001\022\031" - + "\n\014max_messages\030\003 \001(\005B\003\340A\002\"Q\n\014PullRespons" - + "e\022A\n\021received_messages\030\001 \003(\0132!.google.pu" - + "bsub.v1.ReceivedMessageB\003\340A\001\"\225\001\n\030ModifyA" - + "ckDeadlineRequest\022@\n\014subscription\030\001 \001(\tB" - + "*\340A\002\372A$\n\"pubsub.googleapis.com/Subscript" - + "ion\022\024\n\007ack_ids\030\004 \003(\tB\003\340A\002\022!\n\024ack_deadlin" - + "e_seconds\030\003 \001(\005B\003\340A\002\"l\n\022AcknowledgeReque" - + "st\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub" - + ".googleapis.com/Subscription\022\024\n\007ack_ids\030" - + "\002 \003(\tB\003\340A\002\"\307\002\n\024StreamingPullRequest\022@\n\014s" - + "ubscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.google" - + "apis.com/Subscription\022\024\n\007ack_ids\030\002 \003(\tB\003" - + "\340A\001\022$\n\027modify_deadline_seconds\030\003 \003(\005B\003\340A" - + "\001\022$\n\027modify_deadline_ack_ids\030\004 \003(\tB\003\340A\001\022" - + "(\n\033stream_ack_deadline_seconds\030\005 \001(\005B\003\340A" - + "\002\022\026\n\tclient_id\030\006 \001(\tB\003\340A\001\022%\n\030max_outstan" - + "ding_messages\030\007 \001(\003B\003\340A\001\022\"\n\025max_outstand" - + "ing_bytes\030\010 \001(\003B\003\340A\001\"\236\006\n\025StreamingPullRe" - + "sponse\022A\n\021received_messages\030\001 \003(\0132!.goog" - + "le.pubsub.v1.ReceivedMessageB\003\340A\001\022f\n\030ack" - + "nowledge_confirmation\030\005 \001(\0132?.google.pub" - + "sub.v1.StreamingPullResponse.Acknowledge" - + "ConfirmationB\003\340A\001\022t\n modify_ack_deadline" - + "_confirmation\030\003 \001(\0132E.google.pubsub.v1.S" - + "treamingPullResponse.ModifyAckDeadlineCo" - + "nfirmationB\003\340A\001\022d\n\027subscription_properti" - + "es\030\004 \001(\0132>.google.pubsub.v1.StreamingPul" - + "lResponse.SubscriptionPropertiesB\003\340A\001\032\224\001" - + "\n\027AcknowledgeConfirmation\022\024\n\007ack_ids\030\001 \003" - + "(\tB\003\340A\001\022\034\n\017invalid_ack_ids\030\002 \003(\tB\003\340A\001\022\036\n" - + "\021unordered_ack_ids\030\003 \003(\tB\003\340A\001\022%\n\030tempora" - + "ry_failed_ack_ids\030\004 \003(\tB\003\340A\001\032z\n\035ModifyAc" - + "kDeadlineConfirmation\022\024\n\007ack_ids\030\001 \003(\tB\003" - + "\340A\001\022\034\n\017invalid_ack_ids\030\002 \003(\tB\003\340A\001\022%\n\030tem" - + "porary_failed_ack_ids\030\003 \003(\tB\003\340A\001\032k\n\026Subs" - + "criptionProperties\022*\n\035exactly_once_deliv" - + "ery_enabled\030\001 \001(\010B\003\340A\001\022%\n\030message_orderi" - + "ng_enabled\030\002 \001(\010B\003\340A\001\"\210\002\n\025CreateSnapshot" - + "Request\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036pubsub.go" - + "ogleapis.com/Snapshot\022@\n\014subscription\030\002 " - + "\001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subsc" - + "ription\022H\n\006labels\030\003 \003(\01323.google.pubsub." - + "v1.CreateSnapshotRequest.LabelsEntryB\003\340A" - + "\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" - + " \001(\t:\0028\001\"\200\001\n\025UpdateSnapshotRequest\0221\n\010sn" - + "apshot\030\001 \001(\0132\032.google.pubsub.v1.Snapshot" - + "B\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.prot" - + "obuf.FieldMaskB\003\340A\002\"\301\002\n\010Snapshot\022\021\n\004name" - + "\030\001 \001(\tB\003\340A\001\0222\n\005topic\030\002 \001(\tB#\340A\001\372A\035\n\033pubs" - + "ub.googleapis.com/Topic\0224\n\013expire_time\030\003" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\001\022;\n" - + "\006labels\030\004 \003(\0132&.google.pubsub.v1.Snapsho" - + "t.LabelsEntryB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key" - + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:L\352AI\n\036pubsub.g" - + "oogleapis.com/Snapshot\022\'projects/{projec" - + "t}/snapshots/{snapshot}\"N\n\022GetSnapshotRe" - + "quest\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub." - + "googleapis.com/Snapshot\"\215\001\n\024ListSnapshot" - + "sRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+cloud" - + "resourcemanager.googleapis.com/Project\022\026" - + "\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001" - + "(\tB\003\340A\001\"i\n\025ListSnapshotsResponse\0222\n\tsnap" - + "shots\030\001 \003(\0132\032.google.pubsub.v1.SnapshotB" - + "\003\340A\001\022\034\n\017next_page_token\030\002 \001(\tB\003\340A\001\"Q\n\025De" - + "leteSnapshotRequest\0228\n\010snapshot\030\001 \001(\tB&\340" - + "A\002\372A \n\036pubsub.googleapis.com/Snapshot\"\306\001" - + "\n\013SeekRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002" - + "\372A$\n\"pubsub.googleapis.com/Subscription\022" - + "/\n\004time\030\002 \001(\0132\032.google.protobuf.Timestam" - + "pB\003\340A\001H\000\022:\n\010snapshot\030\003 \001(\tB&\340A\001\372A \n\036pubs" - + "ub.googleapis.com/SnapshotH\000B\010\n\006target\"\016" - + "\n\014SeekResponse2\270\013\n\tPublisher\022q\n\013CreateTo" - + "pic\022\027.google.pubsub.v1.Topic\032\027.google.pu" - + "bsub.v1.Topic\"0\332A\004name\202\323\344\223\002#\032\036/v1/{name=" - + "projects/*/topics/*}:\001*\022\221\001\n\013UpdateTopic\022" - + "$.google.pubsub.v1.UpdateTopicRequest\032\027." - + "google.pubsub.v1.Topic\"C\332A\021topic,update_" - + "mask\202\323\344\223\002)2$/v1/{topic.name=projects/*/t" - + "opics/*}:\001*\022\223\001\n\007Publish\022 .google.pubsub." - + "v1.PublishRequest\032!.google.pubsub.v1.Pub" - + "lishResponse\"C\332A\016topic,messages\202\323\344\223\002,\"\'/" - + "v1/{topic=projects/*/topics/*}:publish:\001" - + "*\022w\n\010GetTopic\022!.google.pubsub.v1.GetTopi" - + "cRequest\032\027.google.pubsub.v1.Topic\"/\332A\005to" - + "pic\202\323\344\223\002!\022\037/v1/{topic=projects/*/topics/" - + "*}\022\212\001\n\nListTopics\022#.google.pubsub.v1.Lis" - + "tTopicsRequest\032$.google.pubsub.v1.ListTo" - + "picsResponse\"1\332A\007project\202\323\344\223\002!\022\037/v1/{pro" - + "ject=projects/*}/topics\022\272\001\n\026ListTopicSub" - + "scriptions\022/.google.pubsub.v1.ListTopicS" - + "ubscriptionsRequest\0320.google.pubsub.v1.L" - + "istTopicSubscriptionsResponse\"=\332A\005topic\202" - + "\323\344\223\002/\022-/v1/{topic=projects/*/topics/*}/s" - + "ubscriptions\022\252\001\n\022ListTopicSnapshots\022+.go" - + "ogle.pubsub.v1.ListTopicSnapshotsRequest" - + "\032,.google.pubsub.v1.ListTopicSnapshotsRe" - + "sponse\"9\332A\005topic\202\323\344\223\002+\022)/v1/{topic=proje" - + "cts/*/topics/*}/snapshots\022|\n\013DeleteTopic" - + "\022$.google.pubsub.v1.DeleteTopicRequest\032\026" - + ".google.protobuf.Empty\"/\332A\005topic\202\323\344\223\002!*\037" - + "/v1/{topic=projects/*/topics/*}\022\255\001\n\022Deta" - + "chSubscription\022+.google.pubsub.v1.Detach" - + "SubscriptionRequest\032,.google.pubsub.v1.D" - + "etachSubscriptionResponse\"<\202\323\344\223\0026\"4/v1/{" - + "subscription=projects/*/subscriptions/*}" - + ":detach\032p\312A\025pubsub.googleapis.com\322AUhttp" - + "s://www.googleapis.com/auth/cloud-platfo" - + "rm,https://www.googleapis.com/auth/pubsu" - + "b2\322\025\n\nSubscriber\022\264\001\n\022CreateSubscription\022" - + "\036.google.pubsub.v1.Subscription\032\036.google" - + ".pubsub.v1.Subscription\"^\332A+name,topic,p" - + "ush_config,ack_deadline_seconds\202\323\344\223\002*\032%/" - + "v1/{name=projects/*/subscriptions/*}:\001*\022" - + "\241\001\n\017GetSubscription\022(.google.pubsub.v1.G" - + "etSubscriptionRequest\032\036.google.pubsub.v1" - + ".Subscription\"D\332A\014subscription\202\323\344\223\002/\022-/v" - + "1/{subscription=projects/*/subscriptions" - + "/*}\022\273\001\n\022UpdateSubscription\022+.google.pubs" - + "ub.v1.UpdateSubscriptionRequest\032\036.google" - + ".pubsub.v1.Subscription\"X\332A\030subscription" - + ",update_mask\202\323\344\223\002722/v1/{subscription.na" - + "me=projects/*/subscriptions/*}:\001*\022\246\001\n\021Li" - + "stSubscriptions\022*.google.pubsub.v1.ListS" - + "ubscriptionsRequest\032+.google.pubsub.v1.L" - + "istSubscriptionsResponse\"8\332A\007project\202\323\344\223" - + "\002(\022&/v1/{project=projects/*}/subscriptio" - + "ns\022\237\001\n\022DeleteSubscription\022+.google.pubsu" - + "b.v1.DeleteSubscriptionRequest\032\026.google." - + "protobuf.Empty\"D\332A\014subscription\202\323\344\223\002/*-/" - + "v1/{subscription=projects/*/subscription" - + "s/*}\022\317\001\n\021ModifyAckDeadline\022*.google.pubs" - + "ub.v1.ModifyAckDeadlineRequest\032\026.google." - + "protobuf.Empty\"v\332A)subscription,ack_ids," - + "ack_deadline_seconds\202\323\344\223\002D\"?/v1/{subscri" - + "ption=projects/*/subscriptions/*}:modify" - + "AckDeadline:\001*\022\250\001\n\013Acknowledge\022$.google." - + "pubsub.v1.AcknowledgeRequest\032\026.google.pr" - + "otobuf.Empty\"[\332A\024subscription,ack_ids\202\323\344" - + "\223\002>\"9/v1/{subscription=projects/*/subscr" - + "iptions/*}:acknowledge:\001*\022\320\001\n\004Pull\022\035.goo" - + "gle.pubsub.v1.PullRequest\032\036.google.pubsu" - + "b.v1.PullResponse\"\210\001\332A,subscription,retu" - + "rn_immediately,max_messages\332A\031subscripti" - + "on,max_messages\202\323\344\223\0027\"2/v1/{subscription" - + "=projects/*/subscriptions/*}:pull:\001*\022f\n\r" - + "StreamingPull\022&.google.pubsub.v1.Streami" - + "ngPullRequest\032\'.google.pubsub.v1.Streami" - + "ngPullResponse\"\000(\0010\001\022\273\001\n\020ModifyPushConfi" - + "g\022).google.pubsub.v1.ModifyPushConfigReq" - + "uest\032\026.google.protobuf.Empty\"d\332A\030subscri" - + "ption,push_config\202\323\344\223\002C\">/v1/{subscripti" - + "on=projects/*/subscriptions/*}:modifyPus" - + "hConfig:\001*\022\211\001\n\013GetSnapshot\022$.google.pubs" - + "ub.v1.GetSnapshotRequest\032\032.google.pubsub" - + ".v1.Snapshot\"8\332A\010snapshot\202\323\344\223\002\'\022%/v1/{sn" - + "apshot=projects/*/snapshots/*}\022\226\001\n\rListS" - + "napshots\022&.google.pubsub.v1.ListSnapshot" - + "sRequest\032\'.google.pubsub.v1.ListSnapshot" - + "sResponse\"4\332A\007project\202\323\344\223\002$\022\"/v1/{projec" - + "t=projects/*}/snapshots\022\227\001\n\016CreateSnapsh" - + "ot\022\'.google.pubsub.v1.CreateSnapshotRequ" - + "est\032\032.google.pubsub.v1.Snapshot\"@\332A\021name" - + ",subscription\202\323\344\223\002&\032!/v1/{name=projects/" - + "*/snapshots/*}:\001*\022\243\001\n\016UpdateSnapshot\022\'.g" - + "oogle.pubsub.v1.UpdateSnapshotRequest\032\032." - + "google.pubsub.v1.Snapshot\"L\332A\024snapshot,u" - + "pdate_mask\202\323\344\223\002/2*/v1/{snapshot.name=pro", - "jects/*/snapshots/*}:\001*\022\213\001\n\016DeleteSnapsh" - + "ot\022\'.google.pubsub.v1.DeleteSnapshotRequ" - + "est\032\026.google.protobuf.Empty\"8\332A\010snapshot" - + "\202\323\344\223\002\'*%/v1/{snapshot=projects/*/snapsho" - + "ts/*}\022\204\001\n\004Seek\022\035.google.pubsub.v1.SeekRe" - + "quest\032\036.google.pubsub.v1.SeekResponse\"=\202" - + "\323\344\223\0027\"2/v1/{subscription=projects/*/subs" - + "criptions/*}:seek:\001*\032p\312A\025pubsub.googleap" - + "is.com\322AUhttps://www.googleapis.com/auth" - + "/cloud-platform,https://www.googleapis.c" - + "om/auth/pubsubB\252\001\n\024com.google.pubsub.v1B" - + "\013PubsubProtoP\001Z2cloud.google.com/go/pubs" - + "ub/apiv1/pubsubpb;pubsubpb\370\001\001\252\002\026Google.C" - + "loud.PubSub.V1\312\002\026Google\\Cloud\\PubSub\\V1\352" - + "\002\031Google::Cloud::PubSub::V1b\006proto3" + + "ion\022H\n\006labels\030\003 \003(\01323.google.pubsub.v1.C" + + "reateSnapshotRequest.LabelsEntryB\003\340A\001\022J\n" + + "\004tags\030\004 \003(\01321.google.pubsub.v1.CreateSna" + + "pshotRequest.TagsEntryB\t\340A\004\340A\005\340A\001\032-\n\013Lab" + + "elsEntry\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\"\200\001\n\025UpdateSnapshotRequest\0221\n\010snaps" + + "hot\030\001 \001(\0132\032.google.pubsub.v1.SnapshotB\003\340" + + "A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.protobu" + + "f.FieldMaskB\003\340A\002\"\326\002\n\010Snapshot\022\021\n\004name\030\001 " + + "\001(\tB\003\340A\001\0222\n\005topic\030\002 \001(\tB#\340A\001\372A\035\n\033pubsub." + + "googleapis.com/Topic\0224\n\013expire_time\030\003 \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\001\022;\n\006la" + + "bels\030\004 \003(\0132&.google.pubsub.v1.Snapshot.L" + + "abelsEntryB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:a\352A^\n\036pubsub.goog" + + "leapis.com/Snapshot\022\'projects/{project}/" + + "snapshots/{snapshot}*\tsnapshots2\010snapsho" + + "t\"N\n\022GetSnapshotRequest\0228\n\010snapshot\030\001 \001(" + + "\tB&\340A\002\372A \n\036pubsub.googleapis.com/Snapsho" + + "t\"\215\001\n\024ListSnapshotsRequest\022D\n\007project\030\001 " + + "\001(\tB3\340A\002\372A-\n+cloudresourcemanager.google" + + "apis.com/Project\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001" + + "\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"i\n\025ListSnapsho" + + "tsResponse\0222\n\tsnapshots\030\001 \003(\0132\032.google.p" + + "ubsub.v1.SnapshotB\003\340A\001\022\034\n\017next_page_toke" + + "n\030\002 \001(\tB\003\340A\001\"Q\n\025DeleteSnapshotRequest\0228\n" + + "\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub.googleap" + + "is.com/Snapshot\"\306\001\n\013SeekRequest\022@\n\014subsc" + + "ription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis" + + ".com/Subscription\022/\n\004time\030\002 \001(\0132\032.google" + + ".protobuf.TimestampB\003\340A\001H\000\022:\n\010snapshot\030\003" + + " \001(\tB&\340A\001\372A \n\036pubsub.googleapis.com/Snap" + + "shotH\000B\010\n\006target\"\016\n\014SeekResponse2\270\013\n\tPub" + + "lisher\022q\n\013CreateTopic\022\027.google.pubsub.v1" + + ".Topic\032\027.google.pubsub.v1.Topic\"0\332A\004name" + + "\202\323\344\223\002#\032\036/v1/{name=projects/*/topics/*}:\001" + + "*\022\221\001\n\013UpdateTopic\022$.google.pubsub.v1.Upd" + + "ateTopicRequest\032\027.google.pubsub.v1.Topic" + + "\"C\332A\021topic,update_mask\202\323\344\223\002)2$/v1/{topic" + + ".name=projects/*/topics/*}:\001*\022\223\001\n\007Publis" + + "h\022 .google.pubsub.v1.PublishRequest\032!.go" + + "ogle.pubsub.v1.PublishResponse\"C\332A\016topic" + + ",messages\202\323\344\223\002,\"\'/v1/{topic=projects/*/t" + + "opics/*}:publish:\001*\022w\n\010GetTopic\022!.google" + + ".pubsub.v1.GetTopicRequest\032\027.google.pubs" + + "ub.v1.Topic\"/\332A\005topic\202\323\344\223\002!\022\037/v1/{topic=" + + "projects/*/topics/*}\022\212\001\n\nListTopics\022#.go" + + "ogle.pubsub.v1.ListTopicsRequest\032$.googl" + + "e.pubsub.v1.ListTopicsResponse\"1\332A\007proje" + + "ct\202\323\344\223\002!\022\037/v1/{project=projects/*}/topic" + + "s\022\272\001\n\026ListTopicSubscriptions\022/.google.pu" + + "bsub.v1.ListTopicSubscriptionsRequest\0320." + + "google.pubsub.v1.ListTopicSubscriptionsR" + + "esponse\"=\332A\005topic\202\323\344\223\002/\022-/v1/{topic=proj" + + "ects/*/topics/*}/subscriptions\022\252\001\n\022ListT" + + "opicSnapshots\022+.google.pubsub.v1.ListTop" + + "icSnapshotsRequest\032,.google.pubsub.v1.Li" + + "stTopicSnapshotsResponse\"9\332A\005topic\202\323\344\223\002+" + + "\022)/v1/{topic=projects/*/topics/*}/snapsh" + + "ots\022|\n\013DeleteTopic\022$.google.pubsub.v1.De" + + "leteTopicRequest\032\026.google.protobuf.Empty" + + "\"/\332A\005topic\202\323\344\223\002!*\037/v1/{topic=projects/*/" + + "topics/*}\022\255\001\n\022DetachSubscription\022+.googl" + + "e.pubsub.v1.DetachSubscriptionRequest\032,." + + "google.pubsub.v1.DetachSubscriptionRespo" + + "nse\"<\202\323\344\223\0026\"4/v1/{subscription=projects/" + + "*/subscriptions/*}:detach\032p\312A\025pubsub.goo" + + "gleapis.com\322AUhttps://www.googleapis.com" + + "/auth/cloud-platform,https://www.googlea" + + "pis.com/auth/pubsub2\322\025\n\nSubscriber\022\264\001\n\022C" + + "reateSubscription\022\036.google.pubsub.v1.Sub" + + "scription\032\036.google.pubsub.v1.Subscriptio" + + "n\"^\332A+name,topic,push_config,ack_deadlin" + + "e_seconds\202\323\344\223\002*\032%/v1/{name=projects/*/su" + + "bscriptions/*}:\001*\022\241\001\n\017GetSubscription\022(." + + "google.pubsub.v1.GetSubscriptionRequest\032" + + "\036.google.pubsub.v1.Subscription\"D\332A\014subs" + + "cription\202\323\344\223\002/\022-/v1/{subscription=projec" + + "ts/*/subscriptions/*}\022\273\001\n\022UpdateSubscrip" + + "tion\022+.google.pubsub.v1.UpdateSubscripti" + + "onRequest\032\036.google.pubsub.v1.Subscriptio" + + "n\"X\332A\030subscription,update_mask\202\323\344\223\002722/v" + + "1/{subscription.name=projects/*/subscrip" + + "tions/*}:\001*\022\246\001\n\021ListSubscriptions\022*.goog" + + "le.pubsub.v1.ListSubscriptionsRequest\032+." + + "google.pubsub.v1.ListSubscriptionsRespon" + + "se\"8\332A\007project\202\323\344\223\002(\022&/v1/{project=proje" + + "cts/*}/subscriptions\022\237\001\n\022DeleteSubscript" + + "ion\022+.google.pubsub.v1.DeleteSubscriptio" + + "nRequest\032\026.google.protobuf.Empty\"D\332A\014sub" + + "scription\202\323\344\223\002/*-/v1/{subscription=proje" + + "cts/*/subscriptions/*}\022\317\001\n\021ModifyAckDead" + + "line\022*.google.pubsub.v1.ModifyAckDeadlin" + + "eRequest\032\026.google.protobuf.Empty\"v\332A)sub" + + "scription,ack_ids,ack_deadline_seconds\202\323" + + "\344\223\002D\"?/v1/{subscription=projects/*/subsc" + + "riptions/*}:modifyAckDeadline:\001*\022\250\001\n\013Ack" + + "nowledge\022$.google.pubsub.v1.AcknowledgeR" + + "equest\032\026.google.protobuf.Empty\"[\332A\024subsc" + + "ription,ack_ids\202\323\344\223\002>\"9/v1/{subscription" + + "=projects/*/subscriptions/*}:acknowledge" + + ":\001*\022\320\001\n\004Pull\022\035.google.pubsub.v1.PullRequ" + + "est\032\036.google.pubsub.v1.PullResponse\"\210\001\332A" + + ",subscription,return_immediately,max_mes" + + "sages\332A\031subscription,max_messages\202\323\344\223\0027\"" + + "2/v1/{subscription=projects/*/subscripti" + + "ons/*}:pull:\001*\022f\n\rStreamingPull\022&.google" + + ".pubsub.v1.StreamingPullRequest\032\'.google" + + ".pubsub.v1.StreamingPullResponse\"\000(\0010\001\022\273" + + "\001\n\020ModifyPushConfig\022).google.pubsub.v1.M" + + "odifyPushConfigRequest\032\026.google.protobuf" + + ".Empty\"d\332A\030subscription,push_config\202\323\344\223\002" + + "C\">/v1/{subscription=projects/*/subscrip" + + "tions/*}:modifyPushConfig:\001*\022\211\001\n\013GetSnap" + + "shot\022$.google.pubsub.v1.GetSnapshotReque" + + "st\032\032.google.pubsub.v1.Snapshot\"8\332A\010snaps" + + "hot\202\323\344\223\002\'\022%/v1/{snapshot=projects/*/snap" + + "shots/*}\022\226\001\n\rListSnapshots\022&.google.pubs" + + "ub.v1.ListSnapshotsRequest\032\'.google.pubs" + + "ub.v1.ListSnapshotsResponse\"4\332A\007project\202" + + "\323\344\223\002$\022\"/v1/{project=projects/*}/snapshot" + + "s\022\227\001\n\016CreateSnapshot\022\'.google.pubsub.v1." + + "CreateSnapshotRequest\032\032.google.pubsub.v1" + + ".Snapshot\"@\332A\021name,subscription\202\323\344\223\002&\032!/" + + "v1/{name=projects/*/snapshots/*}:\001*\022\243\001\n\016" + + "UpdateSnapshot\022\'.google.pubsub.v1.Update" + + "SnapshotRequest\032\032.google.pubsub.v1.Snaps" + + "hot\"L\332A\024snapshot,update_mask\202\323\344\223\002/2*/v1/" + + "{snapshot.name=projects/*/snapshots/*}:\001" + + "*\022\213\001\n\016DeleteSnapshot\022\'.google.pubsub.v1." + + "DeleteSnapshotRequest\032\026.google.protobuf." + + "Empty\"8\332A\010snapshot\202\323\344\223\002\'*%/v1/{snapshot=" + + "projects/*/snapshots/*}\022\204\001\n\004Seek\022\035.googl" + + "e.pubsub.v1.SeekRequest\032\036.google.pubsub." + + "v1.SeekResponse\"=\202\323\344\223\0027\"2/v1/{subscripti" + + "on=projects/*/subscriptions/*}:seek:\001*\032p" + + "\312A\025pubsub.googleapis.com\322AUhttps://www.g" + + "oogleapis.com/auth/cloud-platform,https:" + + "//www.googleapis.com/auth/pubsubB\247\003\n\024com" + + ".google.pubsub.v1B\013PubsubProtoP\001Z5cloud." + + "google.com/go/pubsub/v2/apiv1/pubsubpb;p" + + "ubsubpb\252\002\026Google.Cloud.PubSub.V1\312\002\026Googl" + + "e\\Cloud\\PubSub\\V1\352\002\031Google::Cloud::PubSu" + + "b::V1\352Ax\n!cloudkms.googleapis.com/Crypto" + + "Key\022Sprojects/{project}/locations/{locat" + + "ion}/keyRings/{key_ring}/cryptoKeys/{cry" + + "pto_key}\352A\177\n#analyticshub.googleapis.com" + + "/Listing\022Xprojects/{project}/locations/{" + + "location}/dataExchanges/{data_exchange}/" + + "listings/{listing}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -752,49 +1119,51 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.pubsub.v1.SchemaProto.getDescriptor(), }); internal_static_google_pubsub_v1_MessageStoragePolicy_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_pubsub_v1_MessageStoragePolicy_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_MessageStoragePolicy_descriptor, new java.lang.String[] { "AllowedPersistenceRegions", "EnforceInTransit", }); - internal_static_google_pubsub_v1_SchemaSettings_descriptor = - getDescriptor().getMessageTypes().get(1); + internal_static_google_pubsub_v1_SchemaSettings_descriptor = getDescriptor().getMessageType(1); internal_static_google_pubsub_v1_SchemaSettings_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_SchemaSettings_descriptor, new java.lang.String[] { "Schema", "Encoding", "FirstRevisionId", "LastRevisionId", }); internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageType(2); internal_static_google_pubsub_v1_IngestionDataSourceSettings_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor, new java.lang.String[] { - "AwsKinesis", "CloudStorage", "PlatformLogsSettings", "Source", + "AwsKinesis", + "CloudStorage", + "AzureEventHubs", + "AwsMsk", + "ConfluentCloud", + "PlatformLogsSettings", + "Source", }); internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsKinesis_descriptor = - internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor - .getNestedTypes() - .get(0); + internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor.getNestedType(0); internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsKinesis_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsKinesis_descriptor, new java.lang.String[] { "State", "StreamArn", "ConsumerArn", "AwsRoleArn", "GcpServiceAccount", }); internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_descriptor = - internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor - .getNestedTypes() - .get(1); + internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor.getNestedType(1); internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_descriptor, new java.lang.String[] { "State", @@ -808,62 +1177,114 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { }); internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_TextFormat_descriptor = internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_descriptor - .getNestedTypes() - .get(0); + .getNestedType(0); internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_TextFormat_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_TextFormat_descriptor, new java.lang.String[] { "Delimiter", }); internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_AvroFormat_descriptor = internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_descriptor - .getNestedTypes() - .get(1); + .getNestedType(1); internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_AvroFormat_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_AvroFormat_descriptor, new java.lang.String[] {}); internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat_descriptor = internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_descriptor - .getNestedTypes() - .get(2); + .getNestedType(2); internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat_descriptor, new java.lang.String[] {}); + internal_static_google_pubsub_v1_IngestionDataSourceSettings_AzureEventHubs_descriptor = + internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor.getNestedType(2); + internal_static_google_pubsub_v1_IngestionDataSourceSettings_AzureEventHubs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_IngestionDataSourceSettings_AzureEventHubs_descriptor, + new java.lang.String[] { + "State", + "ResourceGroup", + "Namespace", + "EventHub", + "ClientId", + "TenantId", + "SubscriptionId", + "GcpServiceAccount", + }); + internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsMsk_descriptor = + internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor.getNestedType(3); + internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsMsk_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsMsk_descriptor, + new java.lang.String[] { + "State", "ClusterArn", "Topic", "AwsRoleArn", "GcpServiceAccount", + }); + internal_static_google_pubsub_v1_IngestionDataSourceSettings_ConfluentCloud_descriptor = + internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor.getNestedType(4); + internal_static_google_pubsub_v1_IngestionDataSourceSettings_ConfluentCloud_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_IngestionDataSourceSettings_ConfluentCloud_descriptor, + new java.lang.String[] { + "State", + "BootstrapServer", + "ClusterId", + "Topic", + "IdentityPoolId", + "GcpServiceAccount", + }); internal_static_google_pubsub_v1_PlatformLogsSettings_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageType(3); internal_static_google_pubsub_v1_PlatformLogsSettings_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_PlatformLogsSettings_descriptor, new java.lang.String[] { "Severity", }); internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageType(4); internal_static_google_pubsub_v1_IngestionFailureEvent_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor, new java.lang.String[] { - "Topic", "ErrorMessage", "CloudStorageFailure", "Failure", + "Topic", + "ErrorMessage", + "CloudStorageFailure", + "AwsMskFailure", + "AzureEventHubsFailure", + "ConfluentCloudFailure", + "AwsKinesisFailure", + "Failure", }); internal_static_google_pubsub_v1_IngestionFailureEvent_ApiViolationReason_descriptor = - internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor.getNestedTypes().get(0); + internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor.getNestedType(0); internal_static_google_pubsub_v1_IngestionFailureEvent_ApiViolationReason_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_IngestionFailureEvent_ApiViolationReason_descriptor, new java.lang.String[] {}); internal_static_google_pubsub_v1_IngestionFailureEvent_AvroFailureReason_descriptor = - internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor.getNestedTypes().get(1); + internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor.getNestedType(1); internal_static_google_pubsub_v1_IngestionFailureEvent_AvroFailureReason_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_IngestionFailureEvent_AvroFailureReason_descriptor, new java.lang.String[] {}); + internal_static_google_pubsub_v1_IngestionFailureEvent_SchemaViolationReason_descriptor = + internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor.getNestedType(2); + internal_static_google_pubsub_v1_IngestionFailureEvent_SchemaViolationReason_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_IngestionFailureEvent_SchemaViolationReason_descriptor, + new java.lang.String[] {}); + internal_static_google_pubsub_v1_IngestionFailureEvent_MessageTransformationFailureReason_descriptor = + internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor.getNestedType(3); + internal_static_google_pubsub_v1_IngestionFailureEvent_MessageTransformationFailureReason_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_IngestionFailureEvent_MessageTransformationFailureReason_descriptor, + new java.lang.String[] {}); internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_descriptor = - internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor.getNestedTypes().get(2); + internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor.getNestedType(4); internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_IngestionFailureEvent_CloudStorageFailure_descriptor, new java.lang.String[] { "Bucket", @@ -871,11 +1292,102 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ObjectGeneration", "AvroFailureReason", "ApiViolationReason", + "SchemaViolationReason", + "MessageTransformationFailureReason", + "Reason", + }); + internal_static_google_pubsub_v1_IngestionFailureEvent_AwsMskFailureReason_descriptor = + internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor.getNestedType(5); + internal_static_google_pubsub_v1_IngestionFailureEvent_AwsMskFailureReason_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_IngestionFailureEvent_AwsMskFailureReason_descriptor, + new java.lang.String[] { + "ClusterArn", + "KafkaTopic", + "PartitionId", + "Offset", + "ApiViolationReason", + "SchemaViolationReason", + "MessageTransformationFailureReason", + "Reason", + }); + internal_static_google_pubsub_v1_IngestionFailureEvent_AzureEventHubsFailureReason_descriptor = + internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor.getNestedType(6); + internal_static_google_pubsub_v1_IngestionFailureEvent_AzureEventHubsFailureReason_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_IngestionFailureEvent_AzureEventHubsFailureReason_descriptor, + new java.lang.String[] { + "Namespace", + "EventHub", + "PartitionId", + "Offset", + "ApiViolationReason", + "SchemaViolationReason", + "MessageTransformationFailureReason", + "Reason", + }); + internal_static_google_pubsub_v1_IngestionFailureEvent_ConfluentCloudFailureReason_descriptor = + internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor.getNestedType(7); + internal_static_google_pubsub_v1_IngestionFailureEvent_ConfluentCloudFailureReason_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_IngestionFailureEvent_ConfluentCloudFailureReason_descriptor, + new java.lang.String[] { + "ClusterId", + "KafkaTopic", + "PartitionId", + "Offset", + "ApiViolationReason", + "SchemaViolationReason", + "MessageTransformationFailureReason", + "Reason", + }); + internal_static_google_pubsub_v1_IngestionFailureEvent_AwsKinesisFailureReason_descriptor = + internal_static_google_pubsub_v1_IngestionFailureEvent_descriptor.getNestedType(8); + internal_static_google_pubsub_v1_IngestionFailureEvent_AwsKinesisFailureReason_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_IngestionFailureEvent_AwsKinesisFailureReason_descriptor, + new java.lang.String[] { + "StreamArn", + "PartitionKey", + "SequenceNumber", + "SchemaViolationReason", + "MessageTransformationFailureReason", + "ApiViolationReason", "Reason", }); - internal_static_google_pubsub_v1_Topic_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_google_pubsub_v1_JavaScriptUDF_descriptor = getDescriptor().getMessageType(5); + internal_static_google_pubsub_v1_JavaScriptUDF_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_JavaScriptUDF_descriptor, + new java.lang.String[] { + "FunctionName", "Code", + }); + internal_static_google_pubsub_v1_AIInference_descriptor = getDescriptor().getMessageType(6); + internal_static_google_pubsub_v1_AIInference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_AIInference_descriptor, + new java.lang.String[] { + "Endpoint", "UnstructuredInference", "ServiceAccountEmail", "InferenceMode", + }); + internal_static_google_pubsub_v1_AIInference_UnstructuredInference_descriptor = + internal_static_google_pubsub_v1_AIInference_descriptor.getNestedType(0); + internal_static_google_pubsub_v1_AIInference_UnstructuredInference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_AIInference_UnstructuredInference_descriptor, + new java.lang.String[] { + "Parameters", + }); + internal_static_google_pubsub_v1_MessageTransform_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_pubsub_v1_MessageTransform_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_MessageTransform_descriptor, + new java.lang.String[] { + "JavascriptUdf", "AiInference", "Enabled", "Disabled", "Transform", + }); + internal_static_google_pubsub_v1_Topic_descriptor = getDescriptor().getMessageType(8); internal_static_google_pubsub_v1_Topic_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_Topic_descriptor, new java.lang.String[] { "Name", @@ -887,137 +1399,144 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MessageRetentionDuration", "State", "IngestionDataSourceSettings", + "MessageTransforms", + "Tags", }); internal_static_google_pubsub_v1_Topic_LabelsEntry_descriptor = - internal_static_google_pubsub_v1_Topic_descriptor.getNestedTypes().get(0); + internal_static_google_pubsub_v1_Topic_descriptor.getNestedType(0); internal_static_google_pubsub_v1_Topic_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_Topic_LabelsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); - internal_static_google_pubsub_v1_PubsubMessage_descriptor = - getDescriptor().getMessageTypes().get(6); + internal_static_google_pubsub_v1_Topic_TagsEntry_descriptor = + internal_static_google_pubsub_v1_Topic_descriptor.getNestedType(1); + internal_static_google_pubsub_v1_Topic_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_Topic_TagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_pubsub_v1_PubsubMessage_descriptor = getDescriptor().getMessageType(9); internal_static_google_pubsub_v1_PubsubMessage_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_PubsubMessage_descriptor, new java.lang.String[] { "Data", "Attributes", "MessageId", "PublishTime", "OrderingKey", }); internal_static_google_pubsub_v1_PubsubMessage_AttributesEntry_descriptor = - internal_static_google_pubsub_v1_PubsubMessage_descriptor.getNestedTypes().get(0); + internal_static_google_pubsub_v1_PubsubMessage_descriptor.getNestedType(0); internal_static_google_pubsub_v1_PubsubMessage_AttributesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_PubsubMessage_AttributesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_pubsub_v1_GetTopicRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageType(10); internal_static_google_pubsub_v1_GetTopicRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_GetTopicRequest_descriptor, new java.lang.String[] { "Topic", }); internal_static_google_pubsub_v1_UpdateTopicRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageType(11); internal_static_google_pubsub_v1_UpdateTopicRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateTopicRequest_descriptor, new java.lang.String[] { "Topic", "UpdateMask", }); - internal_static_google_pubsub_v1_PublishRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + internal_static_google_pubsub_v1_PublishRequest_descriptor = getDescriptor().getMessageType(12); internal_static_google_pubsub_v1_PublishRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_PublishRequest_descriptor, new java.lang.String[] { "Topic", "Messages", }); internal_static_google_pubsub_v1_PublishResponse_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageType(13); internal_static_google_pubsub_v1_PublishResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_PublishResponse_descriptor, new java.lang.String[] { "MessageIds", }); internal_static_google_pubsub_v1_ListTopicsRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageType(14); internal_static_google_pubsub_v1_ListTopicsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicsRequest_descriptor, new java.lang.String[] { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListTopicsResponse_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageType(15); internal_static_google_pubsub_v1_ListTopicsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicsResponse_descriptor, new java.lang.String[] { "Topics", "NextPageToken", }); internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageType(16); internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_descriptor, new java.lang.String[] { "Topic", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageType(17); internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_descriptor, new java.lang.String[] { "Subscriptions", "NextPageToken", }); internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageType(18); internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_descriptor, new java.lang.String[] { "Topic", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageType(19); internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_descriptor, new java.lang.String[] { "Snapshots", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageType(20); internal_static_google_pubsub_v1_DeleteTopicRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor, new java.lang.String[] { "Topic", }); internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageType(21); internal_static_google_pubsub_v1_DetachSubscriptionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor, new java.lang.String[] { "Subscription", }); internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageType(22); internal_static_google_pubsub_v1_DetachSubscriptionResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor, new java.lang.String[] {}); - internal_static_google_pubsub_v1_Subscription_descriptor = - getDescriptor().getMessageTypes().get(20); + internal_static_google_pubsub_v1_Subscription_descriptor = getDescriptor().getMessageType(23); internal_static_google_pubsub_v1_Subscription_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_Subscription_descriptor, new java.lang.String[] { "Name", @@ -1025,6 +1544,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PushConfig", "BigqueryConfig", "CloudStorageConfig", + "BigtableConfig", "AckDeadlineSeconds", "RetainAckedMessages", "MessageRetentionDuration", @@ -1039,51 +1559,59 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TopicMessageRetentionDuration", "State", "AnalyticsHubSubscriptionInfo", + "MessageTransforms", + "Tags", }); internal_static_google_pubsub_v1_Subscription_AnalyticsHubSubscriptionInfo_descriptor = - internal_static_google_pubsub_v1_Subscription_descriptor.getNestedTypes().get(0); + internal_static_google_pubsub_v1_Subscription_descriptor.getNestedType(0); internal_static_google_pubsub_v1_Subscription_AnalyticsHubSubscriptionInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_Subscription_AnalyticsHubSubscriptionInfo_descriptor, new java.lang.String[] { "Listing", "Subscription", }); internal_static_google_pubsub_v1_Subscription_LabelsEntry_descriptor = - internal_static_google_pubsub_v1_Subscription_descriptor.getNestedTypes().get(1); + internal_static_google_pubsub_v1_Subscription_descriptor.getNestedType(1); internal_static_google_pubsub_v1_Subscription_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_Subscription_LabelsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); - internal_static_google_pubsub_v1_RetryPolicy_descriptor = - getDescriptor().getMessageTypes().get(21); + internal_static_google_pubsub_v1_Subscription_TagsEntry_descriptor = + internal_static_google_pubsub_v1_Subscription_descriptor.getNestedType(2); + internal_static_google_pubsub_v1_Subscription_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_Subscription_TagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_pubsub_v1_RetryPolicy_descriptor = getDescriptor().getMessageType(24); internal_static_google_pubsub_v1_RetryPolicy_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_RetryPolicy_descriptor, new java.lang.String[] { "MinimumBackoff", "MaximumBackoff", }); internal_static_google_pubsub_v1_DeadLetterPolicy_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageType(25); internal_static_google_pubsub_v1_DeadLetterPolicy_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_DeadLetterPolicy_descriptor, new java.lang.String[] { "DeadLetterTopic", "MaxDeliveryAttempts", }); internal_static_google_pubsub_v1_ExpirationPolicy_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageType(26); internal_static_google_pubsub_v1_ExpirationPolicy_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ExpirationPolicy_descriptor, new java.lang.String[] { "Ttl", }); - internal_static_google_pubsub_v1_PushConfig_descriptor = - getDescriptor().getMessageTypes().get(24); + internal_static_google_pubsub_v1_PushConfig_descriptor = getDescriptor().getMessageType(27); internal_static_google_pubsub_v1_PushConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_PushConfig_descriptor, new java.lang.String[] { "PushEndpoint", @@ -1095,39 +1623,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Wrapper", }); internal_static_google_pubsub_v1_PushConfig_OidcToken_descriptor = - internal_static_google_pubsub_v1_PushConfig_descriptor.getNestedTypes().get(0); + internal_static_google_pubsub_v1_PushConfig_descriptor.getNestedType(0); internal_static_google_pubsub_v1_PushConfig_OidcToken_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_PushConfig_OidcToken_descriptor, new java.lang.String[] { "ServiceAccountEmail", "Audience", }); internal_static_google_pubsub_v1_PushConfig_PubsubWrapper_descriptor = - internal_static_google_pubsub_v1_PushConfig_descriptor.getNestedTypes().get(1); + internal_static_google_pubsub_v1_PushConfig_descriptor.getNestedType(1); internal_static_google_pubsub_v1_PushConfig_PubsubWrapper_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_PushConfig_PubsubWrapper_descriptor, new java.lang.String[] {}); internal_static_google_pubsub_v1_PushConfig_NoWrapper_descriptor = - internal_static_google_pubsub_v1_PushConfig_descriptor.getNestedTypes().get(2); + internal_static_google_pubsub_v1_PushConfig_descriptor.getNestedType(2); internal_static_google_pubsub_v1_PushConfig_NoWrapper_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_PushConfig_NoWrapper_descriptor, new java.lang.String[] { "WriteMetadata", }); internal_static_google_pubsub_v1_PushConfig_AttributesEntry_descriptor = - internal_static_google_pubsub_v1_PushConfig_descriptor.getNestedTypes().get(3); + internal_static_google_pubsub_v1_PushConfig_descriptor.getNestedType(3); internal_static_google_pubsub_v1_PushConfig_AttributesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_PushConfig_AttributesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); - internal_static_google_pubsub_v1_BigQueryConfig_descriptor = - getDescriptor().getMessageTypes().get(25); + internal_static_google_pubsub_v1_BigQueryConfig_descriptor = getDescriptor().getMessageType(28); internal_static_google_pubsub_v1_BigQueryConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_BigQueryConfig_descriptor, new java.lang.String[] { "Table", @@ -1138,10 +1665,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UseTableSchema", "ServiceAccountEmail", }); + internal_static_google_pubsub_v1_BigtableConfig_descriptor = getDescriptor().getMessageType(29); + internal_static_google_pubsub_v1_BigtableConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_BigtableConfig_descriptor, + new java.lang.String[] { + "Table", "AppProfileId", "ServiceAccountEmail", "WriteMetadata", "State", + }); internal_static_google_pubsub_v1_CloudStorageConfig_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageType(30); internal_static_google_pubsub_v1_CloudStorageConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_CloudStorageConfig_descriptor, new java.lang.String[] { "Bucket", @@ -1158,111 +1692,109 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OutputFormat", }); internal_static_google_pubsub_v1_CloudStorageConfig_TextConfig_descriptor = - internal_static_google_pubsub_v1_CloudStorageConfig_descriptor.getNestedTypes().get(0); + internal_static_google_pubsub_v1_CloudStorageConfig_descriptor.getNestedType(0); internal_static_google_pubsub_v1_CloudStorageConfig_TextConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_CloudStorageConfig_TextConfig_descriptor, new java.lang.String[] {}); internal_static_google_pubsub_v1_CloudStorageConfig_AvroConfig_descriptor = - internal_static_google_pubsub_v1_CloudStorageConfig_descriptor.getNestedTypes().get(1); + internal_static_google_pubsub_v1_CloudStorageConfig_descriptor.getNestedType(1); internal_static_google_pubsub_v1_CloudStorageConfig_AvroConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_CloudStorageConfig_AvroConfig_descriptor, new java.lang.String[] { "WriteMetadata", "UseTopicSchema", }); internal_static_google_pubsub_v1_ReceivedMessage_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageType(31); internal_static_google_pubsub_v1_ReceivedMessage_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ReceivedMessage_descriptor, new java.lang.String[] { "AckId", "Message", "DeliveryAttempt", }); internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageType(32); internal_static_google_pubsub_v1_GetSubscriptionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor, new java.lang.String[] { "Subscription", }); internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageType(33); internal_static_google_pubsub_v1_UpdateSubscriptionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor, new java.lang.String[] { "Subscription", "UpdateMask", }); internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageType(34); internal_static_google_pubsub_v1_ListSubscriptionsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor, new java.lang.String[] { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageType(35); internal_static_google_pubsub_v1_ListSubscriptionsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor, new java.lang.String[] { "Subscriptions", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageType(36); internal_static_google_pubsub_v1_DeleteSubscriptionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor, new java.lang.String[] { "Subscription", }); internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageType(37); internal_static_google_pubsub_v1_ModifyPushConfigRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor, new java.lang.String[] { "Subscription", "PushConfig", }); - internal_static_google_pubsub_v1_PullRequest_descriptor = - getDescriptor().getMessageTypes().get(34); + internal_static_google_pubsub_v1_PullRequest_descriptor = getDescriptor().getMessageType(38); internal_static_google_pubsub_v1_PullRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_PullRequest_descriptor, new java.lang.String[] { "Subscription", "ReturnImmediately", "MaxMessages", }); - internal_static_google_pubsub_v1_PullResponse_descriptor = - getDescriptor().getMessageTypes().get(35); + internal_static_google_pubsub_v1_PullResponse_descriptor = getDescriptor().getMessageType(39); internal_static_google_pubsub_v1_PullResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_PullResponse_descriptor, new java.lang.String[] { "ReceivedMessages", }); internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageType(40); internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor, new java.lang.String[] { "Subscription", "AckIds", "AckDeadlineSeconds", }); internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageType(41); internal_static_google_pubsub_v1_AcknowledgeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor, new java.lang.String[] { "Subscription", "AckIds", }); internal_static_google_pubsub_v1_StreamingPullRequest_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageType(42); internal_static_google_pubsub_v1_StreamingPullRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullRequest_descriptor, new java.lang.String[] { "Subscription", @@ -1273,11 +1805,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ClientId", "MaxOutstandingMessages", "MaxOutstandingBytes", + "ProtocolVersion", }); internal_static_google_pubsub_v1_StreamingPullResponse_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageType(43); internal_static_google_pubsub_v1_StreamingPullResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullResponse_descriptor, new java.lang.String[] { "ReceivedMessages", @@ -1286,114 +1819,130 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SubscriptionProperties", }); internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_descriptor = - internal_static_google_pubsub_v1_StreamingPullResponse_descriptor.getNestedTypes().get(0); + internal_static_google_pubsub_v1_StreamingPullResponse_descriptor.getNestedType(0); internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_descriptor, new java.lang.String[] { "AckIds", "InvalidAckIds", "UnorderedAckIds", "TemporaryFailedAckIds", }); internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_descriptor = - internal_static_google_pubsub_v1_StreamingPullResponse_descriptor.getNestedTypes().get(1); + internal_static_google_pubsub_v1_StreamingPullResponse_descriptor.getNestedType(1); internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_descriptor, new java.lang.String[] { "AckIds", "InvalidAckIds", "TemporaryFailedAckIds", }); internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_descriptor = - internal_static_google_pubsub_v1_StreamingPullResponse_descriptor.getNestedTypes().get(2); + internal_static_google_pubsub_v1_StreamingPullResponse_descriptor.getNestedType(2); internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_descriptor, new java.lang.String[] { "ExactlyOnceDeliveryEnabled", "MessageOrderingEnabled", }); internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageType(44); internal_static_google_pubsub_v1_CreateSnapshotRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor, new java.lang.String[] { - "Name", "Subscription", "Labels", + "Name", "Subscription", "Labels", "Tags", }); internal_static_google_pubsub_v1_CreateSnapshotRequest_LabelsEntry_descriptor = - internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor.getNestedTypes().get(0); + internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor.getNestedType(0); internal_static_google_pubsub_v1_CreateSnapshotRequest_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_CreateSnapshotRequest_LabelsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); + internal_static_google_pubsub_v1_CreateSnapshotRequest_TagsEntry_descriptor = + internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor.getNestedType(1); + internal_static_google_pubsub_v1_CreateSnapshotRequest_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_pubsub_v1_CreateSnapshotRequest_TagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageType(45); internal_static_google_pubsub_v1_UpdateSnapshotRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor, new java.lang.String[] { "Snapshot", "UpdateMask", }); - internal_static_google_pubsub_v1_Snapshot_descriptor = - getDescriptor().getMessageTypes().get(42); + internal_static_google_pubsub_v1_Snapshot_descriptor = getDescriptor().getMessageType(46); internal_static_google_pubsub_v1_Snapshot_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_Snapshot_descriptor, new java.lang.String[] { "Name", "Topic", "ExpireTime", "Labels", }); internal_static_google_pubsub_v1_Snapshot_LabelsEntry_descriptor = - internal_static_google_pubsub_v1_Snapshot_descriptor.getNestedTypes().get(0); + internal_static_google_pubsub_v1_Snapshot_descriptor.getNestedType(0); internal_static_google_pubsub_v1_Snapshot_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_Snapshot_LabelsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageType(47); internal_static_google_pubsub_v1_GetSnapshotRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor, new java.lang.String[] { "Snapshot", }); internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor = - getDescriptor().getMessageTypes().get(44); + getDescriptor().getMessageType(48); internal_static_google_pubsub_v1_ListSnapshotsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor, new java.lang.String[] { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor = - getDescriptor().getMessageTypes().get(45); + getDescriptor().getMessageType(49); internal_static_google_pubsub_v1_ListSnapshotsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor, new java.lang.String[] { "Snapshots", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(46); + getDescriptor().getMessageType(50); internal_static_google_pubsub_v1_DeleteSnapshotRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor, new java.lang.String[] { "Snapshot", }); - internal_static_google_pubsub_v1_SeekRequest_descriptor = - getDescriptor().getMessageTypes().get(47); + internal_static_google_pubsub_v1_SeekRequest_descriptor = getDescriptor().getMessageType(51); internal_static_google_pubsub_v1_SeekRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_SeekRequest_descriptor, new java.lang.String[] { "Subscription", "Time", "Snapshot", "Target", }); - internal_static_google_pubsub_v1_SeekResponse_descriptor = - getDescriptor().getMessageTypes().get(48); + internal_static_google_pubsub_v1_SeekResponse_descriptor = getDescriptor().getMessageType(52); internal_static_google_pubsub_v1_SeekResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_SeekResponse_descriptor, new java.lang.String[] {}); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.pubsub.v1.SchemaProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -1402,18 +1951,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.pubsub.v1.SchemaProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java index ed976fea0..79c5b0775 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.PullRequest} */ -public final class PullRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PullRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.PullRequest) PullRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PullRequest"); + } + // Use PullRequest.newBuilder() to construct. - private PullRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PullRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,18 +55,12 @@ private PullRequest() { subscription_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PullRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PullRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PullRequest_fieldAccessorTable @@ -65,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object subscription_ = ""; + /** * * @@ -91,6 +99,7 @@ public java.lang.String getSubscription() { return s; } } + /** * * @@ -120,6 +129,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { public static final int RETURN_IMMEDIATELY_FIELD_NUMBER = 2; private boolean returnImmediately_ = false; + /** * * @@ -137,7 +147,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1588 + * google/pubsub/v1/pubsub.proto;l=2180 * @return The returnImmediately. */ @java.lang.Override @@ -148,6 +158,7 @@ public boolean getReturnImmediately() { public static final int MAX_MESSAGES_FIELD_NUMBER = 3; private int maxMessages_ = 0; + /** * * @@ -180,8 +191,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); } if (returnImmediately_ != false) { output.writeBool(2, returnImmediately_); @@ -198,8 +209,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); } if (returnImmediately_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, returnImmediately_); @@ -283,38 +294,38 @@ public static com.google.pubsub.v1.PullRequest parseFrom( public static com.google.pubsub.v1.PullRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PullRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PullRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.PullRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PullRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PullRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -337,10 +348,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -350,7 +362,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.PullRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PullRequest) com.google.pubsub.v1.PullRequestOrBuilder { @@ -360,7 +372,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PullRequest_fieldAccessorTable @@ -372,7 +384,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.PullRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -429,39 +441,6 @@ private void buildPartial0(com.google.pubsub.v1.PullRequest 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.pubsub.v1.PullRequest) { @@ -549,6 +528,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object subscription_ = ""; + /** * * @@ -574,6 +554,7 @@ public java.lang.String getSubscription() { return (java.lang.String) ref; } } + /** * * @@ -599,6 +580,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -623,6 +605,7 @@ public Builder setSubscription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -643,6 +626,7 @@ public Builder clearSubscription() { onChanged(); return this; } + /** * * @@ -670,6 +654,7 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { } private boolean returnImmediately_; + /** * * @@ -688,7 +673,7 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1588 + * google/pubsub/v1/pubsub.proto;l=2180 * @return The returnImmediately. */ @java.lang.Override @@ -696,6 +681,7 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { public boolean getReturnImmediately() { return returnImmediately_; } + /** * * @@ -714,7 +700,7 @@ public boolean getReturnImmediately() { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1588 + * google/pubsub/v1/pubsub.proto;l=2180 * @param value The returnImmediately to set. * @return This builder for chaining. */ @@ -726,6 +712,7 @@ public Builder setReturnImmediately(boolean value) { onChanged(); return this; } + /** * * @@ -744,7 +731,7 @@ public Builder setReturnImmediately(boolean value) { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1588 + * google/pubsub/v1/pubsub.proto;l=2180 * @return This builder for chaining. */ @java.lang.Deprecated @@ -756,6 +743,7 @@ public Builder clearReturnImmediately() { } private int maxMessages_; + /** * * @@ -773,6 +761,7 @@ public Builder clearReturnImmediately() { public int getMaxMessages() { return maxMessages_; } + /** * * @@ -794,6 +783,7 @@ public Builder setMaxMessages(int value) { onChanged(); return this; } + /** * * @@ -814,17 +804,6 @@ public Builder clearMaxMessages() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PullRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java index 6c5f66a36..1346ad309 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface PullRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PullRequest) @@ -39,6 +41,7 @@ public interface PullRequestOrBuilder * @return The subscription. */ java.lang.String getSubscription(); + /** * * @@ -72,7 +75,7 @@ public interface PullRequestOrBuilder * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1588 + * google/pubsub/v1/pubsub.proto;l=2180 * @return The returnImmediately. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullResponse.java index b8c01469c..cad6472f0 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.PullResponse} */ -public final class PullResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PullResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.PullResponse) PullResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PullResponse"); + } + // Use PullResponse.newBuilder() to construct. - private PullResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PullResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private PullResponse() { receivedMessages_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PullResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PullResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PullResponse_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List receivedMessages_; + /** * * @@ -86,6 +94,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getReceivedMessagesList() { return receivedMessages_; } + /** * * @@ -106,6 +115,7 @@ public java.util.List getReceivedMessagesL getReceivedMessagesOrBuilderList() { return receivedMessages_; } + /** * * @@ -125,6 +135,7 @@ public java.util.List getReceivedMessagesL public int getReceivedMessagesCount() { return receivedMessages_.size(); } + /** * * @@ -144,6 +155,7 @@ public int getReceivedMessagesCount() { public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { return receivedMessages_.get(index); } + /** * * @@ -265,38 +277,38 @@ public static com.google.pubsub.v1.PullResponse parseFrom( public static com.google.pubsub.v1.PullResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PullResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PullResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.PullResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PullResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PullResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -319,10 +331,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -332,7 +345,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.PullResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PullResponse) com.google.pubsub.v1.PullResponseOrBuilder { @@ -342,7 +355,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PullResponse_fieldAccessorTable @@ -354,7 +367,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.PullResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -419,39 +432,6 @@ private void buildPartial0(com.google.pubsub.v1.PullResponse 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.pubsub.v1.PullResponse) { @@ -483,8 +463,8 @@ public Builder mergeFrom(com.google.pubsub.v1.PullResponse other) { receivedMessages_ = other.receivedMessages_; bitField0_ = (bitField0_ & ~0x00000001); receivedMessagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getReceivedMessagesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetReceivedMessagesFieldBuilder() : null; } else { receivedMessagesBuilder_.addAllMessages(other.receivedMessages_); @@ -560,7 +540,7 @@ private void ensureReceivedMessagesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.ReceivedMessage, com.google.pubsub.v1.ReceivedMessage.Builder, com.google.pubsub.v1.ReceivedMessageOrBuilder> @@ -588,6 +568,7 @@ public java.util.List getReceivedMessagesL return receivedMessagesBuilder_.getMessageList(); } } + /** * * @@ -610,6 +591,7 @@ public int getReceivedMessagesCount() { return receivedMessagesBuilder_.getCount(); } } + /** * * @@ -632,6 +614,7 @@ public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { return receivedMessagesBuilder_.getMessage(index); } } + /** * * @@ -660,6 +643,7 @@ public Builder setReceivedMessages(int index, com.google.pubsub.v1.ReceivedMessa } return this; } + /** * * @@ -686,6 +670,7 @@ public Builder setReceivedMessages( } return this; } + /** * * @@ -714,6 +699,7 @@ public Builder addReceivedMessages(com.google.pubsub.v1.ReceivedMessage value) { } return this; } + /** * * @@ -742,6 +728,7 @@ public Builder addReceivedMessages(int index, com.google.pubsub.v1.ReceivedMessa } return this; } + /** * * @@ -768,6 +755,7 @@ public Builder addReceivedMessages( } return this; } + /** * * @@ -794,6 +782,7 @@ public Builder addReceivedMessages( } return this; } + /** * * @@ -820,6 +809,7 @@ public Builder addAllReceivedMessages( } return this; } + /** * * @@ -845,6 +835,7 @@ public Builder clearReceivedMessages() { } return this; } + /** * * @@ -870,6 +861,7 @@ public Builder removeReceivedMessages(int index) { } return this; } + /** * * @@ -886,8 +878,9 @@ public Builder removeReceivedMessages(int index) { * */ public com.google.pubsub.v1.ReceivedMessage.Builder getReceivedMessagesBuilder(int index) { - return getReceivedMessagesFieldBuilder().getBuilder(index); + return internalGetReceivedMessagesFieldBuilder().getBuilder(index); } + /** * * @@ -910,6 +903,7 @@ public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilde return receivedMessagesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -933,6 +927,7 @@ public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilde return java.util.Collections.unmodifiableList(receivedMessages_); } } + /** * * @@ -949,9 +944,10 @@ public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilde * */ public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder() { - return getReceivedMessagesFieldBuilder() + return internalGetReceivedMessagesFieldBuilder() .addBuilder(com.google.pubsub.v1.ReceivedMessage.getDefaultInstance()); } + /** * * @@ -968,9 +964,10 @@ public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder() * */ public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder(int index) { - return getReceivedMessagesFieldBuilder() + return internalGetReceivedMessagesFieldBuilder() .addBuilder(index, com.google.pubsub.v1.ReceivedMessage.getDefaultInstance()); } + /** * * @@ -988,17 +985,17 @@ public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder(i */ public java.util.List getReceivedMessagesBuilderList() { - return getReceivedMessagesFieldBuilder().getBuilderList(); + return internalGetReceivedMessagesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.ReceivedMessage, com.google.pubsub.v1.ReceivedMessage.Builder, com.google.pubsub.v1.ReceivedMessageOrBuilder> - getReceivedMessagesFieldBuilder() { + internalGetReceivedMessagesFieldBuilder() { if (receivedMessagesBuilder_ == null) { receivedMessagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.ReceivedMessage, com.google.pubsub.v1.ReceivedMessage.Builder, com.google.pubsub.v1.ReceivedMessageOrBuilder>( @@ -1011,17 +1008,6 @@ public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder(i return receivedMessagesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PullResponse) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullResponseOrBuilder.java index 13591fc31..98cb9ba32 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface PullResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PullResponse) @@ -40,6 +42,7 @@ public interface PullResponseOrBuilder * */ java.util.List getReceivedMessagesList(); + /** * * @@ -56,6 +59,7 @@ public interface PullResponseOrBuilder * */ com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index); + /** * * @@ -72,6 +76,7 @@ public interface PullResponseOrBuilder * */ int getReceivedMessagesCount(); + /** * * @@ -89,6 +94,7 @@ public interface PullResponseOrBuilder */ java.util.List getReceivedMessagesOrBuilderList(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java index c2b62ad70..304cd75ab 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.PushConfig} */ -public final class PushConfig extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PushConfig extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.PushConfig) PushConfigOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PushConfig"); + } + // Use PushConfig.newBuilder() to construct. - private PushConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PushConfig(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,12 +55,6 @@ private PushConfig() { pushEndpoint_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PushConfig(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PushConfig_descriptor; } @@ -65,7 +72,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PushConfig_fieldAccessorTable @@ -94,6 +101,7 @@ public interface OidcTokenOrBuilder * @return The serviceAccountEmail. */ java.lang.String getServiceAccountEmail(); + /** * * @@ -129,6 +137,7 @@ public interface OidcTokenOrBuilder * @return The audience. */ java.lang.String getAudience(); + /** * * @@ -148,6 +157,7 @@ public interface OidcTokenOrBuilder */ com.google.protobuf.ByteString getAudienceBytes(); } + /** * * @@ -159,13 +169,24 @@ public interface OidcTokenOrBuilder * * Protobuf type {@code google.pubsub.v1.PushConfig.OidcToken} */ - public static final class OidcToken extends com.google.protobuf.GeneratedMessageV3 + public static final class OidcToken extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.PushConfig.OidcToken) OidcTokenOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OidcToken"); + } + // Use OidcToken.newBuilder() to construct. - private OidcToken(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private OidcToken(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -174,19 +195,13 @@ private OidcToken() { audience_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OidcToken(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PushConfig_OidcToken_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PushConfig_OidcToken_fieldAccessorTable @@ -199,6 +214,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object serviceAccountEmail_ = ""; + /** * * @@ -226,6 +242,7 @@ public java.lang.String getServiceAccountEmail() { return s; } } + /** * * @@ -258,6 +275,7 @@ public com.google.protobuf.ByteString getServiceAccountEmailBytes() { @SuppressWarnings("serial") private volatile java.lang.Object audience_ = ""; + /** * * @@ -287,6 +305,7 @@ public java.lang.String getAudience() { return s; } } + /** * * @@ -331,11 +350,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceAccountEmail_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccountEmail_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, serviceAccountEmail_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(audience_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, audience_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(audience_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, audience_); } getUnknownFields().writeTo(output); } @@ -346,11 +365,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceAccountEmail_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccountEmail_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, serviceAccountEmail_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(audience_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, audience_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(audience_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, audience_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -427,38 +446,38 @@ public static com.google.pubsub.v1.PushConfig.OidcToken parseFrom( public static com.google.pubsub.v1.PushConfig.OidcToken parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PushConfig.OidcToken parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PushConfig.OidcToken parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.PushConfig.OidcToken parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PushConfig.OidcToken parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PushConfig.OidcToken parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -481,11 +500,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -497,8 +516,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.pubsub.v1.PushConfig.OidcToken} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PushConfig.OidcToken) com.google.pubsub.v1.PushConfig.OidcTokenOrBuilder { @@ -508,7 +526,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PushConfig_OidcToken_fieldAccessorTable @@ -520,7 +538,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.PushConfig.OidcToken.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -574,41 +592,6 @@ private void buildPartial0(com.google.pubsub.v1.PushConfig.OidcToken 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.pubsub.v1.PushConfig.OidcToken) { @@ -689,6 +672,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object serviceAccountEmail_ = ""; + /** * * @@ -715,6 +699,7 @@ public java.lang.String getServiceAccountEmail() { return (java.lang.String) ref; } } + /** * * @@ -741,6 +726,7 @@ public com.google.protobuf.ByteString getServiceAccountEmailBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -766,6 +752,7 @@ public Builder setServiceAccountEmail(java.lang.String value) { onChanged(); return this; } + /** * * @@ -787,6 +774,7 @@ public Builder clearServiceAccountEmail() { onChanged(); return this; } + /** * * @@ -815,6 +803,7 @@ public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) } private java.lang.Object audience_ = ""; + /** * * @@ -843,6 +832,7 @@ public java.lang.String getAudience() { return (java.lang.String) ref; } } + /** * * @@ -871,6 +861,7 @@ public com.google.protobuf.ByteString getAudienceBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -898,6 +889,7 @@ public Builder setAudience(java.lang.String value) { onChanged(); return this; } + /** * * @@ -921,6 +913,7 @@ public Builder clearAudience() { onChanged(); return this; } + /** * * @@ -950,18 +943,6 @@ public Builder setAudienceBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PushConfig.OidcToken) } @@ -1018,6 +999,7 @@ public interface PubsubWrapperOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PushConfig.PubsubWrapper) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -1029,31 +1011,36 @@ public interface PubsubWrapperOrBuilder * * Protobuf type {@code google.pubsub.v1.PushConfig.PubsubWrapper} */ - public static final class PubsubWrapper extends com.google.protobuf.GeneratedMessageV3 + public static final class PubsubWrapper extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.PushConfig.PubsubWrapper) PubsubWrapperOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PubsubWrapper"); + } + // Use PubsubWrapper.newBuilder() to construct. - private PubsubWrapper(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PubsubWrapper(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private PubsubWrapper() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PubsubWrapper(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PushConfig_PubsubWrapper_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PushConfig_PubsubWrapper_fieldAccessorTable @@ -1154,38 +1141,38 @@ public static com.google.pubsub.v1.PushConfig.PubsubWrapper parseFrom( public static com.google.pubsub.v1.PushConfig.PubsubWrapper parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PushConfig.PubsubWrapper parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PushConfig.PubsubWrapper parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.PushConfig.PubsubWrapper parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PushConfig.PubsubWrapper parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PushConfig.PubsubWrapper parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1208,11 +1195,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -1224,8 +1211,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.pubsub.v1.PushConfig.PubsubWrapper} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PushConfig.PubsubWrapper) com.google.pubsub.v1.PushConfig.PubsubWrapperOrBuilder { @@ -1235,7 +1221,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PushConfig_PubsubWrapper_fieldAccessorTable @@ -1247,7 +1233,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.PushConfig.PubsubWrapper.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1285,41 +1271,6 @@ public com.google.pubsub.v1.PushConfig.PubsubWrapper buildPartial() { return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.PushConfig.PubsubWrapper) { @@ -1376,18 +1327,6 @@ public Builder mergeFrom( return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PushConfig.PubsubWrapper) } @@ -1460,6 +1399,7 @@ public interface NoWrapperOrBuilder */ boolean getWriteMetadata(); } + /** * * @@ -1469,31 +1409,36 @@ public interface NoWrapperOrBuilder * * Protobuf type {@code google.pubsub.v1.PushConfig.NoWrapper} */ - public static final class NoWrapper extends com.google.protobuf.GeneratedMessageV3 + public static final class NoWrapper extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.PushConfig.NoWrapper) NoWrapperOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "NoWrapper"); + } + // Use NoWrapper.newBuilder() to construct. - private NoWrapper(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private NoWrapper(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private NoWrapper() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new NoWrapper(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PushConfig_NoWrapper_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PushConfig_NoWrapper_fieldAccessorTable @@ -1504,6 +1449,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int WRITE_METADATA_FIELD_NUMBER = 1; private boolean writeMetadata_ = false; + /** * * @@ -1623,38 +1569,38 @@ public static com.google.pubsub.v1.PushConfig.NoWrapper parseFrom( public static com.google.pubsub.v1.PushConfig.NoWrapper parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PushConfig.NoWrapper parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PushConfig.NoWrapper parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.PushConfig.NoWrapper parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PushConfig.NoWrapper parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PushConfig.NoWrapper parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1677,11 +1623,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -1691,8 +1637,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.pubsub.v1.PushConfig.NoWrapper} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PushConfig.NoWrapper) com.google.pubsub.v1.PushConfig.NoWrapperOrBuilder { @@ -1702,7 +1647,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PushConfig_NoWrapper_fieldAccessorTable @@ -1714,7 +1659,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.PushConfig.NoWrapper.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1764,41 +1709,6 @@ private void buildPartial0(com.google.pubsub.v1.PushConfig.NoWrapper 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.pubsub.v1.PushConfig.NoWrapper) { @@ -1866,6 +1776,7 @@ public Builder mergeFrom( private int bitField0_; private boolean writeMetadata_; + /** * * @@ -1883,6 +1794,7 @@ public Builder mergeFrom( public boolean getWriteMetadata() { return writeMetadata_; } + /** * * @@ -1904,6 +1816,7 @@ public Builder setWriteMetadata(boolean value) { onChanged(); return this; } + /** * * @@ -1924,18 +1837,6 @@ public Builder clearWriteMetadata() { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PushConfig.NoWrapper) } @@ -2004,6 +1905,7 @@ public enum AuthenticationMethodCase private AuthenticationMethodCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -2051,6 +1953,7 @@ public enum WrapperCase private WrapperCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -2087,6 +1990,7 @@ public WrapperCase getWrapperCase() { @SuppressWarnings("serial") private volatile java.lang.Object pushEndpoint_ = ""; + /** * * @@ -2111,6 +2015,7 @@ public java.lang.String getPushEndpoint() { return s; } } + /** * * @@ -2162,6 +2067,7 @@ private com.google.protobuf.MapField interna public int getAttributesCount() { return internalGetAttributes().getMap().size(); } + /** * * @@ -2199,12 +2105,14 @@ public boolean containsAttributes(java.lang.String key) { } return internalGetAttributes().getMap().containsKey(key); } + /** Use {@link #getAttributesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getAttributes() { return getAttributesMap(); } + /** * * @@ -2239,6 +2147,7 @@ public java.util.Map getAttributes() { public java.util.Map getAttributesMap() { return internalGetAttributes().getMap(); } + /** * * @@ -2280,6 +2189,7 @@ public java.util.Map getAttributesMap() { java.util.Map map = internalGetAttributes().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -2323,6 +2233,7 @@ public java.lang.String getAttributesOrThrow(java.lang.String key) { } public static final int OIDC_TOKEN_FIELD_NUMBER = 3; + /** * * @@ -2342,6 +2253,7 @@ public java.lang.String getAttributesOrThrow(java.lang.String key) { public boolean hasOidcToken() { return authenticationMethodCase_ == 3; } + /** * * @@ -2364,6 +2276,7 @@ public com.google.pubsub.v1.PushConfig.OidcToken getOidcToken() { } return com.google.pubsub.v1.PushConfig.OidcToken.getDefaultInstance(); } + /** * * @@ -2386,6 +2299,7 @@ public com.google.pubsub.v1.PushConfig.OidcTokenOrBuilder getOidcTokenOrBuilder( } public static final int PUBSUB_WRAPPER_FIELD_NUMBER = 4; + /** * * @@ -2405,6 +2319,7 @@ public com.google.pubsub.v1.PushConfig.OidcTokenOrBuilder getOidcTokenOrBuilder( public boolean hasPubsubWrapper() { return wrapperCase_ == 4; } + /** * * @@ -2427,6 +2342,7 @@ public com.google.pubsub.v1.PushConfig.PubsubWrapper getPubsubWrapper() { } return com.google.pubsub.v1.PushConfig.PubsubWrapper.getDefaultInstance(); } + /** * * @@ -2449,6 +2365,7 @@ public com.google.pubsub.v1.PushConfig.PubsubWrapperOrBuilder getPubsubWrapperOr } public static final int NO_WRAPPER_FIELD_NUMBER = 5; + /** * * @@ -2466,6 +2383,7 @@ public com.google.pubsub.v1.PushConfig.PubsubWrapperOrBuilder getPubsubWrapperOr public boolean hasNoWrapper() { return wrapperCase_ == 5; } + /** * * @@ -2486,6 +2404,7 @@ public com.google.pubsub.v1.PushConfig.NoWrapper getNoWrapper() { } return com.google.pubsub.v1.PushConfig.NoWrapper.getDefaultInstance(); } + /** * * @@ -2519,10 +2438,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pushEndpoint_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pushEndpoint_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pushEndpoint_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, pushEndpoint_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 2); if (authenticationMethodCase_ == 3) { output.writeMessage(3, (com.google.pubsub.v1.PushConfig.OidcToken) authenticationMethod_); @@ -2542,8 +2461,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pushEndpoint_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pushEndpoint_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pushEndpoint_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, pushEndpoint_); } for (java.util.Map.Entry entry : internalGetAttributes().getMap().entrySet()) { @@ -2684,38 +2603,38 @@ public static com.google.pubsub.v1.PushConfig parseFrom( public static com.google.pubsub.v1.PushConfig parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PushConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PushConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.PushConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.PushConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.PushConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2738,10 +2657,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -2751,7 +2671,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.PushConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PushConfig) com.google.pubsub.v1.PushConfigOrBuilder { @@ -2783,7 +2703,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_PushConfig_fieldAccessorTable @@ -2794,7 +2714,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi // Construct using com.google.pubsub.v1.PushConfig.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2878,39 +2798,6 @@ private void buildPartialOneofs(com.google.pubsub.v1.PushConfig 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.pubsub.v1.PushConfig) { @@ -3003,19 +2890,22 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getOidcTokenFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetOidcTokenFieldBuilder().getBuilder(), extensionRegistry); authenticationMethodCase_ = 3; break; } // case 26 case 34: { - input.readMessage(getPubsubWrapperFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPubsubWrapperFieldBuilder().getBuilder(), extensionRegistry); wrapperCase_ = 4; break; } // case 34 case 42: { - input.readMessage(getNoWrapperFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetNoWrapperFieldBuilder().getBuilder(), extensionRegistry); wrapperCase_ = 5; break; } // case 42 @@ -3067,6 +2957,7 @@ public Builder clearWrapper() { private int bitField0_; private java.lang.Object pushEndpoint_ = ""; + /** * * @@ -3090,6 +2981,7 @@ public java.lang.String getPushEndpoint() { return (java.lang.String) ref; } } + /** * * @@ -3113,6 +3005,7 @@ public com.google.protobuf.ByteString getPushEndpointBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3135,6 +3028,7 @@ public Builder setPushEndpoint(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3153,6 +3047,7 @@ public Builder clearPushEndpoint() { onChanged(); return this; } + /** * * @@ -3205,6 +3100,7 @@ public Builder setPushEndpointBytes(com.google.protobuf.ByteString value) { public int getAttributesCount() { return internalGetAttributes().getMap().size(); } + /** * * @@ -3242,12 +3138,14 @@ public boolean containsAttributes(java.lang.String key) { } return internalGetAttributes().getMap().containsKey(key); } + /** Use {@link #getAttributesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getAttributes() { return getAttributesMap(); } + /** * * @@ -3282,6 +3180,7 @@ public java.util.Map getAttributes() { public java.util.Map getAttributesMap() { return internalGetAttributes().getMap(); } + /** * * @@ -3323,6 +3222,7 @@ public java.util.Map getAttributesMap() { java.util.Map map = internalGetAttributes().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -3370,6 +3270,7 @@ public Builder clearAttributes() { internalGetMutableAttributes().getMutableMap().clear(); return this; } + /** * * @@ -3407,12 +3308,14 @@ public Builder removeAttributes(java.lang.String key) { internalGetMutableAttributes().getMutableMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableAttributes() { bitField0_ |= 0x00000002; return internalGetMutableAttributes().getMutableMap(); } + /** * * @@ -3454,6 +3357,7 @@ public Builder putAttributes(java.lang.String key, java.lang.String value) { bitField0_ |= 0x00000002; return this; } + /** * * @@ -3490,11 +3394,12 @@ public Builder putAllAttributes(java.util.Map oidcTokenBuilder_; + /** * * @@ -3514,6 +3419,7 @@ public Builder putAllAttributes(java.util.Map */ public com.google.pubsub.v1.PushConfig.OidcToken.Builder getOidcTokenBuilder() { - return getOidcTokenFieldBuilder().getBuilder(); + return internalGetOidcTokenFieldBuilder().getBuilder(); } + /** * * @@ -3698,6 +3610,7 @@ public com.google.pubsub.v1.PushConfig.OidcTokenOrBuilder getOidcTokenOrBuilder( return com.google.pubsub.v1.PushConfig.OidcToken.getDefaultInstance(); } } + /** * * @@ -3711,17 +3624,17 @@ public com.google.pubsub.v1.PushConfig.OidcTokenOrBuilder getOidcTokenOrBuilder( * .google.pubsub.v1.PushConfig.OidcToken oidc_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PushConfig.OidcToken, com.google.pubsub.v1.PushConfig.OidcToken.Builder, com.google.pubsub.v1.PushConfig.OidcTokenOrBuilder> - getOidcTokenFieldBuilder() { + internalGetOidcTokenFieldBuilder() { if (oidcTokenBuilder_ == null) { if (!(authenticationMethodCase_ == 3)) { authenticationMethod_ = com.google.pubsub.v1.PushConfig.OidcToken.getDefaultInstance(); } oidcTokenBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PushConfig.OidcToken, com.google.pubsub.v1.PushConfig.OidcToken.Builder, com.google.pubsub.v1.PushConfig.OidcTokenOrBuilder>( @@ -3735,11 +3648,12 @@ public com.google.pubsub.v1.PushConfig.OidcTokenOrBuilder getOidcTokenOrBuilder( return oidcTokenBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PushConfig.PubsubWrapper, com.google.pubsub.v1.PushConfig.PubsubWrapper.Builder, com.google.pubsub.v1.PushConfig.PubsubWrapperOrBuilder> pubsubWrapperBuilder_; + /** * * @@ -3759,6 +3673,7 @@ public com.google.pubsub.v1.PushConfig.OidcTokenOrBuilder getOidcTokenOrBuilder( public boolean hasPubsubWrapper() { return wrapperCase_ == 4; } + /** * * @@ -3788,6 +3703,7 @@ public com.google.pubsub.v1.PushConfig.PubsubWrapper getPubsubWrapper() { return com.google.pubsub.v1.PushConfig.PubsubWrapper.getDefaultInstance(); } } + /** * * @@ -3814,6 +3730,7 @@ public Builder setPubsubWrapper(com.google.pubsub.v1.PushConfig.PubsubWrapper va wrapperCase_ = 4; return this; } + /** * * @@ -3838,6 +3755,7 @@ public Builder setPubsubWrapper( wrapperCase_ = 4; return this; } + /** * * @@ -3874,6 +3792,7 @@ public Builder mergePubsubWrapper(com.google.pubsub.v1.PushConfig.PubsubWrapper wrapperCase_ = 4; return this; } + /** * * @@ -3903,6 +3822,7 @@ public Builder clearPubsubWrapper() { } return this; } + /** * * @@ -3917,8 +3837,9 @@ public Builder clearPubsubWrapper() { * */ public com.google.pubsub.v1.PushConfig.PubsubWrapper.Builder getPubsubWrapperBuilder() { - return getPubsubWrapperFieldBuilder().getBuilder(); + return internalGetPubsubWrapperFieldBuilder().getBuilder(); } + /** * * @@ -3943,6 +3864,7 @@ public com.google.pubsub.v1.PushConfig.PubsubWrapperOrBuilder getPubsubWrapperOr return com.google.pubsub.v1.PushConfig.PubsubWrapper.getDefaultInstance(); } } + /** * * @@ -3956,17 +3878,17 @@ public com.google.pubsub.v1.PushConfig.PubsubWrapperOrBuilder getPubsubWrapperOr * .google.pubsub.v1.PushConfig.PubsubWrapper pubsub_wrapper = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PushConfig.PubsubWrapper, com.google.pubsub.v1.PushConfig.PubsubWrapper.Builder, com.google.pubsub.v1.PushConfig.PubsubWrapperOrBuilder> - getPubsubWrapperFieldBuilder() { + internalGetPubsubWrapperFieldBuilder() { if (pubsubWrapperBuilder_ == null) { if (!(wrapperCase_ == 4)) { wrapper_ = com.google.pubsub.v1.PushConfig.PubsubWrapper.getDefaultInstance(); } pubsubWrapperBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PushConfig.PubsubWrapper, com.google.pubsub.v1.PushConfig.PubsubWrapper.Builder, com.google.pubsub.v1.PushConfig.PubsubWrapperOrBuilder>( @@ -3980,11 +3902,12 @@ public com.google.pubsub.v1.PushConfig.PubsubWrapperOrBuilder getPubsubWrapperOr return pubsubWrapperBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PushConfig.NoWrapper, com.google.pubsub.v1.PushConfig.NoWrapper.Builder, com.google.pubsub.v1.PushConfig.NoWrapperOrBuilder> noWrapperBuilder_; + /** * * @@ -4002,6 +3925,7 @@ public com.google.pubsub.v1.PushConfig.PubsubWrapperOrBuilder getPubsubWrapperOr public boolean hasNoWrapper() { return wrapperCase_ == 5; } + /** * * @@ -4029,6 +3953,7 @@ public com.google.pubsub.v1.PushConfig.NoWrapper getNoWrapper() { return com.google.pubsub.v1.PushConfig.NoWrapper.getDefaultInstance(); } } + /** * * @@ -4053,6 +3978,7 @@ public Builder setNoWrapper(com.google.pubsub.v1.PushConfig.NoWrapper value) { wrapperCase_ = 5; return this; } + /** * * @@ -4074,6 +4000,7 @@ public Builder setNoWrapper(com.google.pubsub.v1.PushConfig.NoWrapper.Builder bu wrapperCase_ = 5; return this; } + /** * * @@ -4108,6 +4035,7 @@ public Builder mergeNoWrapper(com.google.pubsub.v1.PushConfig.NoWrapper value) { wrapperCase_ = 5; return this; } + /** * * @@ -4135,6 +4063,7 @@ public Builder clearNoWrapper() { } return this; } + /** * * @@ -4147,8 +4076,9 @@ public Builder clearNoWrapper() { * */ public com.google.pubsub.v1.PushConfig.NoWrapper.Builder getNoWrapperBuilder() { - return getNoWrapperFieldBuilder().getBuilder(); + return internalGetNoWrapperFieldBuilder().getBuilder(); } + /** * * @@ -4171,6 +4101,7 @@ public com.google.pubsub.v1.PushConfig.NoWrapperOrBuilder getNoWrapperOrBuilder( return com.google.pubsub.v1.PushConfig.NoWrapper.getDefaultInstance(); } } + /** * * @@ -4182,17 +4113,17 @@ public com.google.pubsub.v1.PushConfig.NoWrapperOrBuilder getNoWrapperOrBuilder( * .google.pubsub.v1.PushConfig.NoWrapper no_wrapper = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PushConfig.NoWrapper, com.google.pubsub.v1.PushConfig.NoWrapper.Builder, com.google.pubsub.v1.PushConfig.NoWrapperOrBuilder> - getNoWrapperFieldBuilder() { + internalGetNoWrapperFieldBuilder() { if (noWrapperBuilder_ == null) { if (!(wrapperCase_ == 5)) { wrapper_ = com.google.pubsub.v1.PushConfig.NoWrapper.getDefaultInstance(); } noWrapperBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PushConfig.NoWrapper, com.google.pubsub.v1.PushConfig.NoWrapper.Builder, com.google.pubsub.v1.PushConfig.NoWrapperOrBuilder>( @@ -4206,17 +4137,6 @@ public com.google.pubsub.v1.PushConfig.NoWrapperOrBuilder getNoWrapperOrBuilder( return noWrapperBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PushConfig) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfigOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfigOrBuilder.java index b3aec3d61..c789fff48 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfigOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PushConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface PushConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PushConfig) @@ -37,6 +39,7 @@ public interface PushConfigOrBuilder * @return The pushEndpoint. */ java.lang.String getPushEndpoint(); + /** * * @@ -82,6 +85,7 @@ public interface PushConfigOrBuilder * */ int getAttributesCount(); + /** * * @@ -113,9 +117,11 @@ public interface PushConfigOrBuilder * */ boolean containsAttributes(java.lang.String key); + /** Use {@link #getAttributesMap()} instead. */ @java.lang.Deprecated java.util.Map getAttributes(); + /** * * @@ -147,6 +153,7 @@ public interface PushConfigOrBuilder * */ java.util.Map getAttributesMap(); + /** * * @@ -182,6 +189,7 @@ java.lang.String getAttributesOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); + /** * * @@ -230,6 +238,7 @@ java.lang.String getAttributesOrDefault( * @return Whether the oidcToken field is set. */ boolean hasOidcToken(); + /** * * @@ -246,6 +255,7 @@ java.lang.String getAttributesOrDefault( * @return The oidcToken. */ com.google.pubsub.v1.PushConfig.OidcToken getOidcToken(); + /** * * @@ -277,6 +287,7 @@ java.lang.String getAttributesOrDefault( * @return Whether the pubsubWrapper field is set. */ boolean hasPubsubWrapper(); + /** * * @@ -293,6 +304,7 @@ java.lang.String getAttributesOrDefault( * @return The pubsubWrapper. */ com.google.pubsub.v1.PushConfig.PubsubWrapper getPubsubWrapper(); + /** * * @@ -322,6 +334,7 @@ java.lang.String getAttributesOrDefault( * @return Whether the noWrapper field is set. */ boolean hasNoWrapper(); + /** * * @@ -336,6 +349,7 @@ java.lang.String getAttributesOrDefault( * @return The noWrapper. */ com.google.pubsub.v1.PushConfig.NoWrapper getNoWrapper(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java index 96e7b7c19..116667ae5 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessage.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ReceivedMessage} */ -public final class ReceivedMessage extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReceivedMessage extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ReceivedMessage) ReceivedMessageOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReceivedMessage"); + } + // Use ReceivedMessage.newBuilder() to construct. - private ReceivedMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReceivedMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private ReceivedMessage() { ackId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReceivedMessage(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ReceivedMessage_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ReceivedMessage_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object ackId_ = ""; + /** * * @@ -91,6 +99,7 @@ public java.lang.String getAckId() { return s; } } + /** * * @@ -117,6 +126,7 @@ public com.google.protobuf.ByteString getAckIdBytes() { public static final int MESSAGE_FIELD_NUMBER = 2; private com.google.pubsub.v1.PubsubMessage message_; + /** * * @@ -133,6 +143,7 @@ public com.google.protobuf.ByteString getAckIdBytes() { public boolean hasMessage() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -149,6 +160,7 @@ public boolean hasMessage() { public com.google.pubsub.v1.PubsubMessage getMessage() { return message_ == null ? com.google.pubsub.v1.PubsubMessage.getDefaultInstance() : message_; } + /** * * @@ -166,6 +178,7 @@ public com.google.pubsub.v1.PubsubMessageOrBuilder getMessageOrBuilder() { public static final int DELIVERY_ATTEMPT_FIELD_NUMBER = 3; private int deliveryAttempt_ = 0; + /** * * @@ -211,8 +224,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ackId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ackId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ackId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ackId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getMessage()); @@ -229,8 +242,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ackId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ackId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ackId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ackId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMessage()); @@ -319,38 +332,38 @@ public static com.google.pubsub.v1.ReceivedMessage parseFrom( public static com.google.pubsub.v1.ReceivedMessage parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ReceivedMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ReceivedMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ReceivedMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ReceivedMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ReceivedMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -373,10 +386,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -386,7 +400,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ReceivedMessage} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ReceivedMessage) com.google.pubsub.v1.ReceivedMessageOrBuilder { @@ -396,7 +410,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_ReceivedMessage_fieldAccessorTable @@ -410,14 +424,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMessageFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMessageFieldBuilder(); } } @@ -481,39 +495,6 @@ private void buildPartial0(com.google.pubsub.v1.ReceivedMessage result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.ReceivedMessage) { @@ -571,7 +552,7 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getMessageFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetMessageFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -601,6 +582,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object ackId_ = ""; + /** * * @@ -623,6 +605,7 @@ public java.lang.String getAckId() { return (java.lang.String) ref; } } + /** * * @@ -645,6 +628,7 @@ public com.google.protobuf.ByteString getAckIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -666,6 +650,7 @@ public Builder setAckId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -683,6 +668,7 @@ public Builder clearAckId() { onChanged(); return this; } + /** * * @@ -707,11 +693,12 @@ public Builder setAckIdBytes(com.google.protobuf.ByteString value) { } private com.google.pubsub.v1.PubsubMessage message_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PubsubMessage, com.google.pubsub.v1.PubsubMessage.Builder, com.google.pubsub.v1.PubsubMessageOrBuilder> messageBuilder_; + /** * * @@ -727,6 +714,7 @@ public Builder setAckIdBytes(com.google.protobuf.ByteString value) { public boolean hasMessage() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -748,6 +736,7 @@ public com.google.pubsub.v1.PubsubMessage getMessage() { return messageBuilder_.getMessage(); } } + /** * * @@ -771,6 +760,7 @@ public Builder setMessage(com.google.pubsub.v1.PubsubMessage value) { onChanged(); return this; } + /** * * @@ -791,6 +781,7 @@ public Builder setMessage(com.google.pubsub.v1.PubsubMessage.Builder builderForV onChanged(); return this; } + /** * * @@ -819,6 +810,7 @@ public Builder mergeMessage(com.google.pubsub.v1.PubsubMessage value) { } return this; } + /** * * @@ -839,6 +831,7 @@ public Builder clearMessage() { onChanged(); return this; } + /** * * @@ -852,8 +845,9 @@ public Builder clearMessage() { public com.google.pubsub.v1.PubsubMessage.Builder getMessageBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getMessageFieldBuilder().getBuilder(); + return internalGetMessageFieldBuilder().getBuilder(); } + /** * * @@ -873,6 +867,7 @@ public com.google.pubsub.v1.PubsubMessageOrBuilder getMessageOrBuilder() { : message_; } } + /** * * @@ -883,14 +878,14 @@ public com.google.pubsub.v1.PubsubMessageOrBuilder getMessageOrBuilder() { * .google.pubsub.v1.PubsubMessage message = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PubsubMessage, com.google.pubsub.v1.PubsubMessage.Builder, com.google.pubsub.v1.PubsubMessageOrBuilder> - getMessageFieldBuilder() { + internalGetMessageFieldBuilder() { if (messageBuilder_ == null) { messageBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PubsubMessage, com.google.pubsub.v1.PubsubMessage.Builder, com.google.pubsub.v1.PubsubMessageOrBuilder>( @@ -901,6 +896,7 @@ public com.google.pubsub.v1.PubsubMessageOrBuilder getMessageOrBuilder() { } private int deliveryAttempt_; + /** * * @@ -931,6 +927,7 @@ public com.google.pubsub.v1.PubsubMessageOrBuilder getMessageOrBuilder() { public int getDeliveryAttempt() { return deliveryAttempt_; } + /** * * @@ -965,6 +962,7 @@ public Builder setDeliveryAttempt(int value) { onChanged(); return this; } + /** * * @@ -998,17 +996,6 @@ public Builder clearDeliveryAttempt() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ReceivedMessage) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessageOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessageOrBuilder.java index f352ff532..c5acfe765 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessageOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ReceivedMessageOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ReceivedMessageOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ReceivedMessage) @@ -36,6 +38,7 @@ public interface ReceivedMessageOrBuilder * @return The ackId. */ java.lang.String getAckId(); + /** * * @@ -62,6 +65,7 @@ public interface ReceivedMessageOrBuilder * @return Whether the message field is set. */ boolean hasMessage(); + /** * * @@ -75,6 +79,7 @@ public interface ReceivedMessageOrBuilder * @return The message. */ com.google.pubsub.v1.PubsubMessage getMessage(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicy.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicy.java index ba9ea8952..bc68bddfc 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicy.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicy.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,7 +29,7 @@ * Retry delay will be exponential based on provided minimum and maximum * backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. * - * RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded * events for a given message. * * Retry Policy is implemented on a best effort basis. At times, the delay @@ -38,30 +39,36 @@ * * Protobuf type {@code google.pubsub.v1.RetryPolicy} */ -public final class RetryPolicy extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RetryPolicy extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.RetryPolicy) RetryPolicyOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RetryPolicy"); + } + // Use RetryPolicy.newBuilder() to construct. - private RetryPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RetryPolicy(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private RetryPolicy() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RetryPolicy(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_RetryPolicy_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_RetryPolicy_fieldAccessorTable @@ -72,6 +79,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int MINIMUM_BACKOFF_FIELD_NUMBER = 1; private com.google.protobuf.Duration minimumBackoff_; + /** * * @@ -89,6 +97,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasMinimumBackoff() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -108,6 +117,7 @@ public com.google.protobuf.Duration getMinimumBackoff() { ? com.google.protobuf.Duration.getDefaultInstance() : minimumBackoff_; } + /** * * @@ -128,6 +138,7 @@ public com.google.protobuf.DurationOrBuilder getMinimumBackoffOrBuilder() { public static final int MAXIMUM_BACKOFF_FIELD_NUMBER = 2; private com.google.protobuf.Duration maximumBackoff_; + /** * * @@ -146,6 +157,7 @@ public com.google.protobuf.DurationOrBuilder getMinimumBackoffOrBuilder() { public boolean hasMaximumBackoff() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -166,6 +178,7 @@ public com.google.protobuf.Duration getMaximumBackoff() { ? com.google.protobuf.Duration.getDefaultInstance() : maximumBackoff_; } + /** * * @@ -303,38 +316,38 @@ public static com.google.pubsub.v1.RetryPolicy parseFrom( public static com.google.pubsub.v1.RetryPolicy parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.RetryPolicy parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.RetryPolicy parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.RetryPolicy parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.RetryPolicy parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.RetryPolicy parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -357,10 +370,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -370,7 +384,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * Retry delay will be exponential based on provided minimum and maximum * backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. * - * RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded * events for a given message. * * Retry Policy is implemented on a best effort basis. At times, the delay @@ -380,7 +394,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.RetryPolicy} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.RetryPolicy) com.google.pubsub.v1.RetryPolicyOrBuilder { @@ -390,7 +404,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_RetryPolicy_fieldAccessorTable @@ -404,15 +418,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMinimumBackoffFieldBuilder(); - getMaximumBackoffFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMinimumBackoffFieldBuilder(); + internalGetMaximumBackoffFieldBuilder(); } } @@ -479,39 +493,6 @@ private void buildPartial0(com.google.pubsub.v1.RetryPolicy result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.RetryPolicy) { @@ -558,13 +539,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getMinimumBackoffFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMinimumBackoffFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getMaximumBackoffFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMaximumBackoffFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -588,11 +571,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Duration minimumBackoff_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> minimumBackoffBuilder_; + /** * * @@ -610,6 +594,7 @@ public Builder mergeFrom( public boolean hasMinimumBackoff() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -633,6 +618,7 @@ public com.google.protobuf.Duration getMinimumBackoff() { return minimumBackoffBuilder_.getMessage(); } } + /** * * @@ -658,6 +644,7 @@ public Builder setMinimumBackoff(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -680,6 +667,7 @@ public Builder setMinimumBackoff(com.google.protobuf.Duration.Builder builderFor onChanged(); return this; } + /** * * @@ -710,6 +698,7 @@ public Builder mergeMinimumBackoff(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -732,6 +721,7 @@ public Builder clearMinimumBackoff() { onChanged(); return this; } + /** * * @@ -747,8 +737,9 @@ public Builder clearMinimumBackoff() { public com.google.protobuf.Duration.Builder getMinimumBackoffBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getMinimumBackoffFieldBuilder().getBuilder(); + return internalGetMinimumBackoffFieldBuilder().getBuilder(); } + /** * * @@ -770,6 +761,7 @@ public com.google.protobuf.DurationOrBuilder getMinimumBackoffOrBuilder() { : minimumBackoff_; } } + /** * * @@ -782,14 +774,14 @@ public com.google.protobuf.DurationOrBuilder getMinimumBackoffOrBuilder() { * .google.protobuf.Duration minimum_backoff = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getMinimumBackoffFieldBuilder() { + internalGetMinimumBackoffFieldBuilder() { if (minimumBackoffBuilder_ == null) { minimumBackoffBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -800,11 +792,12 @@ public com.google.protobuf.DurationOrBuilder getMinimumBackoffOrBuilder() { } private com.google.protobuf.Duration maximumBackoff_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> maximumBackoffBuilder_; + /** * * @@ -823,6 +816,7 @@ public com.google.protobuf.DurationOrBuilder getMinimumBackoffOrBuilder() { public boolean hasMaximumBackoff() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -847,6 +841,7 @@ public com.google.protobuf.Duration getMaximumBackoff() { return maximumBackoffBuilder_.getMessage(); } } + /** * * @@ -873,6 +868,7 @@ public Builder setMaximumBackoff(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -896,6 +892,7 @@ public Builder setMaximumBackoff(com.google.protobuf.Duration.Builder builderFor onChanged(); return this; } + /** * * @@ -927,6 +924,7 @@ public Builder mergeMaximumBackoff(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -950,6 +948,7 @@ public Builder clearMaximumBackoff() { onChanged(); return this; } + /** * * @@ -966,8 +965,9 @@ public Builder clearMaximumBackoff() { public com.google.protobuf.Duration.Builder getMaximumBackoffBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getMaximumBackoffFieldBuilder().getBuilder(); + return internalGetMaximumBackoffFieldBuilder().getBuilder(); } + /** * * @@ -990,6 +990,7 @@ public com.google.protobuf.DurationOrBuilder getMaximumBackoffOrBuilder() { : maximumBackoff_; } } + /** * * @@ -1003,14 +1004,14 @@ public com.google.protobuf.DurationOrBuilder getMaximumBackoffOrBuilder() { * .google.protobuf.Duration maximum_backoff = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getMaximumBackoffFieldBuilder() { + internalGetMaximumBackoffFieldBuilder() { if (maximumBackoffBuilder_ == null) { maximumBackoffBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -1020,17 +1021,6 @@ public com.google.protobuf.DurationOrBuilder getMaximumBackoffOrBuilder() { return maximumBackoffBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.RetryPolicy) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicyOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicyOrBuilder.java index 3437158f7..1d4583231 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicyOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicyOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface RetryPolicyOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.RetryPolicy) @@ -38,6 +40,7 @@ public interface RetryPolicyOrBuilder * @return Whether the minimumBackoff field is set. */ boolean hasMinimumBackoff(); + /** * * @@ -52,6 +55,7 @@ public interface RetryPolicyOrBuilder * @return The minimumBackoff. */ com.google.protobuf.Duration getMinimumBackoff(); + /** * * @@ -80,6 +84,7 @@ public interface RetryPolicyOrBuilder * @return Whether the maximumBackoff field is set. */ boolean hasMaximumBackoff(); + /** * * @@ -95,6 +100,7 @@ public interface RetryPolicyOrBuilder * @return The maximumBackoff. */ com.google.protobuf.Duration getMaximumBackoff(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RollbackSchemaRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RollbackSchemaRequest.java index cde07f4aa..651e58a5a 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RollbackSchemaRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RollbackSchemaRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.RollbackSchemaRequest} */ -public final class RollbackSchemaRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RollbackSchemaRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.RollbackSchemaRequest) RollbackSchemaRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RollbackSchemaRequest"); + } + // Use RollbackSchemaRequest.newBuilder() to construct. - private RollbackSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RollbackSchemaRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private RollbackSchemaRequest() { revisionId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RollbackSchemaRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_RollbackSchemaRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_RollbackSchemaRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -123,6 +132,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object revisionId_ = ""; + /** * * @@ -130,7 +140,7 @@ public com.google.protobuf.ByteString getNameBytes() { * Required. The revision ID to roll back to. * It must be a revision of the same schema. * - * Example: c7cfa2a8 + * Example: c7cfa2a8 * * * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -149,6 +159,7 @@ public java.lang.String getRevisionId() { return s; } } + /** * * @@ -156,7 +167,7 @@ public java.lang.String getRevisionId() { * Required. The revision ID to roll back to. * It must be a revision of the same schema. * - * Example: c7cfa2a8 + * Example: c7cfa2a8 * * * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -190,11 +201,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, revisionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(revisionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, revisionId_); } getUnknownFields().writeTo(output); } @@ -205,11 +216,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, revisionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(revisionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, revisionId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -286,38 +297,38 @@ public static com.google.pubsub.v1.RollbackSchemaRequest parseFrom( public static com.google.pubsub.v1.RollbackSchemaRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.RollbackSchemaRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.RollbackSchemaRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.RollbackSchemaRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.RollbackSchemaRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.RollbackSchemaRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -340,10 +351,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -353,7 +365,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.RollbackSchemaRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.RollbackSchemaRequest) com.google.pubsub.v1.RollbackSchemaRequestOrBuilder { @@ -363,7 +375,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_RollbackSchemaRequest_fieldAccessorTable @@ -375,7 +387,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.RollbackSchemaRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -429,39 +441,6 @@ private void buildPartial0(com.google.pubsub.v1.RollbackSchemaRequest 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.pubsub.v1.RollbackSchemaRequest) { @@ -542,6 +521,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -566,6 +546,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -590,6 +571,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -613,6 +595,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -632,6 +615,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -658,6 +642,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object revisionId_ = ""; + /** * * @@ -665,7 +650,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * Required. The revision ID to roll back to. * It must be a revision of the same schema. * - * Example: c7cfa2a8 + * Example: c7cfa2a8 * * * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -683,6 +668,7 @@ public java.lang.String getRevisionId() { return (java.lang.String) ref; } } + /** * * @@ -690,7 +676,7 @@ public java.lang.String getRevisionId() { * Required. The revision ID to roll back to. * It must be a revision of the same schema. * - * Example: c7cfa2a8 + * Example: c7cfa2a8 * * * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -708,6 +694,7 @@ public com.google.protobuf.ByteString getRevisionIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -715,7 +702,7 @@ public com.google.protobuf.ByteString getRevisionIdBytes() { * Required. The revision ID to roll back to. * It must be a revision of the same schema. * - * Example: c7cfa2a8 + * Example: c7cfa2a8 * * * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -732,6 +719,7 @@ public Builder setRevisionId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -739,7 +727,7 @@ public Builder setRevisionId(java.lang.String value) { * Required. The revision ID to roll back to. * It must be a revision of the same schema. * - * Example: c7cfa2a8 + * Example: c7cfa2a8 * * * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -752,6 +740,7 @@ public Builder clearRevisionId() { onChanged(); return this; } + /** * * @@ -759,7 +748,7 @@ public Builder clearRevisionId() { * Required. The revision ID to roll back to. * It must be a revision of the same schema. * - * Example: c7cfa2a8 + * Example: c7cfa2a8 * * * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -778,17 +767,6 @@ public Builder setRevisionIdBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.RollbackSchemaRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RollbackSchemaRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RollbackSchemaRequestOrBuilder.java index d3be6be3c..3a99e5b04 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RollbackSchemaRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RollbackSchemaRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface RollbackSchemaRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.RollbackSchemaRequest) @@ -38,6 +40,7 @@ public interface RollbackSchemaRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -60,7 +63,7 @@ public interface RollbackSchemaRequestOrBuilder * Required. The revision ID to roll back to. * It must be a revision of the same schema. * - * Example: c7cfa2a8 + * Example: c7cfa2a8 * * * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -68,6 +71,7 @@ public interface RollbackSchemaRequestOrBuilder * @return The revisionId. */ java.lang.String getRevisionId(); + /** * * @@ -75,7 +79,7 @@ public interface RollbackSchemaRequestOrBuilder * Required. The revision ID to roll back to. * It must be a revision of the same schema. * - * Example: c7cfa2a8 + * Example: c7cfa2a8 * * * string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Schema.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Schema.java index 52357cf32..c5cf382ad 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Schema.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Schema.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.Schema} */ -public final class Schema extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Schema extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.Schema) SchemaOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Schema"); + } + // Use Schema.newBuilder() to construct. - private Schema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Schema(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,18 +58,12 @@ private Schema() { revisionId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Schema(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto.internal_static_google_pubsub_v1_Schema_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_Schema_fieldAccessorTable @@ -107,6 +114,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Type"); + } + /** * * @@ -117,6 +134,7 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * TYPE_UNSPECIFIED = 0; */ public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** * * @@ -127,6 +145,7 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * PROTOCOL_BUFFER = 1; */ public static final int PROTOCOL_BUFFER_VALUE = 1; + /** * * @@ -196,7 +215,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.pubsub.v1.Schema.getDescriptor().getEnumTypes().get(0); } @@ -226,6 +245,7 @@ private Type(int value) { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -250,6 +270,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -277,6 +298,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int TYPE_FIELD_NUMBER = 2; private int type_ = 0; + /** * * @@ -292,6 +314,7 @@ public com.google.protobuf.ByteString getNameBytes() { public int getTypeValue() { return type_; } + /** * * @@ -313,6 +336,7 @@ public com.google.pubsub.v1.Schema.Type getType() { @SuppressWarnings("serial") private volatile java.lang.Object definition_ = ""; + /** * * @@ -338,6 +362,7 @@ public java.lang.String getDefinition() { return s; } } + /** * * @@ -368,6 +393,7 @@ public com.google.protobuf.ByteString getDefinitionBytes() { @SuppressWarnings("serial") private volatile java.lang.Object revisionId_ = ""; + /** * * @@ -393,6 +419,7 @@ public java.lang.String getRevisionId() { return s; } } + /** * * @@ -421,6 +448,7 @@ public com.google.protobuf.ByteString getRevisionIdBytes() { public static final int REVISION_CREATE_TIME_FIELD_NUMBER = 6; private com.google.protobuf.Timestamp revisionCreateTime_; + /** * * @@ -438,6 +466,7 @@ public com.google.protobuf.ByteString getRevisionIdBytes() { public boolean hasRevisionCreateTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -457,6 +486,7 @@ public com.google.protobuf.Timestamp getRevisionCreateTime() { ? com.google.protobuf.Timestamp.getDefaultInstance() : revisionCreateTime_; } + /** * * @@ -489,17 +519,17 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (type_ != com.google.pubsub.v1.Schema.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(2, type_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(definition_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, definition_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(definition_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, definition_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, revisionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(revisionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, revisionId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(6, getRevisionCreateTime()); @@ -513,17 +543,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (type_ != com.google.pubsub.v1.Schema.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(definition_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, definition_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(definition_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, definition_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, revisionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(revisionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, revisionId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getRevisionCreateTime()); @@ -615,38 +645,38 @@ public static com.google.pubsub.v1.Schema parseFrom( public static com.google.pubsub.v1.Schema parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.Schema parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.Schema parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.Schema parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.Schema parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.Schema parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -669,10 +699,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -682,7 +713,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.Schema} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.Schema) com.google.pubsub.v1.SchemaOrBuilder { @@ -691,7 +722,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_Schema_fieldAccessorTable @@ -704,14 +735,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRevisionCreateTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRevisionCreateTimeFieldBuilder(); } } @@ -785,39 +816,6 @@ private void buildPartial0(com.google.pubsub.v1.Schema result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.Schema) { @@ -904,7 +902,7 @@ public Builder mergeFrom( case 50: { input.readMessage( - getRevisionCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + internalGetRevisionCreateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 50 @@ -928,6 +926,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -951,6 +950,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -974,6 +974,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -996,6 +997,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1014,6 +1016,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -1039,6 +1042,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private int type_ = 0; + /** * * @@ -1054,6 +1058,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public int getTypeValue() { return type_; } + /** * * @@ -1072,6 +1077,7 @@ public Builder setTypeValue(int value) { onChanged(); return this; } + /** * * @@ -1088,6 +1094,7 @@ public com.google.pubsub.v1.Schema.Type getType() { com.google.pubsub.v1.Schema.Type result = com.google.pubsub.v1.Schema.Type.forNumber(type_); return result == null ? com.google.pubsub.v1.Schema.Type.UNRECOGNIZED : result; } + /** * * @@ -1109,6 +1116,7 @@ public Builder setType(com.google.pubsub.v1.Schema.Type value) { onChanged(); return this; } + /** * * @@ -1128,6 +1136,7 @@ public Builder clearType() { } private java.lang.Object definition_ = ""; + /** * * @@ -1152,6 +1161,7 @@ public java.lang.String getDefinition() { return (java.lang.String) ref; } } + /** * * @@ -1176,6 +1186,7 @@ public com.google.protobuf.ByteString getDefinitionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1199,6 +1210,7 @@ public Builder setDefinition(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1218,6 +1230,7 @@ public Builder clearDefinition() { onChanged(); return this; } + /** * * @@ -1244,6 +1257,7 @@ public Builder setDefinitionBytes(com.google.protobuf.ByteString value) { } private java.lang.Object revisionId_ = ""; + /** * * @@ -1268,6 +1282,7 @@ public java.lang.String getRevisionId() { return (java.lang.String) ref; } } + /** * * @@ -1292,6 +1307,7 @@ public com.google.protobuf.ByteString getRevisionIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1315,6 +1331,7 @@ public Builder setRevisionId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1334,6 +1351,7 @@ public Builder clearRevisionId() { onChanged(); return this; } + /** * * @@ -1360,11 +1378,12 @@ public Builder setRevisionIdBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp revisionCreateTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> revisionCreateTimeBuilder_; + /** * * @@ -1381,6 +1400,7 @@ public Builder setRevisionIdBytes(com.google.protobuf.ByteString value) { public boolean hasRevisionCreateTime() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1403,6 +1423,7 @@ public com.google.protobuf.Timestamp getRevisionCreateTime() { return revisionCreateTimeBuilder_.getMessage(); } } + /** * * @@ -1427,6 +1448,7 @@ public Builder setRevisionCreateTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1448,6 +1470,7 @@ public Builder setRevisionCreateTime(com.google.protobuf.Timestamp.Builder build onChanged(); return this; } + /** * * @@ -1477,6 +1500,7 @@ public Builder mergeRevisionCreateTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1498,6 +1522,7 @@ public Builder clearRevisionCreateTime() { onChanged(); return this; } + /** * * @@ -1512,8 +1537,9 @@ public Builder clearRevisionCreateTime() { public com.google.protobuf.Timestamp.Builder getRevisionCreateTimeBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getRevisionCreateTimeFieldBuilder().getBuilder(); + return internalGetRevisionCreateTimeFieldBuilder().getBuilder(); } + /** * * @@ -1534,6 +1560,7 @@ public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { : revisionCreateTime_; } } + /** * * @@ -1545,14 +1572,14 @@ public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { * .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getRevisionCreateTimeFieldBuilder() { + internalGetRevisionCreateTimeFieldBuilder() { if (revisionCreateTimeBuilder_ == null) { revisionCreateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1562,17 +1589,6 @@ public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { return revisionCreateTimeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.Schema) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaName.java index d4bb6fa5f..b3eaa772f 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaOrBuilder.java index 6974c7663..07b9739b1 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface SchemaOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.Schema) @@ -37,6 +39,7 @@ public interface SchemaOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -63,6 +66,7 @@ public interface SchemaOrBuilder * @return The enum numeric value on the wire for type. */ int getTypeValue(); + /** * * @@ -90,6 +94,7 @@ public interface SchemaOrBuilder * @return The definition. */ java.lang.String getDefinition(); + /** * * @@ -119,6 +124,7 @@ public interface SchemaOrBuilder * @return The revisionId. */ java.lang.String getRevisionId(); + /** * * @@ -148,6 +154,7 @@ public interface SchemaOrBuilder * @return Whether the revisionCreateTime field is set. */ boolean hasRevisionCreateTime(); + /** * * @@ -162,6 +169,7 @@ public interface SchemaOrBuilder * @return The revisionCreateTime. */ com.google.protobuf.Timestamp getRevisionCreateTime(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaProto.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaProto.java index 4f028362a..6964d4e1d 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaProto.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; -public final class SchemaProto { +@com.google.protobuf.Generated +public final class SchemaProto extends com.google.protobuf.GeneratedFile { private SchemaProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SchemaProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,63 +42,63 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_Schema_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_Schema_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_CreateSchemaRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_CreateSchemaRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_GetSchemaRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_GetSchemaRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListSchemasRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ListSchemasRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListSchemasResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ListSchemasResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListSchemaRevisionsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ListSchemaRevisionsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ListSchemaRevisionsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ListSchemaRevisionsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_CommitSchemaRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_CommitSchemaRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_RollbackSchemaRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_RollbackSchemaRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_DeleteSchemaRevisionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_DeleteSchemaRevisionRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_DeleteSchemaRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_DeleteSchemaRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ValidateSchemaRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ValidateSchemaRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ValidateSchemaResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ValidateSchemaResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ValidateMessageRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ValidateMessageRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ValidateMessageResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_pubsub_v1_ValidateMessageResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -198,8 +210,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "com\322AUhttps://www.googleapis.com/auth/cl" + "oud-platform,https://www.googleapis.com/" + "auth/pubsubB\252\001\n\024com.google.pubsub.v1B\013Sc" - + "hemaProtoP\001Z2cloud.google.com/go/pubsub/" - + "apiv1/pubsubpb;pubsubpb\370\001\001\252\002\026Google.Clou" + + "hemaProtoP\001Z5cloud.google.com/go/pubsub/" + + "v2/apiv1/pubsubpb;pubsubpb\252\002\026Google.Clou" + "d.PubSub.V1\312\002\026Google\\Cloud\\PubSub\\V1\352\002\031G" + "oogle::Cloud::PubSub::V1b\006proto3" }; @@ -214,121 +226,128 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); - internal_static_google_pubsub_v1_Schema_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_pubsub_v1_Schema_descriptor = getDescriptor().getMessageType(0); internal_static_google_pubsub_v1_Schema_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_Schema_descriptor, new java.lang.String[] { "Name", "Type", "Definition", "RevisionId", "RevisionCreateTime", }); internal_static_google_pubsub_v1_CreateSchemaRequest_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageType(1); internal_static_google_pubsub_v1_CreateSchemaRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_CreateSchemaRequest_descriptor, new java.lang.String[] { "Parent", "Schema", "SchemaId", }); internal_static_google_pubsub_v1_GetSchemaRequest_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageType(2); internal_static_google_pubsub_v1_GetSchemaRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_GetSchemaRequest_descriptor, new java.lang.String[] { "Name", "View", }); internal_static_google_pubsub_v1_ListSchemasRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageType(3); internal_static_google_pubsub_v1_ListSchemasRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ListSchemasRequest_descriptor, new java.lang.String[] { "Parent", "View", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListSchemasResponse_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageType(4); internal_static_google_pubsub_v1_ListSchemasResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ListSchemasResponse_descriptor, new java.lang.String[] { "Schemas", "NextPageToken", }); internal_static_google_pubsub_v1_ListSchemaRevisionsRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageType(5); internal_static_google_pubsub_v1_ListSchemaRevisionsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ListSchemaRevisionsRequest_descriptor, new java.lang.String[] { "Name", "View", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListSchemaRevisionsResponse_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageType(6); internal_static_google_pubsub_v1_ListSchemaRevisionsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ListSchemaRevisionsResponse_descriptor, new java.lang.String[] { "Schemas", "NextPageToken", }); internal_static_google_pubsub_v1_CommitSchemaRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageType(7); internal_static_google_pubsub_v1_CommitSchemaRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_CommitSchemaRequest_descriptor, new java.lang.String[] { "Name", "Schema", }); internal_static_google_pubsub_v1_RollbackSchemaRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageType(8); internal_static_google_pubsub_v1_RollbackSchemaRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_RollbackSchemaRequest_descriptor, new java.lang.String[] { "Name", "RevisionId", }); internal_static_google_pubsub_v1_DeleteSchemaRevisionRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageType(9); internal_static_google_pubsub_v1_DeleteSchemaRevisionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteSchemaRevisionRequest_descriptor, new java.lang.String[] { "Name", "RevisionId", }); internal_static_google_pubsub_v1_DeleteSchemaRequest_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageType(10); internal_static_google_pubsub_v1_DeleteSchemaRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteSchemaRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_pubsub_v1_ValidateSchemaRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageType(11); internal_static_google_pubsub_v1_ValidateSchemaRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ValidateSchemaRequest_descriptor, new java.lang.String[] { "Parent", "Schema", }); internal_static_google_pubsub_v1_ValidateSchemaResponse_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageType(12); internal_static_google_pubsub_v1_ValidateSchemaResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ValidateSchemaResponse_descriptor, new java.lang.String[] {}); internal_static_google_pubsub_v1_ValidateMessageRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageType(13); internal_static_google_pubsub_v1_ValidateMessageRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ValidateMessageRequest_descriptor, new java.lang.String[] { "Parent", "Name", "Schema", "Message", "Encoding", "SchemaSpec", }); internal_static_google_pubsub_v1_ValidateMessageResponse_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageType(14); internal_static_google_pubsub_v1_ValidateMessageResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_pubsub_v1_ValidateMessageResponse_descriptor, new java.lang.String[] {}); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -340,12 +359,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaSettings.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaSettings.java index 834e3dbf2..b7f4a37ae 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaSettings.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.SchemaSettings} */ -public final class SchemaSettings extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class SchemaSettings extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.SchemaSettings) SchemaSettingsOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SchemaSettings"); + } + // Use SchemaSettings.newBuilder() to construct. - private SchemaSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SchemaSettings(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +58,13 @@ private SchemaSettings() { lastRevisionId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SchemaSettings(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_SchemaSettings_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_SchemaSettings_fieldAccessorTable @@ -70,6 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object schema_ = ""; + /** * * @@ -98,6 +106,7 @@ public java.lang.String getSchema() { return s; } } + /** * * @@ -129,6 +138,7 @@ public com.google.protobuf.ByteString getSchemaBytes() { public static final int ENCODING_FIELD_NUMBER = 2; private int encoding_ = 0; + /** * * @@ -144,6 +154,7 @@ public com.google.protobuf.ByteString getSchemaBytes() { public int getEncodingValue() { return encoding_; } + /** * * @@ -165,6 +176,7 @@ public com.google.pubsub.v1.Encoding getEncoding() { @SuppressWarnings("serial") private volatile java.lang.Object firstRevisionId_ = ""; + /** * * @@ -190,6 +202,7 @@ public java.lang.String getFirstRevisionId() { return s; } } + /** * * @@ -220,6 +233,7 @@ public com.google.protobuf.ByteString getFirstRevisionIdBytes() { @SuppressWarnings("serial") private volatile java.lang.Object lastRevisionId_ = ""; + /** * * @@ -245,6 +259,7 @@ public java.lang.String getLastRevisionId() { return s; } } + /** * * @@ -285,17 +300,17 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schema_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schema_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(schema_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, schema_); } if (encoding_ != com.google.pubsub.v1.Encoding.ENCODING_UNSPECIFIED.getNumber()) { output.writeEnum(2, encoding_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firstRevisionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, firstRevisionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(firstRevisionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, firstRevisionId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastRevisionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, lastRevisionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(lastRevisionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, lastRevisionId_); } getUnknownFields().writeTo(output); } @@ -306,17 +321,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schema_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schema_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(schema_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, schema_); } if (encoding_ != com.google.pubsub.v1.Encoding.ENCODING_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, encoding_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firstRevisionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, firstRevisionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(firstRevisionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, firstRevisionId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastRevisionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, lastRevisionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(lastRevisionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, lastRevisionId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -397,38 +412,38 @@ public static com.google.pubsub.v1.SchemaSettings parseFrom( public static com.google.pubsub.v1.SchemaSettings parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.SchemaSettings parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.SchemaSettings parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.SchemaSettings parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.SchemaSettings parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.SchemaSettings parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -451,10 +466,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -464,7 +480,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.SchemaSettings} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.SchemaSettings) com.google.pubsub.v1.SchemaSettingsOrBuilder { @@ -474,7 +490,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_SchemaSettings_fieldAccessorTable @@ -486,7 +502,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.SchemaSettings.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -547,39 +563,6 @@ private void buildPartial0(com.google.pubsub.v1.SchemaSettings 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.pubsub.v1.SchemaSettings) { @@ -680,6 +663,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object schema_ = ""; + /** * * @@ -707,6 +691,7 @@ public java.lang.String getSchema() { return (java.lang.String) ref; } } + /** * * @@ -734,6 +719,7 @@ public com.google.protobuf.ByteString getSchemaBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -760,6 +746,7 @@ public Builder setSchema(java.lang.String value) { onChanged(); return this; } + /** * * @@ -782,6 +769,7 @@ public Builder clearSchema() { onChanged(); return this; } + /** * * @@ -811,6 +799,7 @@ public Builder setSchemaBytes(com.google.protobuf.ByteString value) { } private int encoding_ = 0; + /** * * @@ -827,6 +816,7 @@ public Builder setSchemaBytes(com.google.protobuf.ByteString value) { public int getEncodingValue() { return encoding_; } + /** * * @@ -846,6 +836,7 @@ public Builder setEncodingValue(int value) { onChanged(); return this; } + /** * * @@ -863,6 +854,7 @@ public com.google.pubsub.v1.Encoding getEncoding() { com.google.pubsub.v1.Encoding result = com.google.pubsub.v1.Encoding.forNumber(encoding_); return result == null ? com.google.pubsub.v1.Encoding.UNRECOGNIZED : result; } + /** * * @@ -885,6 +877,7 @@ public Builder setEncoding(com.google.pubsub.v1.Encoding value) { onChanged(); return this; } + /** * * @@ -905,6 +898,7 @@ public Builder clearEncoding() { } private java.lang.Object firstRevisionId_ = ""; + /** * * @@ -929,6 +923,7 @@ public java.lang.String getFirstRevisionId() { return (java.lang.String) ref; } } + /** * * @@ -953,6 +948,7 @@ public com.google.protobuf.ByteString getFirstRevisionIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -976,6 +972,7 @@ public Builder setFirstRevisionId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -995,6 +992,7 @@ public Builder clearFirstRevisionId() { onChanged(); return this; } + /** * * @@ -1021,6 +1019,7 @@ public Builder setFirstRevisionIdBytes(com.google.protobuf.ByteString value) { } private java.lang.Object lastRevisionId_ = ""; + /** * * @@ -1045,6 +1044,7 @@ public java.lang.String getLastRevisionId() { return (java.lang.String) ref; } } + /** * * @@ -1069,6 +1069,7 @@ public com.google.protobuf.ByteString getLastRevisionIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1092,6 +1093,7 @@ public Builder setLastRevisionId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1111,6 +1113,7 @@ public Builder clearLastRevisionId() { onChanged(); return this; } + /** * * @@ -1136,17 +1139,6 @@ public Builder setLastRevisionIdBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.SchemaSettings) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaSettingsOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaSettingsOrBuilder.java index 979132348..a5f003482 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaSettingsOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaSettingsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface SchemaSettingsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.SchemaSettings) @@ -41,6 +43,7 @@ public interface SchemaSettingsOrBuilder * @return The schema. */ java.lang.String getSchema(); + /** * * @@ -71,6 +74,7 @@ public interface SchemaSettingsOrBuilder * @return The enum numeric value on the wire for encoding. */ int getEncodingValue(); + /** * * @@ -98,6 +102,7 @@ public interface SchemaSettingsOrBuilder * @return The firstRevisionId. */ java.lang.String getFirstRevisionId(); + /** * * @@ -127,6 +132,7 @@ public interface SchemaSettingsOrBuilder * @return The lastRevisionId. */ java.lang.String getLastRevisionId(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaView.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaView.java index d2964ddc8..4a9a82324 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaView.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaView.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,6 +29,7 @@ * * Protobuf enum {@code google.pubsub.v1.SchemaView} */ +@com.google.protobuf.Generated public enum SchemaView implements com.google.protobuf.ProtocolMessageEnum { /** * @@ -63,6 +65,16 @@ public enum SchemaView implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SchemaView"); + } + /** * * @@ -74,6 +86,7 @@ public enum SchemaView implements com.google.protobuf.ProtocolMessageEnum { * SCHEMA_VIEW_UNSPECIFIED = 0; */ public static final int SCHEMA_VIEW_UNSPECIFIED_VALUE = 0; + /** * * @@ -84,6 +97,7 @@ public enum SchemaView implements com.google.protobuf.ProtocolMessageEnum { * BASIC = 1; */ public static final int BASIC_VALUE = 1; + /** * * @@ -153,7 +167,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto.getDescriptor().getEnumTypes().get(0); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java index ce9a01558..da4217b2f 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.SeekRequest} */ -public final class SeekRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class SeekRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.SeekRequest) SeekRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SeekRequest"); + } + // Use SeekRequest.newBuilder() to construct. - private SeekRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SeekRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,18 +55,12 @@ private SeekRequest() { subscription_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SeekRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_SeekRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_SeekRequest_fieldAccessorTable @@ -78,6 +85,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. @@ -114,6 +122,7 @@ public TargetCase getTargetCase() { @SuppressWarnings("serial") private volatile java.lang.Object subscription_ = ""; + /** * * @@ -139,6 +148,7 @@ public java.lang.String getSubscription() { return s; } } + /** * * @@ -166,6 +176,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { } public static final int TIME_FIELD_NUMBER = 2; + /** * * @@ -191,6 +202,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { public boolean hasTime() { return targetCase_ == 2; } + /** * * @@ -219,6 +231,7 @@ public com.google.protobuf.Timestamp getTime() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -247,6 +260,7 @@ public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() { } public static final int SNAPSHOT_FIELD_NUMBER = 3; + /** * * @@ -265,6 +279,7 @@ public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() { public boolean hasSnapshot() { return targetCase_ == 3; } + /** * * @@ -296,6 +311,7 @@ public java.lang.String getSnapshot() { return s; } } + /** * * @@ -342,14 +358,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); } if (targetCase_ == 2) { output.writeMessage(2, (com.google.protobuf.Timestamp) target_); } if (targetCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + com.google.protobuf.GeneratedMessage.writeString(output, 3, target_); } getUnknownFields().writeTo(output); } @@ -360,8 +376,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); } if (targetCase_ == 2) { size += @@ -369,7 +385,7 @@ public int getSerializedSize() { 2, (com.google.protobuf.Timestamp) target_); } if (targetCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, target_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -464,38 +480,38 @@ public static com.google.pubsub.v1.SeekRequest parseFrom( public static com.google.pubsub.v1.SeekRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.SeekRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.SeekRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.SeekRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.SeekRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.SeekRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -518,10 +534,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -531,7 +548,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.SeekRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.SeekRequest) com.google.pubsub.v1.SeekRequestOrBuilder { @@ -541,7 +558,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_SeekRequest_fieldAccessorTable @@ -553,7 +570,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.SeekRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -616,39 +633,6 @@ private void buildPartialOneofs(com.google.pubsub.v1.SeekRequest 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.pubsub.v1.SeekRequest) { @@ -718,7 +702,7 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetTimeFieldBuilder().getBuilder(), extensionRegistry); targetCase_ = 2; break; } // case 18 @@ -763,6 +747,7 @@ public Builder clearTarget() { private int bitField0_; private java.lang.Object subscription_ = ""; + /** * * @@ -787,6 +772,7 @@ public java.lang.String getSubscription() { return (java.lang.String) ref; } } + /** * * @@ -811,6 +797,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -834,6 +821,7 @@ public Builder setSubscription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -853,6 +841,7 @@ public Builder clearSubscription() { onChanged(); return this; } + /** * * @@ -878,11 +867,12 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timeBuilder_; + /** * * @@ -908,6 +898,7 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { public boolean hasTime() { return targetCase_ == 2; } + /** * * @@ -943,6 +934,7 @@ public com.google.protobuf.Timestamp getTime() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -975,6 +967,7 @@ public Builder setTime(com.google.protobuf.Timestamp value) { targetCase_ = 2; return this; } + /** * * @@ -1004,6 +997,7 @@ public Builder setTime(com.google.protobuf.Timestamp.Builder builderForValue) { targetCase_ = 2; return this; } + /** * * @@ -1044,6 +1038,7 @@ public Builder mergeTime(com.google.protobuf.Timestamp value) { targetCase_ = 2; return this; } + /** * * @@ -1079,6 +1074,7 @@ public Builder clearTime() { } return this; } + /** * * @@ -1099,8 +1095,9 @@ public Builder clearTime() { * .google.protobuf.Timestamp time = 2 [(.google.api.field_behavior) = OPTIONAL]; */ public com.google.protobuf.Timestamp.Builder getTimeBuilder() { - return getTimeFieldBuilder().getBuilder(); + return internalGetTimeFieldBuilder().getBuilder(); } + /** * * @@ -1131,6 +1128,7 @@ public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1150,17 +1148,17 @@ public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() { * * .google.protobuf.Timestamp time = 2 [(.google.api.field_behavior) = OPTIONAL]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getTimeFieldBuilder() { + internalGetTimeFieldBuilder() { if (timeBuilder_ == null) { if (!(targetCase_ == 2)) { target_ = com.google.protobuf.Timestamp.getDefaultInstance(); } timeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1191,6 +1189,7 @@ public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() { public boolean hasSnapshot() { return targetCase_ == 3; } + /** * * @@ -1223,6 +1222,7 @@ public java.lang.String getSnapshot() { return (java.lang.String) ref; } } + /** * * @@ -1255,6 +1255,7 @@ public com.google.protobuf.ByteString getSnapshotBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1280,6 +1281,7 @@ public Builder setSnapshot(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1303,6 +1305,7 @@ public Builder clearSnapshot() { } return this; } + /** * * @@ -1330,17 +1333,6 @@ public Builder setSnapshotBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.SeekRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequestOrBuilder.java index 70b5a13ae..e597f2c52 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface SeekRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.SeekRequest) @@ -38,6 +40,7 @@ public interface SeekRequestOrBuilder * @return The subscription. */ java.lang.String getSubscription(); + /** * * @@ -75,6 +78,7 @@ public interface SeekRequestOrBuilder * @return Whether the time field is set. */ boolean hasTime(); + /** * * @@ -97,6 +101,7 @@ public interface SeekRequestOrBuilder * @return The time. */ com.google.protobuf.Timestamp getTime(); + /** * * @@ -134,6 +139,7 @@ public interface SeekRequestOrBuilder * @return Whether the snapshot field is set. */ boolean hasSnapshot(); + /** * * @@ -150,6 +156,7 @@ public interface SeekRequestOrBuilder * @return The snapshot. */ java.lang.String getSnapshot(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekResponse.java index 9a9f4c4a3..882eb143a 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.pubsub.v1.SeekResponse} */ -public final class SeekResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class SeekResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.SeekResponse) SeekResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SeekResponse"); + } + // Use SeekResponse.newBuilder() to construct. - private SeekResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SeekResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SeekResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SeekResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_SeekResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_SeekResponse_fieldAccessorTable @@ -151,38 +158,38 @@ public static com.google.pubsub.v1.SeekResponse parseFrom( public static com.google.pubsub.v1.SeekResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.SeekResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.SeekResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.SeekResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.SeekResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.SeekResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -205,10 +212,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -218,7 +226,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.SeekResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.SeekResponse) com.google.pubsub.v1.SeekResponseOrBuilder { @@ -228,7 +236,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_SeekResponse_fieldAccessorTable @@ -240,7 +248,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.SeekResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -277,39 +285,6 @@ public com.google.pubsub.v1.SeekResponse buildPartial() { return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.SeekResponse) { @@ -365,17 +340,6 @@ public Builder mergeFrom( return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.SeekResponse) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekResponseOrBuilder.java index 0b47b94e2..9d214afc7 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SeekResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface SeekResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.SeekResponse) diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java index 36faa854d..b9179a725 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Snapshot.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -32,13 +33,25 @@ * * Protobuf type {@code google.pubsub.v1.Snapshot} */ -public final class Snapshot extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Snapshot extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.Snapshot) SnapshotOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Snapshot"); + } + // Use Snapshot.newBuilder() to construct. - private Snapshot(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Snapshot(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -47,12 +60,6 @@ private Snapshot() { topic_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Snapshot(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_Snapshot_descriptor; } @@ -70,7 +77,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_Snapshot_fieldAccessorTable @@ -83,6 +90,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -106,6 +114,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -134,6 +143,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object topic_ = ""; + /** * * @@ -160,6 +170,7 @@ public java.lang.String getTopic() { return s; } } + /** * * @@ -189,6 +200,7 @@ public com.google.protobuf.ByteString getTopicBytes() { public static final int EXPIRE_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp expireTime_; + /** * * @@ -214,6 +226,7 @@ public com.google.protobuf.ByteString getTopicBytes() { public boolean hasExpireTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -239,6 +252,7 @@ public boolean hasExpireTime() { public com.google.protobuf.Timestamp getExpireTime() { return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; } + /** * * @@ -289,6 +303,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -306,12 +321,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(); } + /** * * @@ -326,6 +343,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -347,6 +365,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -383,16 +402,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, topic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, topic_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getExpireTime()); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); getUnknownFields().writeTo(output); } @@ -403,11 +422,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, topic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, topic_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExpireTime()); @@ -508,38 +527,38 @@ public static com.google.pubsub.v1.Snapshot parseFrom( public static com.google.pubsub.v1.Snapshot parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.Snapshot parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.Snapshot parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.Snapshot parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.Snapshot parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.Snapshot parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -562,10 +581,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -579,7 +599,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.Snapshot} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.Snapshot) com.google.pubsub.v1.SnapshotOrBuilder { @@ -610,7 +630,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_Snapshot_fieldAccessorTable @@ -623,14 +643,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getExpireTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetExpireTimeFieldBuilder(); } } @@ -698,39 +718,6 @@ private void buildPartial0(com.google.pubsub.v1.Snapshot result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.Snapshot) { @@ -798,7 +785,8 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetExpireTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -834,6 +822,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -856,6 +845,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -878,6 +868,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -899,6 +890,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -916,6 +908,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -940,6 +933,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object topic_ = ""; + /** * * @@ -965,6 +959,7 @@ public java.lang.String getTopic() { return (java.lang.String) ref; } } + /** * * @@ -990,6 +985,7 @@ public com.google.protobuf.ByteString getTopicBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1014,6 +1010,7 @@ public Builder setTopic(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1034,6 +1031,7 @@ public Builder clearTopic() { onChanged(); return this; } + /** * * @@ -1061,11 +1059,12 @@ public Builder setTopicBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp expireTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expireTimeBuilder_; + /** * * @@ -1090,6 +1089,7 @@ public Builder setTopicBytes(com.google.protobuf.ByteString value) { public boolean hasExpireTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1120,6 +1120,7 @@ public com.google.protobuf.Timestamp getExpireTime() { return expireTimeBuilder_.getMessage(); } } + /** * * @@ -1152,6 +1153,7 @@ public Builder setExpireTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1181,6 +1183,7 @@ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1218,6 +1221,7 @@ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1247,6 +1251,7 @@ public Builder clearExpireTime() { onChanged(); return this; } + /** * * @@ -1269,8 +1274,9 @@ public Builder clearExpireTime() { public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getExpireTimeFieldBuilder().getBuilder(); + return internalGetExpireTimeFieldBuilder().getBuilder(); } + /** * * @@ -1299,6 +1305,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { : expireTime_; } } + /** * * @@ -1318,14 +1325,14 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getExpireTimeFieldBuilder() { + internalGetExpireTimeFieldBuilder() { if (expireTimeBuilder_ == null) { expireTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1360,6 +1367,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -1377,12 +1385,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(); } + /** * * @@ -1397,6 +1407,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -1418,6 +1429,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -1445,6 +1457,7 @@ public Builder clearLabels() { internalGetMutableLabels().getMutableMap().clear(); return this; } + /** * * @@ -1462,12 +1475,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_ |= 0x00000008; return internalGetMutableLabels().getMutableMap(); } + /** * * @@ -1489,6 +1504,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { bitField0_ |= 0x00000008; return this; } + /** * * @@ -1505,17 +1521,6 @@ public Builder putAllLabels(java.util.Map va return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.Snapshot) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotName.java index 4e3ee0846..a3a234239 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotOrBuilder.java index 2d406705b..c84e5b505 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface SnapshotOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.Snapshot) @@ -36,6 +38,7 @@ public interface SnapshotOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -64,6 +67,7 @@ public interface SnapshotOrBuilder * @return The topic. */ java.lang.String getTopic(); + /** * * @@ -102,6 +106,7 @@ public interface SnapshotOrBuilder * @return Whether the expireTime field is set. */ boolean hasExpireTime(); + /** * * @@ -124,6 +129,7 @@ public interface SnapshotOrBuilder * @return The expireTime. */ com.google.protobuf.Timestamp getExpireTime(); + /** * * @@ -156,6 +162,7 @@ public interface SnapshotOrBuilder * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; */ int getLabelsCount(); + /** * * @@ -167,9 +174,11 @@ public interface SnapshotOrBuilder * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; */ boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Deprecated java.util.Map getLabels(); + /** * * @@ -181,6 +190,7 @@ public interface SnapshotOrBuilder * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; */ java.util.Map getLabelsMap(); + /** * * @@ -196,6 +206,7 @@ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequest.java index 48afa860b..6187f41a0 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -24,19 +25,31 @@ * *
      * Request for the `StreamingPull` streaming RPC method. This request is used to
    - * establish the initial stream as well as to stream acknowledgements and ack
    + * establish the initial stream as well as to stream acknowledgments and ack
      * deadline modifications from the client to the server.
      * 
    * * Protobuf type {@code google.pubsub.v1.StreamingPullRequest} */ -public final class StreamingPullRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class StreamingPullRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.StreamingPullRequest) StreamingPullRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StreamingPullRequest"); + } + // Use StreamingPullRequest.newBuilder() to construct. - private StreamingPullRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private StreamingPullRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -48,19 +61,13 @@ private StreamingPullRequest() { clientId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StreamingPullRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullRequest_fieldAccessorTable @@ -73,6 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object subscription_ = ""; + /** * * @@ -101,6 +109,7 @@ public java.lang.String getSubscription() { return s; } } + /** * * @@ -135,16 +144,16 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList ackIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
    -   * Optional. List of acknowledgement IDs for acknowledging previously received
    +   * Optional. List of acknowledgment IDs for acknowledging previously received
        * messages (received on this stream or a different stream). If an ack ID has
        * expired, the corresponding message may be redelivered later. Acknowledging
    -   * a message more than once will not result in an error. If the
    -   * acknowledgement ID is malformed, the stream will be aborted with status
    -   * `INVALID_ARGUMENT`.
    +   * a message more than once will not result in an error. If the acknowledgment
    +   * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
        * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -154,16 +163,16 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { public com.google.protobuf.ProtocolStringList getAckIdsList() { return ackIds_; } + /** * * *
    -   * Optional. List of acknowledgement IDs for acknowledging previously received
    +   * Optional. List of acknowledgment IDs for acknowledging previously received
        * messages (received on this stream or a different stream). If an ack ID has
        * expired, the corresponding message may be redelivered later. Acknowledging
    -   * a message more than once will not result in an error. If the
    -   * acknowledgement ID is malformed, the stream will be aborted with status
    -   * `INVALID_ARGUMENT`.
    +   * a message more than once will not result in an error. If the acknowledgment
    +   * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
        * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -173,16 +182,16 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { public int getAckIdsCount() { return ackIds_.size(); } + /** * * *
    -   * Optional. List of acknowledgement IDs for acknowledging previously received
    +   * Optional. List of acknowledgment IDs for acknowledging previously received
        * messages (received on this stream or a different stream). If an ack ID has
        * expired, the corresponding message may be redelivered later. Acknowledging
    -   * a message more than once will not result in an error. If the
    -   * acknowledgement ID is malformed, the stream will be aborted with status
    -   * `INVALID_ARGUMENT`.
    +   * a message more than once will not result in an error. If the acknowledgment
    +   * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
        * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -193,16 +202,16 @@ public int getAckIdsCount() { public java.lang.String getAckIds(int index) { return ackIds_.get(index); } + /** * * *
    -   * Optional. List of acknowledgement IDs for acknowledging previously received
    +   * Optional. List of acknowledgment IDs for acknowledging previously received
        * messages (received on this stream or a different stream). If an ack ID has
        * expired, the corresponding message may be redelivered later. Acknowledging
    -   * a message more than once will not result in an error. If the
    -   * acknowledgement ID is malformed, the stream will be aborted with status
    -   * `INVALID_ARGUMENT`.
    +   * a message more than once will not result in an error. If the acknowledgment
    +   * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
        * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -218,6 +227,7 @@ public com.google.protobuf.ByteString getAckIdsBytes(int index) { @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList modifyDeadlineSeconds_ = emptyIntList(); + /** * * @@ -244,6 +254,7 @@ public com.google.protobuf.ByteString getAckIdsBytes(int index) { public java.util.List getModifyDeadlineSecondsList() { return modifyDeadlineSeconds_; } + /** * * @@ -269,6 +280,7 @@ public java.util.List getModifyDeadlineSecondsList() { public int getModifyDeadlineSecondsCount() { return modifyDeadlineSeconds_.size(); } + /** * * @@ -303,11 +315,12 @@ public int getModifyDeadlineSeconds(int index) { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList modifyDeadlineAckIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
    -   * Optional. List of acknowledgement IDs whose deadline will be modified based
    +   * Optional. List of acknowledgment IDs whose deadline will be modified based
        * on the corresponding element in `modify_deadline_seconds`. This field can
        * be used to indicate that more time is needed to process a message by the
        * subscriber, or to make the message available for redelivery if the
    @@ -322,11 +335,12 @@ public int getModifyDeadlineSeconds(int index) {
       public com.google.protobuf.ProtocolStringList getModifyDeadlineAckIdsList() {
         return modifyDeadlineAckIds_;
       }
    +
       /**
        *
        *
        * 
    -   * Optional. List of acknowledgement IDs whose deadline will be modified based
    +   * Optional. List of acknowledgment IDs whose deadline will be modified based
        * on the corresponding element in `modify_deadline_seconds`. This field can
        * be used to indicate that more time is needed to process a message by the
        * subscriber, or to make the message available for redelivery if the
    @@ -341,11 +355,12 @@ public com.google.protobuf.ProtocolStringList getModifyDeadlineAckIdsList() {
       public int getModifyDeadlineAckIdsCount() {
         return modifyDeadlineAckIds_.size();
       }
    +
       /**
        *
        *
        * 
    -   * Optional. List of acknowledgement IDs whose deadline will be modified based
    +   * Optional. List of acknowledgment IDs whose deadline will be modified based
        * on the corresponding element in `modify_deadline_seconds`. This field can
        * be used to indicate that more time is needed to process a message by the
        * subscriber, or to make the message available for redelivery if the
    @@ -361,11 +376,12 @@ public int getModifyDeadlineAckIdsCount() {
       public java.lang.String getModifyDeadlineAckIds(int index) {
         return modifyDeadlineAckIds_.get(index);
       }
    +
       /**
        *
        *
        * 
    -   * Optional. List of acknowledgement IDs whose deadline will be modified based
    +   * Optional. List of acknowledgment IDs whose deadline will be modified based
        * on the corresponding element in `modify_deadline_seconds`. This field can
        * be used to indicate that more time is needed to process a message by the
        * subscriber, or to make the message available for redelivery if the
    @@ -384,6 +400,7 @@ public com.google.protobuf.ByteString getModifyDeadlineAckIdsBytes(int index) {
     
       public static final int STREAM_ACK_DEADLINE_SECONDS_FIELD_NUMBER = 5;
       private int streamAckDeadlineSeconds_ = 0;
    +
       /**
        *
        *
    @@ -407,6 +424,7 @@ public int getStreamAckDeadlineSeconds() {
     
       @SuppressWarnings("serial")
       private volatile java.lang.Object clientId_ = "";
    +
       /**
        *
        *
    @@ -435,6 +453,7 @@ public java.lang.String getClientId() {
           return s;
         }
       }
    +
       /**
        *
        *
    @@ -466,6 +485,7 @@ public com.google.protobuf.ByteString getClientIdBytes() {
     
       public static final int MAX_OUTSTANDING_MESSAGES_FIELD_NUMBER = 7;
       private long maxOutstandingMessages_ = 0L;
    +
       /**
        *
        *
    @@ -492,6 +512,7 @@ public long getMaxOutstandingMessages() {
     
       public static final int MAX_OUTSTANDING_BYTES_FIELD_NUMBER = 8;
       private long maxOutstandingBytes_ = 0L;
    +
       /**
        *
        *
    @@ -516,6 +537,27 @@ public long getMaxOutstandingBytes() {
         return maxOutstandingBytes_;
       }
     
    +  public static final int PROTOCOL_VERSION_FIELD_NUMBER = 10;
    +  private long protocolVersion_ = 0L;
    +
    +  /**
    +   *
    +   *
    +   * 
    +   * Optional. The protocol version used by the client. This property can only
    +   * be set on the initial StreamingPullRequest. If it is set on a subsequent
    +   * request, the stream will be aborted with status `INVALID_ARGUMENT`.
    +   * 
    + * + * int64 protocol_version = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The protocolVersion. + */ + @java.lang.Override + public long getProtocolVersion() { + return protocolVersion_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -531,11 +573,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); } for (int i = 0; i < ackIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ackIds_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 2, ackIds_.getRaw(i)); } if (getModifyDeadlineSecondsList().size() > 0) { output.writeUInt32NoTag(26); @@ -545,14 +587,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeInt32NoTag(modifyDeadlineSeconds_.getInt(i)); } for (int i = 0; i < modifyDeadlineAckIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 4, modifyDeadlineAckIds_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 4, modifyDeadlineAckIds_.getRaw(i)); } if (streamAckDeadlineSeconds_ != 0) { output.writeInt32(5, streamAckDeadlineSeconds_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, clientId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, clientId_); } if (maxOutstandingMessages_ != 0L) { output.writeInt64(7, maxOutstandingMessages_); @@ -560,6 +601,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (maxOutstandingBytes_ != 0L) { output.writeInt64(8, maxOutstandingBytes_); } + if (protocolVersion_ != 0L) { + output.writeInt64(10, protocolVersion_); + } getUnknownFields().writeTo(output); } @@ -569,8 +613,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); } { int dataSize = 0; @@ -605,8 +649,8 @@ public int getSerializedSize() { if (streamAckDeadlineSeconds_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, streamAckDeadlineSeconds_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, clientId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, clientId_); } if (maxOutstandingMessages_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, maxOutstandingMessages_); @@ -614,6 +658,9 @@ public int getSerializedSize() { if (maxOutstandingBytes_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, maxOutstandingBytes_); } + if (protocolVersion_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(10, protocolVersion_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -638,6 +685,7 @@ public boolean equals(final java.lang.Object obj) { if (!getClientId().equals(other.getClientId())) return false; if (getMaxOutstandingMessages() != other.getMaxOutstandingMessages()) return false; if (getMaxOutstandingBytes() != other.getMaxOutstandingBytes()) return false; + if (getProtocolVersion() != other.getProtocolVersion()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,6 +719,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxOutstandingMessages()); hash = (37 * hash) + MAX_OUTSTANDING_BYTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxOutstandingBytes()); + hash = (37 * hash) + PROTOCOL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getProtocolVersion()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -713,38 +763,38 @@ public static com.google.pubsub.v1.StreamingPullRequest parseFrom( public static com.google.pubsub.v1.StreamingPullRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.StreamingPullRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.StreamingPullRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -767,22 +817,23 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * *
        * Request for the `StreamingPull` streaming RPC method. This request is used to
    -   * establish the initial stream as well as to stream acknowledgements and ack
    +   * establish the initial stream as well as to stream acknowledgments and ack
        * deadline modifications from the client to the server.
        * 
    * * Protobuf type {@code google.pubsub.v1.StreamingPullRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.StreamingPullRequest) com.google.pubsub.v1.StreamingPullRequestOrBuilder { @@ -792,7 +843,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullRequest_fieldAccessorTable @@ -804,7 +855,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.StreamingPullRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -820,6 +871,7 @@ public Builder clear() { clientId_ = ""; maxOutstandingMessages_ = 0L; maxOutstandingBytes_ = 0L; + protocolVersion_ = 0L; return this; } @@ -883,39 +935,9 @@ private void buildPartial0(com.google.pubsub.v1.StreamingPullRequest result) { if (((from_bitField0_ & 0x00000080) != 0)) { result.maxOutstandingBytes_ = maxOutstandingBytes_; } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + if (((from_bitField0_ & 0x00000100) != 0)) { + result.protocolVersion_ = protocolVersion_; + } } @java.lang.Override @@ -980,6 +1002,9 @@ public Builder mergeFrom(com.google.pubsub.v1.StreamingPullRequest other) { if (other.getMaxOutstandingBytes() != 0L) { setMaxOutstandingBytes(other.getMaxOutstandingBytes()); } + if (other.getProtocolVersion() != 0L) { + setProtocolVersion(other.getProtocolVersion()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1068,6 +1093,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000080; break; } // case 64 + case 80: + { + protocolVersion_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 80 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1088,6 +1119,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object subscription_ = ""; + /** * * @@ -1115,6 +1147,7 @@ public java.lang.String getSubscription() { return (java.lang.String) ref; } } + /** * * @@ -1142,6 +1175,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1168,6 +1202,7 @@ public Builder setSubscription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1190,6 +1225,7 @@ public Builder clearSubscription() { onChanged(); return this; } + /** * * @@ -1227,16 +1263,16 @@ private void ensureAckIdsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * *
    -     * Optional. List of acknowledgement IDs for acknowledging previously received
    +     * Optional. List of acknowledgment IDs for acknowledging previously received
          * messages (received on this stream or a different stream). If an ack ID has
          * expired, the corresponding message may be redelivered later. Acknowledging
    -     * a message more than once will not result in an error. If the
    -     * acknowledgement ID is malformed, the stream will be aborted with status
    -     * `INVALID_ARGUMENT`.
    +     * a message more than once will not result in an error. If the acknowledgment
    +     * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
          * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1247,16 +1283,16 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { ackIds_.makeImmutable(); return ackIds_; } + /** * * *
    -     * Optional. List of acknowledgement IDs for acknowledging previously received
    +     * Optional. List of acknowledgment IDs for acknowledging previously received
          * messages (received on this stream or a different stream). If an ack ID has
          * expired, the corresponding message may be redelivered later. Acknowledging
    -     * a message more than once will not result in an error. If the
    -     * acknowledgement ID is malformed, the stream will be aborted with status
    -     * `INVALID_ARGUMENT`.
    +     * a message more than once will not result in an error. If the acknowledgment
    +     * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
          * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1266,16 +1302,16 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { public int getAckIdsCount() { return ackIds_.size(); } + /** * * *
    -     * Optional. List of acknowledgement IDs for acknowledging previously received
    +     * Optional. List of acknowledgment IDs for acknowledging previously received
          * messages (received on this stream or a different stream). If an ack ID has
          * expired, the corresponding message may be redelivered later. Acknowledging
    -     * a message more than once will not result in an error. If the
    -     * acknowledgement ID is malformed, the stream will be aborted with status
    -     * `INVALID_ARGUMENT`.
    +     * a message more than once will not result in an error. If the acknowledgment
    +     * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
          * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1286,16 +1322,16 @@ public int getAckIdsCount() { public java.lang.String getAckIds(int index) { return ackIds_.get(index); } + /** * * *
    -     * Optional. List of acknowledgement IDs for acknowledging previously received
    +     * Optional. List of acknowledgment IDs for acknowledging previously received
          * messages (received on this stream or a different stream). If an ack ID has
          * expired, the corresponding message may be redelivered later. Acknowledging
    -     * a message more than once will not result in an error. If the
    -     * acknowledgement ID is malformed, the stream will be aborted with status
    -     * `INVALID_ARGUMENT`.
    +     * a message more than once will not result in an error. If the acknowledgment
    +     * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
          * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1306,16 +1342,16 @@ public java.lang.String getAckIds(int index) { public com.google.protobuf.ByteString getAckIdsBytes(int index) { return ackIds_.getByteString(index); } + /** * * *
    -     * Optional. List of acknowledgement IDs for acknowledging previously received
    +     * Optional. List of acknowledgment IDs for acknowledging previously received
          * messages (received on this stream or a different stream). If an ack ID has
          * expired, the corresponding message may be redelivered later. Acknowledging
    -     * a message more than once will not result in an error. If the
    -     * acknowledgement ID is malformed, the stream will be aborted with status
    -     * `INVALID_ARGUMENT`.
    +     * a message more than once will not result in an error. If the acknowledgment
    +     * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
          * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1334,16 +1370,16 @@ public Builder setAckIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
    -     * Optional. List of acknowledgement IDs for acknowledging previously received
    +     * Optional. List of acknowledgment IDs for acknowledging previously received
          * messages (received on this stream or a different stream). If an ack ID has
          * expired, the corresponding message may be redelivered later. Acknowledging
    -     * a message more than once will not result in an error. If the
    -     * acknowledgement ID is malformed, the stream will be aborted with status
    -     * `INVALID_ARGUMENT`.
    +     * a message more than once will not result in an error. If the acknowledgment
    +     * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
          * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1361,16 +1397,16 @@ public Builder addAckIds(java.lang.String value) { onChanged(); return this; } + /** * * *
    -     * Optional. List of acknowledgement IDs for acknowledging previously received
    +     * Optional. List of acknowledgment IDs for acknowledging previously received
          * messages (received on this stream or a different stream). If an ack ID has
          * expired, the corresponding message may be redelivered later. Acknowledging
    -     * a message more than once will not result in an error. If the
    -     * acknowledgement ID is malformed, the stream will be aborted with status
    -     * `INVALID_ARGUMENT`.
    +     * a message more than once will not result in an error. If the acknowledgment
    +     * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
          * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1385,16 +1421,16 @@ public Builder addAllAckIds(java.lang.Iterable values) { onChanged(); return this; } + /** * * *
    -     * Optional. List of acknowledgement IDs for acknowledging previously received
    +     * Optional. List of acknowledgment IDs for acknowledging previously received
          * messages (received on this stream or a different stream). If an ack ID has
          * expired, the corresponding message may be redelivered later. Acknowledging
    -     * a message more than once will not result in an error. If the
    -     * acknowledgement ID is malformed, the stream will be aborted with status
    -     * `INVALID_ARGUMENT`.
    +     * a message more than once will not result in an error. If the acknowledgment
    +     * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
          * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1408,16 +1444,16 @@ public Builder clearAckIds() { onChanged(); return this; } + /** * * *
    -     * Optional. List of acknowledgement IDs for acknowledging previously received
    +     * Optional. List of acknowledgment IDs for acknowledging previously received
          * messages (received on this stream or a different stream). If an ack ID has
          * expired, the corresponding message may be redelivered later. Acknowledging
    -     * a message more than once will not result in an error. If the
    -     * acknowledgement ID is malformed, the stream will be aborted with status
    -     * `INVALID_ARGUMENT`.
    +     * a message more than once will not result in an error. If the acknowledgment
    +     * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
          * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1445,6 +1481,7 @@ private void ensureModifyDeadlineSecondsIsMutable() { } bitField0_ |= 0x00000004; } + /** * * @@ -1471,6 +1508,7 @@ public java.util.List getModifyDeadlineSecondsList() { modifyDeadlineSeconds_.makeImmutable(); return modifyDeadlineSeconds_; } + /** * * @@ -1496,6 +1534,7 @@ public java.util.List getModifyDeadlineSecondsList() { public int getModifyDeadlineSecondsCount() { return modifyDeadlineSeconds_.size(); } + /** * * @@ -1522,6 +1561,7 @@ public int getModifyDeadlineSecondsCount() { public int getModifyDeadlineSeconds(int index) { return modifyDeadlineSeconds_.getInt(index); } + /** * * @@ -1554,6 +1594,7 @@ public Builder setModifyDeadlineSeconds(int index, int value) { onChanged(); return this; } + /** * * @@ -1585,6 +1626,7 @@ public Builder addModifyDeadlineSeconds(int value) { onChanged(); return this; } + /** * * @@ -1616,6 +1658,7 @@ public Builder addAllModifyDeadlineSeconds( onChanged(); return this; } + /** * * @@ -1654,11 +1697,12 @@ private void ensureModifyDeadlineAckIdsIsMutable() { } bitField0_ |= 0x00000008; } + /** * * *
    -     * Optional. List of acknowledgement IDs whose deadline will be modified based
    +     * Optional. List of acknowledgment IDs whose deadline will be modified based
          * on the corresponding element in `modify_deadline_seconds`. This field can
          * be used to indicate that more time is needed to process a message by the
          * subscriber, or to make the message available for redelivery if the
    @@ -1674,11 +1718,12 @@ public com.google.protobuf.ProtocolStringList getModifyDeadlineAckIdsList() {
           modifyDeadlineAckIds_.makeImmutable();
           return modifyDeadlineAckIds_;
         }
    +
         /**
          *
          *
          * 
    -     * Optional. List of acknowledgement IDs whose deadline will be modified based
    +     * Optional. List of acknowledgment IDs whose deadline will be modified based
          * on the corresponding element in `modify_deadline_seconds`. This field can
          * be used to indicate that more time is needed to process a message by the
          * subscriber, or to make the message available for redelivery if the
    @@ -1693,11 +1738,12 @@ public com.google.protobuf.ProtocolStringList getModifyDeadlineAckIdsList() {
         public int getModifyDeadlineAckIdsCount() {
           return modifyDeadlineAckIds_.size();
         }
    +
         /**
          *
          *
          * 
    -     * Optional. List of acknowledgement IDs whose deadline will be modified based
    +     * Optional. List of acknowledgment IDs whose deadline will be modified based
          * on the corresponding element in `modify_deadline_seconds`. This field can
          * be used to indicate that more time is needed to process a message by the
          * subscriber, or to make the message available for redelivery if the
    @@ -1713,11 +1759,12 @@ public int getModifyDeadlineAckIdsCount() {
         public java.lang.String getModifyDeadlineAckIds(int index) {
           return modifyDeadlineAckIds_.get(index);
         }
    +
         /**
          *
          *
          * 
    -     * Optional. List of acknowledgement IDs whose deadline will be modified based
    +     * Optional. List of acknowledgment IDs whose deadline will be modified based
          * on the corresponding element in `modify_deadline_seconds`. This field can
          * be used to indicate that more time is needed to process a message by the
          * subscriber, or to make the message available for redelivery if the
    @@ -1733,11 +1780,12 @@ public java.lang.String getModifyDeadlineAckIds(int index) {
         public com.google.protobuf.ByteString getModifyDeadlineAckIdsBytes(int index) {
           return modifyDeadlineAckIds_.getByteString(index);
         }
    +
         /**
          *
          *
          * 
    -     * Optional. List of acknowledgement IDs whose deadline will be modified based
    +     * Optional. List of acknowledgment IDs whose deadline will be modified based
          * on the corresponding element in `modify_deadline_seconds`. This field can
          * be used to indicate that more time is needed to process a message by the
          * subscriber, or to make the message available for redelivery if the
    @@ -1761,11 +1809,12 @@ public Builder setModifyDeadlineAckIds(int index, java.lang.String value) {
           onChanged();
           return this;
         }
    +
         /**
          *
          *
          * 
    -     * Optional. List of acknowledgement IDs whose deadline will be modified based
    +     * Optional. List of acknowledgment IDs whose deadline will be modified based
          * on the corresponding element in `modify_deadline_seconds`. This field can
          * be used to indicate that more time is needed to process a message by the
          * subscriber, or to make the message available for redelivery if the
    @@ -1788,11 +1837,12 @@ public Builder addModifyDeadlineAckIds(java.lang.String value) {
           onChanged();
           return this;
         }
    +
         /**
          *
          *
          * 
    -     * Optional. List of acknowledgement IDs whose deadline will be modified based
    +     * Optional. List of acknowledgment IDs whose deadline will be modified based
          * on the corresponding element in `modify_deadline_seconds`. This field can
          * be used to indicate that more time is needed to process a message by the
          * subscriber, or to make the message available for redelivery if the
    @@ -1812,11 +1862,12 @@ public Builder addAllModifyDeadlineAckIds(java.lang.Iterable v
           onChanged();
           return this;
         }
    +
         /**
          *
          *
          * 
    -     * Optional. List of acknowledgement IDs whose deadline will be modified based
    +     * Optional. List of acknowledgment IDs whose deadline will be modified based
          * on the corresponding element in `modify_deadline_seconds`. This field can
          * be used to indicate that more time is needed to process a message by the
          * subscriber, or to make the message available for redelivery if the
    @@ -1835,11 +1886,12 @@ public Builder clearModifyDeadlineAckIds() {
           onChanged();
           return this;
         }
    +
         /**
          *
          *
          * 
    -     * Optional. List of acknowledgement IDs whose deadline will be modified based
    +     * Optional. List of acknowledgment IDs whose deadline will be modified based
          * on the corresponding element in `modify_deadline_seconds`. This field can
          * be used to indicate that more time is needed to process a message by the
          * subscriber, or to make the message available for redelivery if the
    @@ -1865,6 +1917,7 @@ public Builder addModifyDeadlineAckIdsBytes(com.google.protobuf.ByteString value
         }
     
         private int streamAckDeadlineSeconds_;
    +
         /**
          *
          *
    @@ -1883,6 +1936,7 @@ public Builder addModifyDeadlineAckIdsBytes(com.google.protobuf.ByteString value
         public int getStreamAckDeadlineSeconds() {
           return streamAckDeadlineSeconds_;
         }
    +
         /**
          *
          *
    @@ -1905,6 +1959,7 @@ public Builder setStreamAckDeadlineSeconds(int value) {
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -1927,6 +1982,7 @@ public Builder clearStreamAckDeadlineSeconds() {
         }
     
         private java.lang.Object clientId_ = "";
    +
         /**
          *
          *
    @@ -1954,6 +2010,7 @@ public java.lang.String getClientId() {
             return (java.lang.String) ref;
           }
         }
    +
         /**
          *
          *
    @@ -1981,6 +2038,7 @@ public com.google.protobuf.ByteString getClientIdBytes() {
             return (com.google.protobuf.ByteString) ref;
           }
         }
    +
         /**
          *
          *
    @@ -2007,6 +2065,7 @@ public Builder setClientId(java.lang.String value) {
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -2029,6 +2088,7 @@ public Builder clearClientId() {
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -2058,6 +2118,7 @@ public Builder setClientIdBytes(com.google.protobuf.ByteString value) {
         }
     
         private long maxOutstandingMessages_;
    +
         /**
          *
          *
    @@ -2081,6 +2142,7 @@ public Builder setClientIdBytes(com.google.protobuf.ByteString value) {
         public long getMaxOutstandingMessages() {
           return maxOutstandingMessages_;
         }
    +
         /**
          *
          *
    @@ -2108,6 +2170,7 @@ public Builder setMaxOutstandingMessages(long value) {
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -2135,6 +2198,7 @@ public Builder clearMaxOutstandingMessages() {
         }
     
         private long maxOutstandingBytes_;
    +
         /**
          *
          *
    @@ -2158,6 +2222,7 @@ public Builder clearMaxOutstandingMessages() {
         public long getMaxOutstandingBytes() {
           return maxOutstandingBytes_;
         }
    +
         /**
          *
          *
    @@ -2185,6 +2250,7 @@ public Builder setMaxOutstandingBytes(long value) {
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -2211,15 +2277,66 @@ public Builder clearMaxOutstandingBytes() {
           return this;
         }
     
    +    private long protocolVersion_;
    +
    +    /**
    +     *
    +     *
    +     * 
    +     * Optional. The protocol version used by the client. This property can only
    +     * be set on the initial StreamingPullRequest. If it is set on a subsequent
    +     * request, the stream will be aborted with status `INVALID_ARGUMENT`.
    +     * 
    + * + * int64 protocol_version = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The protocolVersion. + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public long getProtocolVersion() { + return protocolVersion_; } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
    +     * Optional. The protocol version used by the client. This property can only
    +     * be set on the initial StreamingPullRequest. If it is set on a subsequent
    +     * request, the stream will be aborted with status `INVALID_ARGUMENT`.
    +     * 
    + * + * int64 protocol_version = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The protocolVersion to set. + * @return This builder for chaining. + */ + public Builder setProtocolVersion(long value) { + + protocolVersion_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The protocol version used by the client. This property can only
    +     * be set on the initial StreamingPullRequest. If it is set on a subsequent
    +     * request, the stream will be aborted with status `INVALID_ARGUMENT`.
    +     * 
    + * + * int64 protocol_version = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearProtocolVersion() { + bitField0_ = (bitField0_ & ~0x00000100); + protocolVersion_ = 0L; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.pubsub.v1.StreamingPullRequest) diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequestOrBuilder.java index 5c4af96cb..6f4d94bcb 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface StreamingPullRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.StreamingPullRequest) @@ -41,6 +43,7 @@ public interface StreamingPullRequestOrBuilder * @return The subscription. */ java.lang.String getSubscription(); + /** * * @@ -63,12 +66,11 @@ public interface StreamingPullRequestOrBuilder * * *
    -   * Optional. List of acknowledgement IDs for acknowledging previously received
    +   * Optional. List of acknowledgment IDs for acknowledging previously received
        * messages (received on this stream or a different stream). If an ack ID has
        * expired, the corresponding message may be redelivered later. Acknowledging
    -   * a message more than once will not result in an error. If the
    -   * acknowledgement ID is malformed, the stream will be aborted with status
    -   * `INVALID_ARGUMENT`.
    +   * a message more than once will not result in an error. If the acknowledgment
    +   * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
        * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -76,16 +78,16 @@ public interface StreamingPullRequestOrBuilder * @return A list containing the ackIds. */ java.util.List getAckIdsList(); + /** * * *
    -   * Optional. List of acknowledgement IDs for acknowledging previously received
    +   * Optional. List of acknowledgment IDs for acknowledging previously received
        * messages (received on this stream or a different stream). If an ack ID has
        * expired, the corresponding message may be redelivered later. Acknowledging
    -   * a message more than once will not result in an error. If the
    -   * acknowledgement ID is malformed, the stream will be aborted with status
    -   * `INVALID_ARGUMENT`.
    +   * a message more than once will not result in an error. If the acknowledgment
    +   * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
        * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -93,16 +95,16 @@ public interface StreamingPullRequestOrBuilder * @return The count of ackIds. */ int getAckIdsCount(); + /** * * *
    -   * Optional. List of acknowledgement IDs for acknowledging previously received
    +   * Optional. List of acknowledgment IDs for acknowledging previously received
        * messages (received on this stream or a different stream). If an ack ID has
        * expired, the corresponding message may be redelivered later. Acknowledging
    -   * a message more than once will not result in an error. If the
    -   * acknowledgement ID is malformed, the stream will be aborted with status
    -   * `INVALID_ARGUMENT`.
    +   * a message more than once will not result in an error. If the acknowledgment
    +   * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
        * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -111,16 +113,16 @@ public interface StreamingPullRequestOrBuilder * @return The ackIds at the given index. */ java.lang.String getAckIds(int index); + /** * * *
    -   * Optional. List of acknowledgement IDs for acknowledging previously received
    +   * Optional. List of acknowledgment IDs for acknowledging previously received
        * messages (received on this stream or a different stream). If an ack ID has
        * expired, the corresponding message may be redelivered later. Acknowledging
    -   * a message more than once will not result in an error. If the
    -   * acknowledgement ID is malformed, the stream will be aborted with status
    -   * `INVALID_ARGUMENT`.
    +   * a message more than once will not result in an error. If the acknowledgment
    +   * ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
        * 
    * * repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -153,6 +155,7 @@ public interface StreamingPullRequestOrBuilder * @return A list containing the modifyDeadlineSeconds. */ java.util.List getModifyDeadlineSecondsList(); + /** * * @@ -176,6 +179,7 @@ public interface StreamingPullRequestOrBuilder * @return The count of modifyDeadlineSeconds. */ int getModifyDeadlineSecondsCount(); + /** * * @@ -205,7 +209,7 @@ public interface StreamingPullRequestOrBuilder * * *
    -   * Optional. List of acknowledgement IDs whose deadline will be modified based
    +   * Optional. List of acknowledgment IDs whose deadline will be modified based
        * on the corresponding element in `modify_deadline_seconds`. This field can
        * be used to indicate that more time is needed to process a message by the
        * subscriber, or to make the message available for redelivery if the
    @@ -218,11 +222,12 @@ public interface StreamingPullRequestOrBuilder
        * @return A list containing the modifyDeadlineAckIds.
        */
       java.util.List getModifyDeadlineAckIdsList();
    +
       /**
        *
        *
        * 
    -   * Optional. List of acknowledgement IDs whose deadline will be modified based
    +   * Optional. List of acknowledgment IDs whose deadline will be modified based
        * on the corresponding element in `modify_deadline_seconds`. This field can
        * be used to indicate that more time is needed to process a message by the
        * subscriber, or to make the message available for redelivery if the
    @@ -235,11 +240,12 @@ public interface StreamingPullRequestOrBuilder
        * @return The count of modifyDeadlineAckIds.
        */
       int getModifyDeadlineAckIdsCount();
    +
       /**
        *
        *
        * 
    -   * Optional. List of acknowledgement IDs whose deadline will be modified based
    +   * Optional. List of acknowledgment IDs whose deadline will be modified based
        * on the corresponding element in `modify_deadline_seconds`. This field can
        * be used to indicate that more time is needed to process a message by the
        * subscriber, or to make the message available for redelivery if the
    @@ -253,11 +259,12 @@ public interface StreamingPullRequestOrBuilder
        * @return The modifyDeadlineAckIds at the given index.
        */
       java.lang.String getModifyDeadlineAckIds(int index);
    +
       /**
        *
        *
        * 
    -   * Optional. List of acknowledgement IDs whose deadline will be modified based
    +   * Optional. List of acknowledgment IDs whose deadline will be modified based
        * on the corresponding element in `modify_deadline_seconds`. This field can
        * be used to indicate that more time is needed to process a message by the
        * subscriber, or to make the message available for redelivery if the
    @@ -305,6 +312,7 @@ public interface StreamingPullRequestOrBuilder
        * @return The clientId.
        */
       java.lang.String getClientId();
    +
       /**
        *
        *
    @@ -364,4 +372,19 @@ public interface StreamingPullRequestOrBuilder
        * @return The maxOutstandingBytes.
        */
       long getMaxOutstandingBytes();
    +
    +  /**
    +   *
    +   *
    +   * 
    +   * Optional. The protocol version used by the client. This property can only
    +   * be set on the initial StreamingPullRequest. If it is set on a subsequent
    +   * request, the stream will be aborted with status `INVALID_ARGUMENT`.
    +   * 
    + * + * int64 protocol_version = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The protocolVersion. + */ + long getProtocolVersion(); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java index d262e7ca1..2ec1bf15c 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.pubsub.v1.StreamingPullResponse} */ -public final class StreamingPullResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class StreamingPullResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.StreamingPullResponse) StreamingPullResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StreamingPullResponse"); + } + // Use StreamingPullResponse.newBuilder() to construct. - private StreamingPullResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private StreamingPullResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private StreamingPullResponse() { receivedMessages_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StreamingPullResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullResponse_fieldAccessorTable @@ -73,7 +80,7 @@ public interface AcknowledgeConfirmationOrBuilder * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -81,11 +88,12 @@ public interface AcknowledgeConfirmationOrBuilder * @return A list containing the ackIds. */ java.util.List getAckIdsList(); + /** * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -93,11 +101,12 @@ public interface AcknowledgeConfirmationOrBuilder * @return The count of ackIds. */ int getAckIdsCount(); + /** * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -106,11 +115,12 @@ public interface AcknowledgeConfirmationOrBuilder * @return The ackIds at the given index. */ java.lang.String getAckIds(int index); + /** * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -124,8 +134,8 @@ public interface AcknowledgeConfirmationOrBuilder * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -133,12 +143,13 @@ public interface AcknowledgeConfirmationOrBuilder * @return A list containing the invalidAckIds. */ java.util.List getInvalidAckIdsList(); + /** * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -146,12 +157,13 @@ public interface AcknowledgeConfirmationOrBuilder * @return The count of invalidAckIds. */ int getInvalidAckIdsCount(); + /** * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -160,12 +172,13 @@ public interface AcknowledgeConfirmationOrBuilder * @return The invalidAckIds at the given index. */ java.lang.String getInvalidAckIds(int index); + /** * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -179,7 +192,7 @@ public interface AcknowledgeConfirmationOrBuilder * * *
    -     * Optional. List of acknowledgement IDs that were out of order.
    +     * Optional. List of acknowledgment IDs that were out of order.
          * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -187,11 +200,12 @@ public interface AcknowledgeConfirmationOrBuilder * @return A list containing the unorderedAckIds. */ java.util.List getUnorderedAckIdsList(); + /** * * *
    -     * Optional. List of acknowledgement IDs that were out of order.
    +     * Optional. List of acknowledgment IDs that were out of order.
          * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -199,11 +213,12 @@ public interface AcknowledgeConfirmationOrBuilder * @return The count of unorderedAckIds. */ int getUnorderedAckIdsCount(); + /** * * *
    -     * Optional. List of acknowledgement IDs that were out of order.
    +     * Optional. List of acknowledgment IDs that were out of order.
          * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -212,11 +227,12 @@ public interface AcknowledgeConfirmationOrBuilder * @return The unorderedAckIds at the given index. */ java.lang.String getUnorderedAckIds(int index); + /** * * *
    -     * Optional. List of acknowledgement IDs that were out of order.
    +     * Optional. List of acknowledgment IDs that were out of order.
          * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -230,7 +246,7 @@ public interface AcknowledgeConfirmationOrBuilder * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -240,11 +256,12 @@ public interface AcknowledgeConfirmationOrBuilder * @return A list containing the temporaryFailedAckIds. */ java.util.List getTemporaryFailedAckIdsList(); + /** * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -254,11 +271,12 @@ public interface AcknowledgeConfirmationOrBuilder * @return The count of temporaryFailedAckIds. */ int getTemporaryFailedAckIdsCount(); + /** * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -269,11 +287,12 @@ public interface AcknowledgeConfirmationOrBuilder * @return The temporaryFailedAckIds at the given index. */ java.lang.String getTemporaryFailedAckIds(int index); + /** * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -285,23 +304,35 @@ public interface AcknowledgeConfirmationOrBuilder */ com.google.protobuf.ByteString getTemporaryFailedAckIdsBytes(int index); } + /** * * *
    -   * Acknowledgement IDs sent in one or more previous requests to acknowledge a
    +   * Acknowledgment IDs sent in one or more previous requests to acknowledge a
        * previously received message.
        * 
    * * Protobuf type {@code google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation} */ - public static final class AcknowledgeConfirmation extends com.google.protobuf.GeneratedMessageV3 + public static final class AcknowledgeConfirmation extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation) AcknowledgeConfirmationOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AcknowledgeConfirmation"); + } + // Use AcknowledgeConfirmation.newBuilder() to construct. - private AcknowledgeConfirmation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AcknowledgeConfirmation(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -312,19 +343,13 @@ private AcknowledgeConfirmation() { temporaryFailedAckIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AcknowledgeConfirmation(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_fieldAccessorTable @@ -338,11 +363,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList ackIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -352,11 +378,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public com.google.protobuf.ProtocolStringList getAckIdsList() { return ackIds_; } + /** * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -366,11 +393,12 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { public int getAckIdsCount() { return ackIds_.size(); } + /** * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -381,11 +409,12 @@ public int getAckIdsCount() { public java.lang.String getAckIds(int index) { return ackIds_.get(index); } + /** * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -402,12 +431,13 @@ public com.google.protobuf.ByteString getAckIdsBytes(int index) { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList invalidAckIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -417,12 +447,13 @@ public com.google.protobuf.ByteString getAckIdsBytes(int index) { public com.google.protobuf.ProtocolStringList getInvalidAckIdsList() { return invalidAckIds_; } + /** * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -432,12 +463,13 @@ public com.google.protobuf.ProtocolStringList getInvalidAckIdsList() { public int getInvalidAckIdsCount() { return invalidAckIds_.size(); } + /** * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -448,12 +480,13 @@ public int getInvalidAckIdsCount() { public java.lang.String getInvalidAckIds(int index) { return invalidAckIds_.get(index); } + /** * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -470,11 +503,12 @@ public com.google.protobuf.ByteString getInvalidAckIdsBytes(int index) { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList unorderedAckIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
    -     * Optional. List of acknowledgement IDs that were out of order.
    +     * Optional. List of acknowledgment IDs that were out of order.
          * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -484,11 +518,12 @@ public com.google.protobuf.ByteString getInvalidAckIdsBytes(int index) { public com.google.protobuf.ProtocolStringList getUnorderedAckIdsList() { return unorderedAckIds_; } + /** * * *
    -     * Optional. List of acknowledgement IDs that were out of order.
    +     * Optional. List of acknowledgment IDs that were out of order.
          * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -498,11 +533,12 @@ public com.google.protobuf.ProtocolStringList getUnorderedAckIdsList() { public int getUnorderedAckIdsCount() { return unorderedAckIds_.size(); } + /** * * *
    -     * Optional. List of acknowledgement IDs that were out of order.
    +     * Optional. List of acknowledgment IDs that were out of order.
          * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -513,11 +549,12 @@ public int getUnorderedAckIdsCount() { public java.lang.String getUnorderedAckIds(int index) { return unorderedAckIds_.get(index); } + /** * * *
    -     * Optional. List of acknowledgement IDs that were out of order.
    +     * Optional. List of acknowledgment IDs that were out of order.
          * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -534,11 +571,12 @@ public com.google.protobuf.ByteString getUnorderedAckIdsBytes(int index) { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList temporaryFailedAckIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -550,11 +588,12 @@ public com.google.protobuf.ByteString getUnorderedAckIdsBytes(int index) { public com.google.protobuf.ProtocolStringList getTemporaryFailedAckIdsList() { return temporaryFailedAckIds_; } + /** * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -566,11 +605,12 @@ public com.google.protobuf.ProtocolStringList getTemporaryFailedAckIdsList() { public int getTemporaryFailedAckIdsCount() { return temporaryFailedAckIds_.size(); } + /** * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -583,11 +623,12 @@ public int getTemporaryFailedAckIdsCount() { public java.lang.String getTemporaryFailedAckIds(int index) { return temporaryFailedAckIds_.get(index); } + /** * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -616,16 +657,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < ackIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ackIds_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 1, ackIds_.getRaw(i)); } for (int i = 0; i < invalidAckIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, invalidAckIds_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 2, invalidAckIds_.getRaw(i)); } for (int i = 0; i < unorderedAckIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unorderedAckIds_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 3, unorderedAckIds_.getRaw(i)); } for (int i = 0; i < temporaryFailedAckIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( + com.google.protobuf.GeneratedMessage.writeString( output, 4, temporaryFailedAckIds_.getRaw(i)); } getUnknownFields().writeTo(output); @@ -759,39 +800,39 @@ public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -815,23 +856,22 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * *
    -     * Acknowledgement IDs sent in one or more previous requests to acknowledge a
    +     * Acknowledgment IDs sent in one or more previous requests to acknowledge a
          * previously received message.
          * 
    * * Protobuf type {@code google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation) com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationOrBuilder { @@ -841,7 +881,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_fieldAccessorTable @@ -854,7 +894,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -923,41 +963,6 @@ private void buildPartial0( } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation) { @@ -1096,11 +1101,12 @@ private void ensureAckIdsIsMutable() { } bitField0_ |= 0x00000001; } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1111,11 +1117,12 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { ackIds_.makeImmutable(); return ackIds_; } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1125,11 +1132,12 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { public int getAckIdsCount() { return ackIds_.size(); } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1140,11 +1148,12 @@ public int getAckIdsCount() { public java.lang.String getAckIds(int index) { return ackIds_.get(index); } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1155,11 +1164,12 @@ public java.lang.String getAckIds(int index) { public com.google.protobuf.ByteString getAckIdsBytes(int index) { return ackIds_.getByteString(index); } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1178,11 +1188,12 @@ public Builder setAckIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1200,11 +1211,12 @@ public Builder addAckIds(java.lang.String value) { onChanged(); return this; } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1219,11 +1231,12 @@ public Builder addAllAckIds(java.lang.Iterable values) { onChanged(); return this; } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1237,11 +1250,12 @@ public Builder clearAckIds() { onChanged(); return this; } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1270,12 +1284,13 @@ private void ensureInvalidAckIdsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1286,12 +1301,13 @@ public com.google.protobuf.ProtocolStringList getInvalidAckIdsList() { invalidAckIds_.makeImmutable(); return invalidAckIds_; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1301,12 +1317,13 @@ public com.google.protobuf.ProtocolStringList getInvalidAckIdsList() { public int getInvalidAckIdsCount() { return invalidAckIds_.size(); } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1317,12 +1334,13 @@ public int getInvalidAckIdsCount() { public java.lang.String getInvalidAckIds(int index) { return invalidAckIds_.get(index); } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1333,12 +1351,13 @@ public java.lang.String getInvalidAckIds(int index) { public com.google.protobuf.ByteString getInvalidAckIdsBytes(int index) { return invalidAckIds_.getByteString(index); } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1357,12 +1376,13 @@ public Builder setInvalidAckIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1380,12 +1400,13 @@ public Builder addInvalidAckIds(java.lang.String value) { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1400,12 +1421,13 @@ public Builder addAllInvalidAckIds(java.lang.Iterable values) onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1419,12 +1441,13 @@ public Builder clearInvalidAckIds() { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1453,11 +1476,12 @@ private void ensureUnorderedAckIdsIsMutable() { } bitField0_ |= 0x00000004; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were out of order.
    +       * Optional. List of acknowledgment IDs that were out of order.
            * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1469,11 +1493,12 @@ public com.google.protobuf.ProtocolStringList getUnorderedAckIdsList() { unorderedAckIds_.makeImmutable(); return unorderedAckIds_; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were out of order.
    +       * Optional. List of acknowledgment IDs that were out of order.
            * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1484,11 +1509,12 @@ public com.google.protobuf.ProtocolStringList getUnorderedAckIdsList() { public int getUnorderedAckIdsCount() { return unorderedAckIds_.size(); } + /** * * *
    -       * Optional. List of acknowledgement IDs that were out of order.
    +       * Optional. List of acknowledgment IDs that were out of order.
            * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1500,11 +1526,12 @@ public int getUnorderedAckIdsCount() { public java.lang.String getUnorderedAckIds(int index) { return unorderedAckIds_.get(index); } + /** * * *
    -       * Optional. List of acknowledgement IDs that were out of order.
    +       * Optional. List of acknowledgment IDs that were out of order.
            * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1516,11 +1543,12 @@ public java.lang.String getUnorderedAckIds(int index) { public com.google.protobuf.ByteString getUnorderedAckIdsBytes(int index) { return unorderedAckIds_.getByteString(index); } + /** * * *
    -       * Optional. List of acknowledgement IDs that were out of order.
    +       * Optional. List of acknowledgment IDs that were out of order.
            * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1540,11 +1568,12 @@ public Builder setUnorderedAckIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were out of order.
    +       * Optional. List of acknowledgment IDs that were out of order.
            * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1563,11 +1592,12 @@ public Builder addUnorderedAckIds(java.lang.String value) { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were out of order.
    +       * Optional. List of acknowledgment IDs that were out of order.
            * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1583,11 +1613,12 @@ public Builder addAllUnorderedAckIds(java.lang.Iterable values onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were out of order.
    +       * Optional. List of acknowledgment IDs that were out of order.
            * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1602,11 +1633,12 @@ public Builder clearUnorderedAckIds() { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were out of order.
    +       * Optional. List of acknowledgment IDs that were out of order.
            * 
    * * repeated string unordered_ack_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1637,11 +1669,12 @@ private void ensureTemporaryFailedAckIdsIsMutable() { } bitField0_ |= 0x00000008; } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -1655,11 +1688,12 @@ public com.google.protobuf.ProtocolStringList getTemporaryFailedAckIdsList() { temporaryFailedAckIds_.makeImmutable(); return temporaryFailedAckIds_; } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -1672,11 +1706,12 @@ public com.google.protobuf.ProtocolStringList getTemporaryFailedAckIdsList() { public int getTemporaryFailedAckIdsCount() { return temporaryFailedAckIds_.size(); } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -1690,11 +1725,12 @@ public int getTemporaryFailedAckIdsCount() { public java.lang.String getTemporaryFailedAckIds(int index) { return temporaryFailedAckIds_.get(index); } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -1708,11 +1744,12 @@ public java.lang.String getTemporaryFailedAckIds(int index) { public com.google.protobuf.ByteString getTemporaryFailedAckIdsBytes(int index) { return temporaryFailedAckIds_.getByteString(index); } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -1734,11 +1771,12 @@ public Builder setTemporaryFailedAckIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -1759,11 +1797,12 @@ public Builder addTemporaryFailedAckIds(java.lang.String value) { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -1781,11 +1820,12 @@ public Builder addAllTemporaryFailedAckIds(java.lang.Iterable onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -1802,11 +1842,12 @@ public Builder clearTemporaryFailedAckIds() { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -1829,18 +1870,6 @@ public Builder addTemporaryFailedAckIdsBytes(com.google.protobuf.ByteString valu return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation) } @@ -1905,7 +1934,7 @@ public interface ModifyAckDeadlineConfirmationOrBuilder * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1913,11 +1942,12 @@ public interface ModifyAckDeadlineConfirmationOrBuilder * @return A list containing the ackIds. */ java.util.List getAckIdsList(); + /** * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1925,11 +1955,12 @@ public interface ModifyAckDeadlineConfirmationOrBuilder * @return The count of ackIds. */ int getAckIdsCount(); + /** * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1938,11 +1969,12 @@ public interface ModifyAckDeadlineConfirmationOrBuilder * @return The ackIds at the given index. */ java.lang.String getAckIds(int index); + /** * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1956,8 +1988,8 @@ public interface ModifyAckDeadlineConfirmationOrBuilder * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1965,12 +1997,13 @@ public interface ModifyAckDeadlineConfirmationOrBuilder * @return A list containing the invalidAckIds. */ java.util.List getInvalidAckIdsList(); + /** * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1978,12 +2011,13 @@ public interface ModifyAckDeadlineConfirmationOrBuilder * @return The count of invalidAckIds. */ int getInvalidAckIdsCount(); + /** * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1992,12 +2026,13 @@ public interface ModifyAckDeadlineConfirmationOrBuilder * @return The invalidAckIds at the given index. */ java.lang.String getInvalidAckIds(int index); + /** * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2011,7 +2046,7 @@ public interface ModifyAckDeadlineConfirmationOrBuilder * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -2021,11 +2056,12 @@ public interface ModifyAckDeadlineConfirmationOrBuilder * @return A list containing the temporaryFailedAckIds. */ java.util.List getTemporaryFailedAckIdsList(); + /** * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -2035,11 +2071,12 @@ public interface ModifyAckDeadlineConfirmationOrBuilder * @return The count of temporaryFailedAckIds. */ int getTemporaryFailedAckIdsCount(); + /** * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -2050,11 +2087,12 @@ public interface ModifyAckDeadlineConfirmationOrBuilder * @return The temporaryFailedAckIds at the given index. */ java.lang.String getTemporaryFailedAckIds(int index); + /** * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -2066,25 +2104,36 @@ public interface ModifyAckDeadlineConfirmationOrBuilder */ com.google.protobuf.ByteString getTemporaryFailedAckIdsBytes(int index); } + /** * * *
    -   * Acknowledgement IDs sent in one or more previous requests to modify the
    +   * Acknowledgment IDs sent in one or more previous requests to modify the
        * deadline for a specific message.
        * 
    * * Protobuf type {@code google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation} */ public static final class ModifyAckDeadlineConfirmation - extends com.google.protobuf.GeneratedMessageV3 + extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation) ModifyAckDeadlineConfirmationOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModifyAckDeadlineConfirmation"); + } + // Use ModifyAckDeadlineConfirmation.newBuilder() to construct. - private ModifyAckDeadlineConfirmation( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ModifyAckDeadlineConfirmation(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -2094,19 +2143,13 @@ private ModifyAckDeadlineConfirmation() { temporaryFailedAckIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ModifyAckDeadlineConfirmation(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_fieldAccessorTable @@ -2121,11 +2164,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList ackIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2135,11 +2179,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public com.google.protobuf.ProtocolStringList getAckIdsList() { return ackIds_; } + /** * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2149,11 +2194,12 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { public int getAckIdsCount() { return ackIds_.size(); } + /** * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2164,11 +2210,12 @@ public int getAckIdsCount() { public java.lang.String getAckIds(int index) { return ackIds_.get(index); } + /** * * *
    -     * Optional. Successfully processed acknowledgement IDs.
    +     * Optional. Successfully processed acknowledgment IDs.
          * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2185,12 +2232,13 @@ public com.google.protobuf.ByteString getAckIdsBytes(int index) { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList invalidAckIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2200,12 +2248,13 @@ public com.google.protobuf.ByteString getAckIdsBytes(int index) { public com.google.protobuf.ProtocolStringList getInvalidAckIdsList() { return invalidAckIds_; } + /** * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2215,12 +2264,13 @@ public com.google.protobuf.ProtocolStringList getInvalidAckIdsList() { public int getInvalidAckIdsCount() { return invalidAckIds_.size(); } + /** * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2231,12 +2281,13 @@ public int getInvalidAckIdsCount() { public java.lang.String getInvalidAckIds(int index) { return invalidAckIds_.get(index); } + /** * * *
    -     * Optional. List of acknowledgement IDs that were malformed or whose
    -     * acknowledgement deadline has expired.
    +     * Optional. List of acknowledgment IDs that were malformed or whose
    +     * acknowledgment deadline has expired.
          * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2253,11 +2304,12 @@ public com.google.protobuf.ByteString getInvalidAckIdsBytes(int index) { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList temporaryFailedAckIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -2269,11 +2321,12 @@ public com.google.protobuf.ByteString getInvalidAckIdsBytes(int index) { public com.google.protobuf.ProtocolStringList getTemporaryFailedAckIdsList() { return temporaryFailedAckIds_; } + /** * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -2285,11 +2338,12 @@ public com.google.protobuf.ProtocolStringList getTemporaryFailedAckIdsList() { public int getTemporaryFailedAckIdsCount() { return temporaryFailedAckIds_.size(); } + /** * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -2302,11 +2356,12 @@ public int getTemporaryFailedAckIdsCount() { public java.lang.String getTemporaryFailedAckIds(int index) { return temporaryFailedAckIds_.get(index); } + /** * * *
    -     * Optional. List of acknowledgement IDs that failed processing with
    +     * Optional. List of acknowledgment IDs that failed processing with
          * temporary issues.
          * 
    * @@ -2335,13 +2390,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < ackIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ackIds_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 1, ackIds_.getRaw(i)); } for (int i = 0; i < invalidAckIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, invalidAckIds_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 2, invalidAckIds_.getRaw(i)); } for (int i = 0; i < temporaryFailedAckIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( + com.google.protobuf.GeneratedMessage.writeString( output, 3, temporaryFailedAckIds_.getRaw(i)); } getUnknownFields().writeTo(output); @@ -2466,33 +2521,33 @@ public int hashCode() { public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation @@ -2500,7 +2555,7 @@ public int hashCode() { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2524,23 +2579,22 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * *
    -     * Acknowledgement IDs sent in one or more previous requests to modify the
    +     * Acknowledgment IDs sent in one or more previous requests to modify the
          * deadline for a specific message.
          * 
    * * Protobuf type {@code google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation) com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationOrBuilder { @@ -2550,7 +2604,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_fieldAccessorTable @@ -2564,7 +2618,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2630,41 +2684,6 @@ private void buildPartial0( } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other @@ -2787,11 +2806,12 @@ private void ensureAckIdsIsMutable() { } bitField0_ |= 0x00000001; } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2802,11 +2822,12 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { ackIds_.makeImmutable(); return ackIds_; } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2816,11 +2837,12 @@ public com.google.protobuf.ProtocolStringList getAckIdsList() { public int getAckIdsCount() { return ackIds_.size(); } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2831,11 +2853,12 @@ public int getAckIdsCount() { public java.lang.String getAckIds(int index) { return ackIds_.get(index); } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2846,11 +2869,12 @@ public java.lang.String getAckIds(int index) { public com.google.protobuf.ByteString getAckIdsBytes(int index) { return ackIds_.getByteString(index); } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2869,11 +2893,12 @@ public Builder setAckIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2891,11 +2916,12 @@ public Builder addAckIds(java.lang.String value) { onChanged(); return this; } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2910,11 +2936,12 @@ public Builder addAllAckIds(java.lang.Iterable values) { onChanged(); return this; } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2928,11 +2955,12 @@ public Builder clearAckIds() { onChanged(); return this; } + /** * * *
    -       * Optional. Successfully processed acknowledgement IDs.
    +       * Optional. Successfully processed acknowledgment IDs.
            * 
    * * repeated string ack_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2961,12 +2989,13 @@ private void ensureInvalidAckIdsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2977,12 +3006,13 @@ public com.google.protobuf.ProtocolStringList getInvalidAckIdsList() { invalidAckIds_.makeImmutable(); return invalidAckIds_; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2992,12 +3022,13 @@ public com.google.protobuf.ProtocolStringList getInvalidAckIdsList() { public int getInvalidAckIdsCount() { return invalidAckIds_.size(); } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -3008,12 +3039,13 @@ public int getInvalidAckIdsCount() { public java.lang.String getInvalidAckIds(int index) { return invalidAckIds_.get(index); } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -3024,12 +3056,13 @@ public java.lang.String getInvalidAckIds(int index) { public com.google.protobuf.ByteString getInvalidAckIdsBytes(int index) { return invalidAckIds_.getByteString(index); } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -3048,12 +3081,13 @@ public Builder setInvalidAckIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -3071,12 +3105,13 @@ public Builder addInvalidAckIds(java.lang.String value) { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -3091,12 +3126,13 @@ public Builder addAllInvalidAckIds(java.lang.Iterable values) onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -3110,12 +3146,13 @@ public Builder clearInvalidAckIds() { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that were malformed or whose
    -       * acknowledgement deadline has expired.
    +       * Optional. List of acknowledgment IDs that were malformed or whose
    +       * acknowledgment deadline has expired.
            * 
    * * repeated string invalid_ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -3145,11 +3182,12 @@ private void ensureTemporaryFailedAckIdsIsMutable() { } bitField0_ |= 0x00000004; } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -3163,11 +3201,12 @@ public com.google.protobuf.ProtocolStringList getTemporaryFailedAckIdsList() { temporaryFailedAckIds_.makeImmutable(); return temporaryFailedAckIds_; } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -3180,11 +3219,12 @@ public com.google.protobuf.ProtocolStringList getTemporaryFailedAckIdsList() { public int getTemporaryFailedAckIdsCount() { return temporaryFailedAckIds_.size(); } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -3198,11 +3238,12 @@ public int getTemporaryFailedAckIdsCount() { public java.lang.String getTemporaryFailedAckIds(int index) { return temporaryFailedAckIds_.get(index); } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -3216,11 +3257,12 @@ public java.lang.String getTemporaryFailedAckIds(int index) { public com.google.protobuf.ByteString getTemporaryFailedAckIdsBytes(int index) { return temporaryFailedAckIds_.getByteString(index); } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -3242,11 +3284,12 @@ public Builder setTemporaryFailedAckIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -3267,11 +3310,12 @@ public Builder addTemporaryFailedAckIds(java.lang.String value) { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -3289,11 +3333,12 @@ public Builder addAllTemporaryFailedAckIds(java.lang.Iterable onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -3310,11 +3355,12 @@ public Builder clearTemporaryFailedAckIds() { onChanged(); return this; } + /** * * *
    -       * Optional. List of acknowledgement IDs that failed processing with
    +       * Optional. List of acknowledgment IDs that failed processing with
            * temporary issues.
            * 
    * @@ -3337,18 +3383,6 @@ public Builder addTemporaryFailedAckIdsBytes(com.google.protobuf.ByteString valu return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation) } @@ -3438,6 +3472,7 @@ public interface SubscriptionPropertiesOrBuilder */ boolean getMessageOrderingEnabled(); } + /** * * @@ -3447,31 +3482,36 @@ public interface SubscriptionPropertiesOrBuilder * * Protobuf type {@code google.pubsub.v1.StreamingPullResponse.SubscriptionProperties} */ - public static final class SubscriptionProperties extends com.google.protobuf.GeneratedMessageV3 + public static final class SubscriptionProperties extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) SubscriptionPropertiesOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SubscriptionProperties"); + } + // Use SubscriptionProperties.newBuilder() to construct. - private SubscriptionProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SubscriptionProperties(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SubscriptionProperties() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SubscriptionProperties(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_fieldAccessorTable @@ -3482,6 +3522,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int EXACTLY_ONCE_DELIVERY_ENABLED_FIELD_NUMBER = 1; private boolean exactlyOnceDeliveryEnabled_ = false; + /** * * @@ -3502,6 +3543,7 @@ public boolean getExactlyOnceDeliveryEnabled() { public static final int MESSAGE_ORDERING_ENABLED_FIELD_NUMBER = 2; private boolean messageOrderingEnabled_ = false; + /** * * @@ -3630,39 +3672,39 @@ public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -3686,11 +3728,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -3700,8 +3742,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.pubsub.v1.StreamingPullResponse.SubscriptionProperties} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) com.google.pubsub.v1.StreamingPullResponse.SubscriptionPropertiesOrBuilder { @@ -3711,7 +3752,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_fieldAccessorTable @@ -3724,7 +3765,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -3781,41 +3822,6 @@ private void buildPartial0( } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) { @@ -3896,6 +3902,7 @@ public Builder mergeFrom( private int bitField0_; private boolean exactlyOnceDeliveryEnabled_; + /** * * @@ -3913,6 +3920,7 @@ public Builder mergeFrom( public boolean getExactlyOnceDeliveryEnabled() { return exactlyOnceDeliveryEnabled_; } + /** * * @@ -3934,6 +3942,7 @@ public Builder setExactlyOnceDeliveryEnabled(boolean value) { onChanged(); return this; } + /** * * @@ -3955,6 +3964,7 @@ public Builder clearExactlyOnceDeliveryEnabled() { } private boolean messageOrderingEnabled_; + /** * * @@ -3970,6 +3980,7 @@ public Builder clearExactlyOnceDeliveryEnabled() { public boolean getMessageOrderingEnabled() { return messageOrderingEnabled_; } + /** * * @@ -3989,6 +4000,7 @@ public Builder setMessageOrderingEnabled(boolean value) { onChanged(); return this; } + /** * * @@ -4007,18 +4019,6 @@ public Builder clearMessageOrderingEnabled() { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) } @@ -4079,11 +4079,12 @@ public com.google.protobuf.Parser getParserForType() { @SuppressWarnings("serial") private java.util.List receivedMessages_; + /** * * *
    -   * Optional. Received Pub/Sub messages. This will not be empty.
    +   * Optional. Received Pub/Sub messages.
        * 
    * * @@ -4094,11 +4095,12 @@ public com.google.protobuf.Parser getParserForType() { public java.util.List getReceivedMessagesList() { return receivedMessages_; } + /** * * *
    -   * Optional. Received Pub/Sub messages. This will not be empty.
    +   * Optional. Received Pub/Sub messages.
        * 
    * * @@ -4110,11 +4112,12 @@ public java.util.List getReceivedMessagesL getReceivedMessagesOrBuilderList() { return receivedMessages_; } + /** * * *
    -   * Optional. Received Pub/Sub messages. This will not be empty.
    +   * Optional. Received Pub/Sub messages.
        * 
    * * @@ -4125,11 +4128,12 @@ public java.util.List getReceivedMessagesL public int getReceivedMessagesCount() { return receivedMessages_.size(); } + /** * * *
    -   * Optional. Received Pub/Sub messages. This will not be empty.
    +   * Optional. Received Pub/Sub messages.
        * 
    * * @@ -4140,11 +4144,12 @@ public int getReceivedMessagesCount() { public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { return receivedMessages_.get(index); } + /** * * *
    -   * Optional. Received Pub/Sub messages. This will not be empty.
    +   * Optional. Received Pub/Sub messages.
        * 
    * * @@ -4159,12 +4164,13 @@ public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilde public static final int ACKNOWLEDGE_CONFIRMATION_FIELD_NUMBER = 5; private com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledgeConfirmation_; + /** * * *
        * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -   * set to `true`.
    +   * set to `true` and is not guaranteed to be populated.
        * 
    * * @@ -4177,12 +4183,13 @@ public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilde public boolean hasAcknowledgeConfirmation() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
        * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -   * set to `true`.
    +   * set to `true` and is not guaranteed to be populated.
        * 
    * * @@ -4198,12 +4205,13 @@ public boolean hasAcknowledgeConfirmation() { ? com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.getDefaultInstance() : acknowledgeConfirmation_; } + /** * * *
        * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -   * set to `true`.
    +   * set to `true` and is not guaranteed to be populated.
        * 
    * * @@ -4221,12 +4229,13 @@ public boolean hasAcknowledgeConfirmation() { public static final int MODIFY_ACK_DEADLINE_CONFIRMATION_FIELD_NUMBER = 3; private com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modifyAckDeadlineConfirmation_; + /** * * *
        * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -   * set to `true`.
    +   * set to `true` and is not guaranteed to be populated.
        * 
    * * @@ -4239,12 +4248,13 @@ public boolean hasAcknowledgeConfirmation() { public boolean hasModifyAckDeadlineConfirmation() { return ((bitField0_ & 0x00000002) != 0); } + /** * * *
        * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -   * set to `true`.
    +   * set to `true` and is not guaranteed to be populated.
        * 
    * * @@ -4261,12 +4271,13 @@ public boolean hasModifyAckDeadlineConfirmation() { .getDefaultInstance() : modifyAckDeadlineConfirmation_; } + /** * * *
        * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -   * set to `true`.
    +   * set to `true` and is not guaranteed to be populated.
        * 
    * * @@ -4284,6 +4295,7 @@ public boolean hasModifyAckDeadlineConfirmation() { public static final int SUBSCRIPTION_PROPERTIES_FIELD_NUMBER = 4; private com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties subscriptionProperties_; + /** * * @@ -4301,6 +4313,7 @@ public boolean hasModifyAckDeadlineConfirmation() { public boolean hasSubscriptionProperties() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -4321,6 +4334,7 @@ public boolean hasSubscriptionProperties() { ? com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.getDefaultInstance() : subscriptionProperties_; } + /** * * @@ -4491,38 +4505,38 @@ public static com.google.pubsub.v1.StreamingPullResponse parseFrom( public static com.google.pubsub.v1.StreamingPullResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.StreamingPullResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.StreamingPullResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.StreamingPullResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -4545,10 +4559,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -4559,7 +4574,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.StreamingPullResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.StreamingPullResponse) com.google.pubsub.v1.StreamingPullResponseOrBuilder { @@ -4569,7 +4584,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_StreamingPullResponse_fieldAccessorTable @@ -4583,17 +4598,17 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getReceivedMessagesFieldBuilder(); - getAcknowledgeConfirmationFieldBuilder(); - getModifyAckDeadlineConfirmationFieldBuilder(); - getSubscriptionPropertiesFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetReceivedMessagesFieldBuilder(); + internalGetAcknowledgeConfirmationFieldBuilder(); + internalGetModifyAckDeadlineConfirmationFieldBuilder(); + internalGetSubscriptionPropertiesFieldBuilder(); } } @@ -4697,39 +4712,6 @@ private void buildPartial0(com.google.pubsub.v1.StreamingPullResponse result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.StreamingPullResponse) { @@ -4761,8 +4743,8 @@ public Builder mergeFrom(com.google.pubsub.v1.StreamingPullResponse other) { receivedMessages_ = other.receivedMessages_; bitField0_ = (bitField0_ & ~0x00000001); receivedMessagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getReceivedMessagesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetReceivedMessagesFieldBuilder() : null; } else { receivedMessagesBuilder_.addAllMessages(other.receivedMessages_); @@ -4820,21 +4802,24 @@ public Builder mergeFrom( case 26: { input.readMessage( - getModifyAckDeadlineConfirmationFieldBuilder().getBuilder(), extensionRegistry); + internalGetModifyAckDeadlineConfirmationFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage( - getSubscriptionPropertiesFieldBuilder().getBuilder(), extensionRegistry); + internalGetSubscriptionPropertiesFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { input.readMessage( - getAcknowledgeConfirmationFieldBuilder().getBuilder(), extensionRegistry); + internalGetAcknowledgeConfirmationFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000002; break; } // case 42 @@ -4868,7 +4853,7 @@ private void ensureReceivedMessagesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.ReceivedMessage, com.google.pubsub.v1.ReceivedMessage.Builder, com.google.pubsub.v1.ReceivedMessageOrBuilder> @@ -4878,7 +4863,7 @@ private void ensureReceivedMessagesIsMutable() { * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -4892,11 +4877,12 @@ public java.util.List getReceivedMessagesL return receivedMessagesBuilder_.getMessageList(); } } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -4910,11 +4896,12 @@ public int getReceivedMessagesCount() { return receivedMessagesBuilder_.getCount(); } } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -4928,11 +4915,12 @@ public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { return receivedMessagesBuilder_.getMessage(index); } } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -4952,11 +4940,12 @@ public Builder setReceivedMessages(int index, com.google.pubsub.v1.ReceivedMessa } return this; } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -4974,11 +4963,12 @@ public Builder setReceivedMessages( } return this; } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -4998,11 +4988,12 @@ public Builder addReceivedMessages(com.google.pubsub.v1.ReceivedMessage value) { } return this; } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -5022,11 +5013,12 @@ public Builder addReceivedMessages(int index, com.google.pubsub.v1.ReceivedMessa } return this; } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -5044,11 +5036,12 @@ public Builder addReceivedMessages( } return this; } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -5066,11 +5059,12 @@ public Builder addReceivedMessages( } return this; } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -5088,11 +5082,12 @@ public Builder addAllReceivedMessages( } return this; } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -5109,11 +5104,12 @@ public Builder clearReceivedMessages() { } return this; } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -5130,11 +5126,12 @@ public Builder removeReceivedMessages(int index) { } return this; } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -5142,13 +5139,14 @@ public Builder removeReceivedMessages(int index) { * */ public com.google.pubsub.v1.ReceivedMessage.Builder getReceivedMessagesBuilder(int index) { - return getReceivedMessagesFieldBuilder().getBuilder(index); + return internalGetReceivedMessagesFieldBuilder().getBuilder(index); } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -5162,11 +5160,12 @@ public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilde return receivedMessagesBuilder_.getMessageOrBuilder(index); } } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -5181,11 +5180,12 @@ public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilde return java.util.Collections.unmodifiableList(receivedMessages_); } } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -5193,14 +5193,15 @@ public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilde * */ public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder() { - return getReceivedMessagesFieldBuilder() + return internalGetReceivedMessagesFieldBuilder() .addBuilder(com.google.pubsub.v1.ReceivedMessage.getDefaultInstance()); } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -5208,14 +5209,15 @@ public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder() * */ public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder(int index) { - return getReceivedMessagesFieldBuilder() + return internalGetReceivedMessagesFieldBuilder() .addBuilder(index, com.google.pubsub.v1.ReceivedMessage.getDefaultInstance()); } + /** * * *
    -     * Optional. Received Pub/Sub messages. This will not be empty.
    +     * Optional. Received Pub/Sub messages.
          * 
    * * @@ -5224,17 +5226,17 @@ public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder(i */ public java.util.List getReceivedMessagesBuilderList() { - return getReceivedMessagesFieldBuilder().getBuilderList(); + return internalGetReceivedMessagesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.ReceivedMessage, com.google.pubsub.v1.ReceivedMessage.Builder, com.google.pubsub.v1.ReceivedMessageOrBuilder> - getReceivedMessagesFieldBuilder() { + internalGetReceivedMessagesFieldBuilder() { if (receivedMessagesBuilder_ == null) { receivedMessagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.pubsub.v1.ReceivedMessage, com.google.pubsub.v1.ReceivedMessage.Builder, com.google.pubsub.v1.ReceivedMessageOrBuilder>( @@ -5249,17 +5251,18 @@ public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder(i private com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledgeConfirmation_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation, com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.Builder, com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationOrBuilder> acknowledgeConfirmationBuilder_; + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5271,12 +5274,13 @@ public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder(i public boolean hasAcknowledgeConfirmation() { return ((bitField0_ & 0x00000002) != 0); } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5296,12 +5300,13 @@ public boolean hasAcknowledgeConfirmation() { return acknowledgeConfirmationBuilder_.getMessage(); } } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5322,12 +5327,13 @@ public Builder setAcknowledgeConfirmation( onChanged(); return this; } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5346,12 +5352,13 @@ public Builder setAcknowledgeConfirmation( onChanged(); return this; } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5379,12 +5386,13 @@ public Builder mergeAcknowledgeConfirmation( } return this; } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5401,12 +5409,13 @@ public Builder clearAcknowledgeConfirmation() { onChanged(); return this; } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5417,14 +5426,15 @@ public Builder clearAcknowledgeConfirmation() { getAcknowledgeConfirmationBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getAcknowledgeConfirmationFieldBuilder().getBuilder(); + return internalGetAcknowledgeConfirmationFieldBuilder().getBuilder(); } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5442,26 +5452,27 @@ public Builder clearAcknowledgeConfirmation() { : acknowledgeConfirmation_; } } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation, com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.Builder, com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationOrBuilder> - getAcknowledgeConfirmationFieldBuilder() { + internalGetAcknowledgeConfirmationFieldBuilder() { if (acknowledgeConfirmationBuilder_ == null) { acknowledgeConfirmationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation, com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.Builder, com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationOrBuilder>( @@ -5473,17 +5484,18 @@ public Builder clearAcknowledgeConfirmation() { private com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modifyAckDeadlineConfirmation_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation, com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.Builder, com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationOrBuilder> modifyAckDeadlineConfirmationBuilder_; + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5495,12 +5507,13 @@ public Builder clearAcknowledgeConfirmation() { public boolean hasModifyAckDeadlineConfirmation() { return ((bitField0_ & 0x00000004) != 0); } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5520,12 +5533,13 @@ public boolean hasModifyAckDeadlineConfirmation() { return modifyAckDeadlineConfirmationBuilder_.getMessage(); } } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5546,12 +5560,13 @@ public Builder setModifyAckDeadlineConfirmation( onChanged(); return this; } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5570,12 +5585,13 @@ public Builder setModifyAckDeadlineConfirmation( onChanged(); return this; } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5603,12 +5619,13 @@ public Builder mergeModifyAckDeadlineConfirmation( } return this; } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5625,12 +5642,13 @@ public Builder clearModifyAckDeadlineConfirmation() { onChanged(); return this; } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5641,14 +5659,15 @@ public Builder clearModifyAckDeadlineConfirmation() { getModifyAckDeadlineConfirmationBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getModifyAckDeadlineConfirmationFieldBuilder().getBuilder(); + return internalGetModifyAckDeadlineConfirmationFieldBuilder().getBuilder(); } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * @@ -5666,26 +5685,27 @@ public Builder clearModifyAckDeadlineConfirmation() { : modifyAckDeadlineConfirmation_; } } + /** * * *
          * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -     * set to `true`.
    +     * set to `true` and is not guaranteed to be populated.
          * 
    * * * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation, com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.Builder, com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationOrBuilder> - getModifyAckDeadlineConfirmationFieldBuilder() { + internalGetModifyAckDeadlineConfirmationFieldBuilder() { if (modifyAckDeadlineConfirmationBuilder_ == null) { modifyAckDeadlineConfirmationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation, com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.Builder, com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationOrBuilder>( @@ -5697,11 +5717,12 @@ public Builder clearModifyAckDeadlineConfirmation() { private com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties subscriptionProperties_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties, com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.Builder, com.google.pubsub.v1.StreamingPullResponse.SubscriptionPropertiesOrBuilder> subscriptionPropertiesBuilder_; + /** * * @@ -5718,6 +5739,7 @@ public Builder clearModifyAckDeadlineConfirmation() { public boolean hasSubscriptionProperties() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -5741,6 +5763,7 @@ public boolean hasSubscriptionProperties() { return subscriptionPropertiesBuilder_.getMessage(); } } + /** * * @@ -5766,6 +5789,7 @@ public Builder setSubscriptionProperties( onChanged(); return this; } + /** * * @@ -5788,6 +5812,7 @@ public Builder setSubscriptionProperties( onChanged(); return this; } + /** * * @@ -5820,6 +5845,7 @@ public Builder mergeSubscriptionProperties( } return this; } + /** * * @@ -5841,6 +5867,7 @@ public Builder clearSubscriptionProperties() { onChanged(); return this; } + /** * * @@ -5856,8 +5883,9 @@ public Builder clearSubscriptionProperties() { getSubscriptionPropertiesBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getSubscriptionPropertiesFieldBuilder().getBuilder(); + return internalGetSubscriptionPropertiesFieldBuilder().getBuilder(); } + /** * * @@ -5879,6 +5907,7 @@ public Builder clearSubscriptionProperties() { : subscriptionProperties_; } } + /** * * @@ -5890,14 +5919,14 @@ public Builder clearSubscriptionProperties() { * .google.pubsub.v1.StreamingPullResponse.SubscriptionProperties subscription_properties = 4 [(.google.api.field_behavior) = OPTIONAL]; *
    */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties, com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.Builder, com.google.pubsub.v1.StreamingPullResponse.SubscriptionPropertiesOrBuilder> - getSubscriptionPropertiesFieldBuilder() { + internalGetSubscriptionPropertiesFieldBuilder() { if (subscriptionPropertiesBuilder_ == null) { subscriptionPropertiesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties, com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.Builder, com.google.pubsub.v1.StreamingPullResponse.SubscriptionPropertiesOrBuilder>( @@ -5907,17 +5936,6 @@ public Builder clearSubscriptionProperties() { return subscriptionPropertiesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.StreamingPullResponse) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponseOrBuilder.java index a20bf8572..6705ad05d 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface StreamingPullResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.StreamingPullResponse) @@ -28,7 +30,7 @@ public interface StreamingPullResponseOrBuilder * * *
    -   * Optional. Received Pub/Sub messages. This will not be empty.
    +   * Optional. Received Pub/Sub messages.
        * 
    * * @@ -36,11 +38,12 @@ public interface StreamingPullResponseOrBuilder * */ java.util.List getReceivedMessagesList(); + /** * * *
    -   * Optional. Received Pub/Sub messages. This will not be empty.
    +   * Optional. Received Pub/Sub messages.
        * 
    * * @@ -48,11 +51,12 @@ public interface StreamingPullResponseOrBuilder * */ com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index); + /** * * *
    -   * Optional. Received Pub/Sub messages. This will not be empty.
    +   * Optional. Received Pub/Sub messages.
        * 
    * * @@ -60,11 +64,12 @@ public interface StreamingPullResponseOrBuilder * */ int getReceivedMessagesCount(); + /** * * *
    -   * Optional. Received Pub/Sub messages. This will not be empty.
    +   * Optional. Received Pub/Sub messages.
        * 
    * * @@ -73,11 +78,12 @@ public interface StreamingPullResponseOrBuilder */ java.util.List getReceivedMessagesOrBuilderList(); + /** * * *
    -   * Optional. Received Pub/Sub messages. This will not be empty.
    +   * Optional. Received Pub/Sub messages.
        * 
    * * @@ -91,7 +97,7 @@ public interface StreamingPullResponseOrBuilder * *
        * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -   * set to `true`.
    +   * set to `true` and is not guaranteed to be populated.
        * 
    * * @@ -101,12 +107,13 @@ public interface StreamingPullResponseOrBuilder * @return Whether the acknowledgeConfirmation field is set. */ boolean hasAcknowledgeConfirmation(); + /** * * *
        * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -   * set to `true`.
    +   * set to `true` and is not guaranteed to be populated.
        * 
    * * @@ -116,12 +123,13 @@ public interface StreamingPullResponseOrBuilder * @return The acknowledgeConfirmation. */ com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation getAcknowledgeConfirmation(); + /** * * *
        * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -   * set to `true`.
    +   * set to `true` and is not guaranteed to be populated.
        * 
    * * @@ -136,7 +144,7 @@ public interface StreamingPullResponseOrBuilder * *
        * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -   * set to `true`.
    +   * set to `true` and is not guaranteed to be populated.
        * 
    * * @@ -146,12 +154,13 @@ public interface StreamingPullResponseOrBuilder * @return Whether the modifyAckDeadlineConfirmation field is set. */ boolean hasModifyAckDeadlineConfirmation(); + /** * * *
        * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -   * set to `true`.
    +   * set to `true` and is not guaranteed to be populated.
        * 
    * * @@ -162,12 +171,13 @@ public interface StreamingPullResponseOrBuilder */ com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation getModifyAckDeadlineConfirmation(); + /** * * *
        * Optional. This field will only be set if `enable_exactly_once_delivery` is
    -   * set to `true`.
    +   * set to `true` and is not guaranteed to be populated.
        * 
    * * @@ -191,6 +201,7 @@ public interface StreamingPullResponseOrBuilder * @return Whether the subscriptionProperties field is set. */ boolean hasSubscriptionProperties(); + /** * * @@ -205,6 +216,7 @@ public interface StreamingPullResponseOrBuilder * @return The subscriptionProperties. */ com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties getSubscriptionProperties(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java index 8554197d0..ab7ef789d 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -30,13 +31,25 @@ * * Protobuf type {@code google.pubsub.v1.Subscription} */ -public final class Subscription extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Subscription extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.Subscription) SubscriptionOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Subscription"); + } + // Use Subscription.newBuilder() to construct. - private Subscription(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Subscription(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,12 +58,7 @@ private Subscription() { topic_ = ""; filter_ = ""; state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Subscription(); + messageTransforms_ = java.util.Collections.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -65,13 +73,15 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 9: return internalGetLabels(); + case 26: + return internalGetTags(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_Subscription_fieldAccessorTable @@ -125,6 +135,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + /** * * @@ -135,6 +155,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -145,6 +166,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * ACTIVE = 1; */ public static final int ACTIVE_VALUE = 1; + /** * * @@ -216,7 +238,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.pubsub.v1.Subscription.getDescriptor().getEnumTypes().get(0); } @@ -255,11 +277,14 @@ public interface AnalyticsHubSubscriptionInfoOrBuilder * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" *
    * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The listing. */ java.lang.String getListing(); + /** * * @@ -269,7 +294,9 @@ public interface AnalyticsHubSubscriptionInfoOrBuilder * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" *
    * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for listing. */ @@ -289,6 +316,7 @@ public interface AnalyticsHubSubscriptionInfoOrBuilder * @return The subscription. */ java.lang.String getSubscription(); + /** * * @@ -304,25 +332,36 @@ public interface AnalyticsHubSubscriptionInfoOrBuilder */ com.google.protobuf.ByteString getSubscriptionBytes(); } + /** * * *
    -   * Information about an associated Analytics Hub subscription
    -   * (https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).
    +   * Information about an associated [Analytics Hub
    +   * subscription](https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).
        * 
    * * Protobuf type {@code google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo} */ public static final class AnalyticsHubSubscriptionInfo - extends com.google.protobuf.GeneratedMessageV3 + extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo) AnalyticsHubSubscriptionInfoOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AnalyticsHubSubscriptionInfo"); + } + // Use AnalyticsHubSubscriptionInfo.newBuilder() to construct. - private AnalyticsHubSubscriptionInfo( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AnalyticsHubSubscriptionInfo(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -331,19 +370,13 @@ private AnalyticsHubSubscriptionInfo() { subscription_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AnalyticsHubSubscriptionInfo(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_Subscription_AnalyticsHubSubscriptionInfo_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_Subscription_AnalyticsHubSubscriptionInfo_fieldAccessorTable @@ -356,6 +389,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object listing_ = ""; + /** * * @@ -365,7 +399,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" *
    * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The listing. */ @@ -381,6 +417,7 @@ public java.lang.String getListing() { return s; } } + /** * * @@ -390,7 +427,9 @@ public java.lang.String getListing() { * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" *
    * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for listing. */ @@ -411,6 +450,7 @@ public com.google.protobuf.ByteString getListingBytes() { @SuppressWarnings("serial") private volatile java.lang.Object subscription_ = ""; + /** * * @@ -436,6 +476,7 @@ public java.lang.String getSubscription() { return s; } } + /** * * @@ -476,11 +517,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(listing_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, listing_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(listing_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, listing_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, subscription_); } getUnknownFields().writeTo(output); } @@ -491,11 +532,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(listing_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, listing_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(listing_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, listing_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subscription_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subscription_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subscription_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, subscription_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -572,38 +613,38 @@ public static com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo par public static com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -627,23 +668,22 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * *
    -     * Information about an associated Analytics Hub subscription
    -     * (https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).
    +     * Information about an associated [Analytics Hub
    +     * subscription](https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).
          * 
    * * Protobuf type {@code google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo) com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfoOrBuilder { @@ -653,7 +693,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_Subscription_AnalyticsHubSubscriptionInfo_fieldAccessorTable @@ -665,7 +705,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -721,41 +761,6 @@ private void buildPartial0( } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo) { @@ -839,6 +844,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object listing_ = ""; + /** * * @@ -848,7 +854,9 @@ public Builder mergeFrom( * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" *
    * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The listing. */ @@ -863,6 +871,7 @@ public java.lang.String getListing() { return (java.lang.String) ref; } } + /** * * @@ -872,7 +881,9 @@ public java.lang.String getListing() { * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" *
    * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for listing. */ @@ -887,6 +898,7 @@ public com.google.protobuf.ByteString getListingBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -896,7 +908,9 @@ public com.google.protobuf.ByteString getListingBytes() { * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" *
    * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The listing to set. * @return This builder for chaining. @@ -910,6 +924,7 @@ public Builder setListing(java.lang.String value) { onChanged(); return this; } + /** * * @@ -919,7 +934,9 @@ public Builder setListing(java.lang.String value) { * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" *
    * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -929,6 +946,7 @@ public Builder clearListing() { onChanged(); return this; } + /** * * @@ -938,7 +956,9 @@ public Builder clearListing() { * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" *
    * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for listing to set. * @return This builder for chaining. @@ -955,6 +975,7 @@ public Builder setListingBytes(com.google.protobuf.ByteString value) { } private java.lang.Object subscription_ = ""; + /** * * @@ -979,6 +1000,7 @@ public java.lang.String getSubscription() { return (java.lang.String) ref; } } + /** * * @@ -1003,6 +1025,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1026,6 +1049,7 @@ public Builder setSubscription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1045,6 +1069,7 @@ public Builder clearSubscription() { onChanged(); return this; } + /** * * @@ -1070,18 +1095,6 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo) } @@ -1142,11 +1155,12 @@ public com.google.protobuf.Parser getParserForType @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * *
    -   * Required. The name of the subscription. It must have the format
    +   * Required. Identifier. The name of the subscription. It must have the format
        * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
        * start with a letter, and contain only letters (`[A-Za-z]`), numbers
        * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
    @@ -1154,7 +1168,9 @@ public com.google.protobuf.Parser getParserForType
        * in length, and it must not start with `"goog"`.
        * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The name. */ @@ -1170,11 +1186,12 @@ public java.lang.String getName() { return s; } } + /** * * *
    -   * Required. The name of the subscription. It must have the format
    +   * Required. Identifier. The name of the subscription. It must have the format
        * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
        * start with a letter, and contain only letters (`[A-Za-z]`), numbers
        * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
    @@ -1182,7 +1199,9 @@ public java.lang.String getName() {
        * in length, and it must not start with `"goog"`.
        * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The bytes for name. */ @@ -1203,6 +1222,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object topic_ = ""; + /** * * @@ -1230,6 +1250,7 @@ public java.lang.String getTopic() { return s; } } + /** * * @@ -1260,6 +1281,7 @@ public com.google.protobuf.ByteString getTopicBytes() { public static final int PUSH_CONFIG_FIELD_NUMBER = 4; private com.google.pubsub.v1.PushConfig pushConfig_; + /** * * @@ -1277,6 +1299,7 @@ public com.google.protobuf.ByteString getTopicBytes() { public boolean hasPushConfig() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1294,6 +1317,7 @@ public boolean hasPushConfig() { public com.google.pubsub.v1.PushConfig getPushConfig() { return pushConfig_ == null ? com.google.pubsub.v1.PushConfig.getDefaultInstance() : pushConfig_; } + /** * * @@ -1312,6 +1336,7 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { public static final int BIGQUERY_CONFIG_FIELD_NUMBER = 18; private com.google.pubsub.v1.BigQueryConfig bigqueryConfig_; + /** * * @@ -1330,6 +1355,7 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { public boolean hasBigqueryConfig() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1350,6 +1376,7 @@ public com.google.pubsub.v1.BigQueryConfig getBigqueryConfig() { ? com.google.pubsub.v1.BigQueryConfig.getDefaultInstance() : bigqueryConfig_; } + /** * * @@ -1371,6 +1398,7 @@ public com.google.pubsub.v1.BigQueryConfigOrBuilder getBigqueryConfigOrBuilder() public static final int CLOUD_STORAGE_CONFIG_FIELD_NUMBER = 22; private com.google.pubsub.v1.CloudStorageConfig cloudStorageConfig_; + /** * * @@ -1389,6 +1417,7 @@ public com.google.pubsub.v1.BigQueryConfigOrBuilder getBigqueryConfigOrBuilder() public boolean hasCloudStorageConfig() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1409,6 +1438,7 @@ public com.google.pubsub.v1.CloudStorageConfig getCloudStorageConfig() { ? com.google.pubsub.v1.CloudStorageConfig.getDefaultInstance() : cloudStorageConfig_; } + /** * * @@ -1428,8 +1458,71 @@ public com.google.pubsub.v1.CloudStorageConfigOrBuilder getCloudStorageConfigOrB : cloudStorageConfig_; } + public static final int BIGTABLE_CONFIG_FIELD_NUMBER = 27; + private com.google.pubsub.v1.BigtableConfig bigtableConfig_; + + /** + * + * + *
    +   * Optional. If delivery to Bigtable is used with this subscription, this
    +   * field is used to configure it.
    +   * 
    + * + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bigtableConfig field is set. + */ + @java.lang.Override + public boolean hasBigtableConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
    +   * Optional. If delivery to Bigtable is used with this subscription, this
    +   * field is used to configure it.
    +   * 
    + * + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bigtableConfig. + */ + @java.lang.Override + public com.google.pubsub.v1.BigtableConfig getBigtableConfig() { + return bigtableConfig_ == null + ? com.google.pubsub.v1.BigtableConfig.getDefaultInstance() + : bigtableConfig_; + } + + /** + * + * + *
    +   * Optional. If delivery to Bigtable is used with this subscription, this
    +   * field is used to configure it.
    +   * 
    + * + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.BigtableConfigOrBuilder getBigtableConfigOrBuilder() { + return bigtableConfig_ == null + ? com.google.pubsub.v1.BigtableConfig.getDefaultInstance() + : bigtableConfig_; + } + public static final int ACK_DEADLINE_SECONDS_FIELD_NUMBER = 5; private int ackDeadlineSeconds_ = 0; + /** * * @@ -1467,6 +1560,7 @@ public int getAckDeadlineSeconds() { public static final int RETAIN_ACKED_MESSAGES_FIELD_NUMBER = 7; private boolean retainAckedMessages_ = false; + /** * * @@ -1490,6 +1584,7 @@ public boolean getRetainAckedMessages() { public static final int MESSAGE_RETENTION_DURATION_FIELD_NUMBER = 8; private com.google.protobuf.Duration messageRetentionDuration_; + /** * * @@ -1509,8 +1604,9 @@ public boolean getRetainAckedMessages() { */ @java.lang.Override public boolean hasMessageRetentionDuration() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1534,6 +1630,7 @@ public com.google.protobuf.Duration getMessageRetentionDuration() { ? com.google.protobuf.Duration.getDefaultInstance() : messageRetentionDuration_; } + /** * * @@ -1582,6 +1679,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -1599,12 +1697,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(); } + /** * * @@ -1619,6 +1719,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -1640,6 +1741,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -1664,6 +1766,7 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { public static final int ENABLE_MESSAGE_ORDERING_FIELD_NUMBER = 10; private boolean enableMessageOrdering_ = false; + /** * * @@ -1685,6 +1788,7 @@ public boolean getEnableMessageOrdering() { public static final int EXPIRATION_POLICY_FIELD_NUMBER = 11; private com.google.pubsub.v1.ExpirationPolicy expirationPolicy_; + /** * * @@ -1706,8 +1810,9 @@ public boolean getEnableMessageOrdering() { */ @java.lang.Override public boolean hasExpirationPolicy() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -1733,6 +1838,7 @@ public com.google.pubsub.v1.ExpirationPolicy getExpirationPolicy() { ? com.google.pubsub.v1.ExpirationPolicy.getDefaultInstance() : expirationPolicy_; } + /** * * @@ -1761,6 +1867,7 @@ public com.google.pubsub.v1.ExpirationPolicyOrBuilder getExpirationPolicyOrBuild @SuppressWarnings("serial") private volatile java.lang.Object filter_ = ""; + /** * * @@ -1788,6 +1895,7 @@ public java.lang.String getFilter() { return s; } } + /** * * @@ -1818,6 +1926,7 @@ public com.google.protobuf.ByteString getFilterBytes() { public static final int DEAD_LETTER_POLICY_FIELD_NUMBER = 13; private com.google.pubsub.v1.DeadLetterPolicy deadLetterPolicy_; + /** * * @@ -1840,8 +1949,9 @@ public com.google.protobuf.ByteString getFilterBytes() { */ @java.lang.Override public boolean hasDeadLetterPolicy() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } + /** * * @@ -1868,6 +1978,7 @@ public com.google.pubsub.v1.DeadLetterPolicy getDeadLetterPolicy() { ? com.google.pubsub.v1.DeadLetterPolicy.getDefaultInstance() : deadLetterPolicy_; } + /** * * @@ -1895,6 +2006,7 @@ public com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuild public static final int RETRY_POLICY_FIELD_NUMBER = 14; private com.google.pubsub.v1.RetryPolicy retryPolicy_; + /** * * @@ -1904,8 +2016,8 @@ public com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuild * * If not set, the default retry policy is applied. This generally implies * that messages will be retried as soon as possible for healthy subscribers. - * RetryPolicy will be triggered on NACKs or acknowledgement deadline - * exceeded events for a given message. + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + * events for a given message. *
    * * @@ -1916,8 +2028,9 @@ public com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuild */ @java.lang.Override public boolean hasRetryPolicy() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } + /** * * @@ -1927,8 +2040,8 @@ public boolean hasRetryPolicy() { * * If not set, the default retry policy is applied. This generally implies * that messages will be retried as soon as possible for healthy subscribers. - * RetryPolicy will be triggered on NACKs or acknowledgement deadline - * exceeded events for a given message. + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + * events for a given message. *
    * * @@ -1943,6 +2056,7 @@ public com.google.pubsub.v1.RetryPolicy getRetryPolicy() { ? com.google.pubsub.v1.RetryPolicy.getDefaultInstance() : retryPolicy_; } + /** * * @@ -1952,8 +2066,8 @@ public com.google.pubsub.v1.RetryPolicy getRetryPolicy() { * * If not set, the default retry policy is applied. This generally implies * that messages will be retried as soon as possible for healthy subscribers. - * RetryPolicy will be triggered on NACKs or acknowledgement deadline - * exceeded events for a given message. + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + * events for a given message. *
    * * @@ -1969,6 +2083,7 @@ public com.google.pubsub.v1.RetryPolicyOrBuilder getRetryPolicyOrBuilder() { public static final int DETACHED_FIELD_NUMBER = 15; private boolean detached_ = false; + /** * * @@ -1991,6 +2106,7 @@ public boolean getDetached() { public static final int ENABLE_EXACTLY_ONCE_DELIVERY_FIELD_NUMBER = 16; private boolean enableExactlyOnceDelivery_ = false; + /** * * @@ -2000,7 +2116,7 @@ public boolean getDetached() { * subscription: * * * The message sent to a subscriber is guaranteed not to be resent - * before the message's acknowledgement deadline expires. + * before the message's acknowledgment deadline expires. * * An acknowledged message will not be resent to a subscriber. * * Note that subscribers may still receive multiple copies of a message @@ -2020,6 +2136,7 @@ public boolean getEnableExactlyOnceDelivery() { public static final int TOPIC_MESSAGE_RETENTION_DURATION_FIELD_NUMBER = 17; private com.google.protobuf.Duration topicMessageRetentionDuration_; + /** * * @@ -2040,8 +2157,9 @@ public boolean getEnableExactlyOnceDelivery() { */ @java.lang.Override public boolean hasTopicMessageRetentionDuration() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } + /** * * @@ -2066,6 +2184,7 @@ public com.google.protobuf.Duration getTopicMessageRetentionDuration() { ? com.google.protobuf.Duration.getDefaultInstance() : topicMessageRetentionDuration_; } + /** * * @@ -2091,6 +2210,7 @@ public com.google.protobuf.DurationOrBuilder getTopicMessageRetentionDurationOrB public static final int STATE_FIELD_NUMBER = 19; private int state_ = 0; + /** * * @@ -2109,6 +2229,7 @@ public com.google.protobuf.DurationOrBuilder getTopicMessageRetentionDurationOrB public int getStateValue() { return state_; } + /** * * @@ -2133,12 +2254,13 @@ public com.google.pubsub.v1.Subscription.State getState() { public static final int ANALYTICS_HUB_SUBSCRIPTION_INFO_FIELD_NUMBER = 23; private com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo analyticsHubSubscriptionInfo_; + /** * * *
        * Output only. Information about the associated Analytics Hub subscription.
    -   * Only set if the subscritpion is created by Analytics Hub.
    +   * Only set if the subscription is created by Analytics Hub.
        * 
    * * @@ -2149,14 +2271,15 @@ public com.google.pubsub.v1.Subscription.State getState() { */ @java.lang.Override public boolean hasAnalyticsHubSubscriptionInfo() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } + /** * * *
        * Output only. Information about the associated Analytics Hub subscription.
    -   * Only set if the subscritpion is created by Analytics Hub.
    +   * Only set if the subscription is created by Analytics Hub.
        * 
    * * @@ -2172,12 +2295,13 @@ public boolean hasAnalyticsHubSubscriptionInfo() { ? com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.getDefaultInstance() : analyticsHubSubscriptionInfo_; } + /** * * *
        * Output only. Information about the associated Analytics Hub subscription.
    -   * Only set if the subscritpion is created by Analytics Hub.
    +   * Only set if the subscription is created by Analytics Hub.
        * 
    * * @@ -2192,90 +2316,324 @@ public boolean hasAnalyticsHubSubscriptionInfo() { : analyticsHubSubscriptionInfo_; } - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static final int MESSAGE_TRANSFORMS_FIELD_NUMBER = 25; - memoizedIsInitialized = 1; - return true; - } + @SuppressWarnings("serial") + private java.util.List messageTransforms_; + /** + * + * + *
    +   * Optional. Transforms to be applied to messages before they are delivered to
    +   * subscribers. Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ @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(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, topic_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getPushConfig()); - } - if (ackDeadlineSeconds_ != 0) { - output.writeInt32(5, ackDeadlineSeconds_); - } - if (retainAckedMessages_ != false) { - output.writeBool(7, retainAckedMessages_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(8, getMessageRetentionDuration()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 9); - if (enableMessageOrdering_ != false) { - output.writeBool(10, enableMessageOrdering_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeMessage(11, getExpirationPolicy()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, filter_); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeMessage(13, getDeadLetterPolicy()); - } - if (((bitField0_ & 0x00000040) != 0)) { - output.writeMessage(14, getRetryPolicy()); - } - if (detached_ != false) { - output.writeBool(15, detached_); - } - if (enableExactlyOnceDelivery_ != false) { - output.writeBool(16, enableExactlyOnceDelivery_); - } - if (((bitField0_ & 0x00000080) != 0)) { - output.writeMessage(17, getTopicMessageRetentionDuration()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(18, getBigqueryConfig()); - } - if (state_ != com.google.pubsub.v1.Subscription.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(19, state_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(22, getCloudStorageConfig()); - } - if (((bitField0_ & 0x00000100) != 0)) { - output.writeMessage(23, getAnalyticsHubSubscriptionInfo()); - } - getUnknownFields().writeTo(output); + public java.util.List getMessageTransformsList() { + return messageTransforms_; } + /** + * + * + *
    +   * Optional. Transforms to be applied to messages before they are delivered to
    +   * subscribers. Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public java.util.List + getMessageTransformsOrBuilderList() { + return messageTransforms_; + } + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages before they are delivered to
    +   * subscribers. Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getMessageTransformsCount() { + return messageTransforms_.size(); + } + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages before they are delivered to
    +   * subscribers. Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.MessageTransform getMessageTransforms(int index) { + return messageTransforms_.get(index); + } + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages before they are delivered to
    +   * subscribers. Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuilder(int index) { + return messageTransforms_.get(index); + } + + public static final int TAGS_FIELD_NUMBER = 26; + + private static final class TagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_Subscription_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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 26 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 26 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 26 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 26 [(.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 + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, topic_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getPushConfig()); + } + if (ackDeadlineSeconds_ != 0) { + output.writeInt32(5, ackDeadlineSeconds_); + } + if (retainAckedMessages_ != false) { + output.writeBool(7, retainAckedMessages_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(8, getMessageRetentionDuration()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 9); + if (enableMessageOrdering_ != false) { + output.writeBool(10, enableMessageOrdering_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(11, getExpirationPolicy()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, filter_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(13, getDeadLetterPolicy()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(14, getRetryPolicy()); + } + if (detached_ != false) { + output.writeBool(15, detached_); + } + if (enableExactlyOnceDelivery_ != false) { + output.writeBool(16, enableExactlyOnceDelivery_); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeMessage(17, getTopicMessageRetentionDuration()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(18, getBigqueryConfig()); + } + if (state_ != com.google.pubsub.v1.Subscription.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(19, state_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(22, getCloudStorageConfig()); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeMessage(23, getAnalyticsHubSubscriptionInfo()); + } + for (int i = 0; i < messageTransforms_.size(); i++) { + output.writeMessage(25, messageTransforms_.get(i)); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 26); + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(27, getBigtableConfig()); + } + 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, topic_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, topic_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPushConfig()); @@ -2286,7 +2644,7 @@ public int getSerializedSize() { if (retainAckedMessages_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, retainAckedMessages_); } - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 8, getMessageRetentionDuration()); @@ -2304,16 +2662,16 @@ public int getSerializedSize() { if (enableMessageOrdering_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, enableMessageOrdering_); } - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getExpirationPolicy()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, filter_); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getDeadLetterPolicy()); } - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getRetryPolicy()); } if (detached_ != false) { @@ -2322,7 +2680,7 @@ public int getSerializedSize() { if (enableExactlyOnceDelivery_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(16, enableExactlyOnceDelivery_); } - if (((bitField0_ & 0x00000080) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 17, getTopicMessageRetentionDuration()); @@ -2336,11 +2694,28 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getCloudStorageConfig()); } - if (((bitField0_ & 0x00000100) != 0)) { + if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 23, getAnalyticsHubSubscriptionInfo()); } + for (int i = 0; i < messageTransforms_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(25, messageTransforms_.get(i)); + } + 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(26, tags__); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, getBigtableConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2370,6 +2745,10 @@ public boolean equals(final java.lang.Object obj) { if (hasCloudStorageConfig()) { if (!getCloudStorageConfig().equals(other.getCloudStorageConfig())) return false; } + if (hasBigtableConfig() != other.hasBigtableConfig()) return false; + if (hasBigtableConfig()) { + if (!getBigtableConfig().equals(other.getBigtableConfig())) return false; + } if (getAckDeadlineSeconds() != other.getAckDeadlineSeconds()) return false; if (getRetainAckedMessages() != other.getRetainAckedMessages()) return false; if (hasMessageRetentionDuration() != other.hasMessageRetentionDuration()) return false; @@ -2405,6 +2784,8 @@ public boolean equals(final java.lang.Object obj) { if (!getAnalyticsHubSubscriptionInfo().equals(other.getAnalyticsHubSubscriptionInfo())) return false; } + if (!getMessageTransformsList().equals(other.getMessageTransformsList())) return false; + if (!internalGetTags().equals(other.internalGetTags())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2432,6 +2813,10 @@ public int hashCode() { hash = (37 * hash) + CLOUD_STORAGE_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getCloudStorageConfig().hashCode(); } + if (hasBigtableConfig()) { + hash = (37 * hash) + BIGTABLE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBigtableConfig().hashCode(); + } hash = (37 * hash) + ACK_DEADLINE_SECONDS_FIELD_NUMBER; hash = (53 * hash) + getAckDeadlineSeconds(); hash = (37 * hash) + RETAIN_ACKED_MESSAGES_FIELD_NUMBER; @@ -2474,6 +2859,14 @@ public int hashCode() { hash = (37 * hash) + ANALYTICS_HUB_SUBSCRIPTION_INFO_FIELD_NUMBER; hash = (53 * hash) + getAnalyticsHubSubscriptionInfo().hashCode(); } + if (getMessageTransformsCount() > 0) { + hash = (37 * hash) + MESSAGE_TRANSFORMS_FIELD_NUMBER; + hash = (53 * hash) + getMessageTransformsList().hashCode(); + } + if (!internalGetTags().getMap().isEmpty()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTags().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2515,38 +2908,38 @@ public static com.google.pubsub.v1.Subscription parseFrom( public static com.google.pubsub.v1.Subscription parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.Subscription parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.Subscription parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.Subscription parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.Subscription parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.Subscription parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2569,10 +2962,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -2584,7 +2978,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.Subscription} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.Subscription) com.google.pubsub.v1.SubscriptionOrBuilder { @@ -2599,6 +2993,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 9: return internalGetLabels(); + case 26: + return internalGetTags(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -2610,13 +3006,15 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi switch (number) { case 9: return internalGetMutableLabels(); + case 26: + return internalGetMutableTags(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_Subscription_fieldAccessorTable @@ -2630,22 +3028,24 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPushConfigFieldBuilder(); - getBigqueryConfigFieldBuilder(); - getCloudStorageConfigFieldBuilder(); - getMessageRetentionDurationFieldBuilder(); - getExpirationPolicyFieldBuilder(); - getDeadLetterPolicyFieldBuilder(); - getRetryPolicyFieldBuilder(); - getTopicMessageRetentionDurationFieldBuilder(); - getAnalyticsHubSubscriptionInfoFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPushConfigFieldBuilder(); + internalGetBigqueryConfigFieldBuilder(); + internalGetCloudStorageConfigFieldBuilder(); + internalGetBigtableConfigFieldBuilder(); + internalGetMessageRetentionDurationFieldBuilder(); + internalGetExpirationPolicyFieldBuilder(); + internalGetDeadLetterPolicyFieldBuilder(); + internalGetRetryPolicyFieldBuilder(); + internalGetTopicMessageRetentionDurationFieldBuilder(); + internalGetAnalyticsHubSubscriptionInfoFieldBuilder(); + internalGetMessageTransformsFieldBuilder(); } } @@ -2670,6 +3070,11 @@ public Builder clear() { cloudStorageConfigBuilder_.dispose(); cloudStorageConfigBuilder_ = null; } + bigtableConfig_ = null; + if (bigtableConfigBuilder_ != null) { + bigtableConfigBuilder_.dispose(); + bigtableConfigBuilder_ = null; + } ackDeadlineSeconds_ = 0; retainAckedMessages_ = false; messageRetentionDuration_ = null; @@ -2708,6 +3113,14 @@ public Builder clear() { analyticsHubSubscriptionInfoBuilder_.dispose(); analyticsHubSubscriptionInfoBuilder_ = null; } + if (messageTransformsBuilder_ == null) { + messageTransforms_ = java.util.Collections.emptyList(); + } else { + messageTransforms_ = null; + messageTransformsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00100000); + internalGetMutableTags().clear(); return this; } @@ -2734,6 +3147,7 @@ public com.google.pubsub.v1.Subscription build() { @java.lang.Override public com.google.pubsub.v1.Subscription buildPartial() { com.google.pubsub.v1.Subscription result = new com.google.pubsub.v1.Subscription(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -2741,6 +3155,18 @@ public com.google.pubsub.v1.Subscription buildPartial() { return result; } + private void buildPartialRepeatedFields(com.google.pubsub.v1.Subscription result) { + if (messageTransformsBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0)) { + messageTransforms_ = java.util.Collections.unmodifiableList(messageTransforms_); + bitField0_ = (bitField0_ & ~0x00100000); + } + result.messageTransforms_ = messageTransforms_; + } else { + result.messageTransforms_ = messageTransformsBuilder_.build(); + } + } + private void buildPartial0(com.google.pubsub.v1.Subscription result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -2767,102 +3193,78 @@ private void buildPartial0(com.google.pubsub.v1.Subscription result) { to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000020) != 0)) { - result.ackDeadlineSeconds_ = ackDeadlineSeconds_; + result.bigtableConfig_ = + bigtableConfigBuilder_ == null ? bigtableConfig_ : bigtableConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000040) != 0)) { - result.retainAckedMessages_ = retainAckedMessages_; + result.ackDeadlineSeconds_ = ackDeadlineSeconds_; } if (((from_bitField0_ & 0x00000080) != 0)) { + result.retainAckedMessages_ = retainAckedMessages_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { result.messageRetentionDuration_ = messageRetentionDurationBuilder_ == null ? messageRetentionDuration_ : messageRetentionDurationBuilder_.build(); - to_bitField0_ |= 0x00000008; + to_bitField0_ |= 0x00000010; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.enableMessageOrdering_ = enableMessageOrdering_; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.expirationPolicy_ = expirationPolicyBuilder_ == null ? expirationPolicy_ : expirationPolicyBuilder_.build(); - to_bitField0_ |= 0x00000010; + to_bitField0_ |= 0x00000020; } - if (((from_bitField0_ & 0x00000800) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.filter_ = filter_; } - if (((from_bitField0_ & 0x00001000) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { result.deadLetterPolicy_ = deadLetterPolicyBuilder_ == null ? deadLetterPolicy_ : deadLetterPolicyBuilder_.build(); - to_bitField0_ |= 0x00000020; + to_bitField0_ |= 0x00000040; } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00004000) != 0)) { result.retryPolicy_ = retryPolicyBuilder_ == null ? retryPolicy_ : retryPolicyBuilder_.build(); - to_bitField0_ |= 0x00000040; + to_bitField0_ |= 0x00000080; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00008000) != 0)) { result.detached_ = detached_; } - if (((from_bitField0_ & 0x00008000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { result.enableExactlyOnceDelivery_ = enableExactlyOnceDelivery_; } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { result.topicMessageRetentionDuration_ = topicMessageRetentionDurationBuilder_ == null ? topicMessageRetentionDuration_ : topicMessageRetentionDurationBuilder_.build(); - to_bitField0_ |= 0x00000080; + to_bitField0_ |= 0x00000100; } - if (((from_bitField0_ & 0x00020000) != 0)) { + if (((from_bitField0_ & 0x00040000) != 0)) { result.state_ = state_; } - if (((from_bitField0_ & 0x00040000) != 0)) { + if (((from_bitField0_ & 0x00080000) != 0)) { result.analyticsHubSubscriptionInfo_ = analyticsHubSubscriptionInfoBuilder_ == null ? analyticsHubSubscriptionInfo_ : analyticsHubSubscriptionInfoBuilder_.build(); - to_bitField0_ |= 0x00000100; + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.tags_ = internalGetTags(); + result.tags_.makeImmutable(); } result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.Subscription) { @@ -2894,6 +3296,9 @@ public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { if (other.hasCloudStorageConfig()) { mergeCloudStorageConfig(other.getCloudStorageConfig()); } + if (other.hasBigtableConfig()) { + mergeBigtableConfig(other.getBigtableConfig()); + } if (other.getAckDeadlineSeconds() != 0) { setAckDeadlineSeconds(other.getAckDeadlineSeconds()); } @@ -2904,7 +3309,7 @@ public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { mergeMessageRetentionDuration(other.getMessageRetentionDuration()); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; if (other.getEnableMessageOrdering() != false) { setEnableMessageOrdering(other.getEnableMessageOrdering()); } @@ -2913,7 +3318,7 @@ public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { } if (!other.getFilter().isEmpty()) { filter_ = other.filter_; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); } if (other.hasDeadLetterPolicy()) { @@ -2937,6 +3342,35 @@ public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { if (other.hasAnalyticsHubSubscriptionInfo()) { mergeAnalyticsHubSubscriptionInfo(other.getAnalyticsHubSubscriptionInfo()); } + if (messageTransformsBuilder_ == null) { + if (!other.messageTransforms_.isEmpty()) { + if (messageTransforms_.isEmpty()) { + messageTransforms_ = other.messageTransforms_; + bitField0_ = (bitField0_ & ~0x00100000); + } else { + ensureMessageTransformsIsMutable(); + messageTransforms_.addAll(other.messageTransforms_); + } + onChanged(); + } + } else { + if (!other.messageTransforms_.isEmpty()) { + if (messageTransformsBuilder_.isEmpty()) { + messageTransformsBuilder_.dispose(); + messageTransformsBuilder_ = null; + messageTransforms_ = other.messageTransforms_; + bitField0_ = (bitField0_ & ~0x00100000); + messageTransformsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMessageTransformsFieldBuilder() + : null; + } else { + messageTransformsBuilder_.addAllMessages(other.messageTransforms_); + } + } + } + internalGetMutableTags().mergeFrom(other.internalGetTags()); + bitField0_ |= 0x00200000; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2977,27 +3411,29 @@ public Builder mergeFrom( } // case 18 case 34: { - input.readMessage(getPushConfigFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPushConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 34 case 40: { ackDeadlineSeconds_ = input.readInt32(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 40 case 56: { retainAckedMessages_ = input.readBool(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 56 case 66: { input.readMessage( - getMessageRetentionDurationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; + internalGetMessageRetentionDurationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000100; break; } // case 66 case 74: @@ -3009,86 +3445,119 @@ public Builder mergeFrom( internalGetMutableLabels() .getMutableMap() .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 74 case 80: { enableMessageOrdering_ = input.readBool(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 80 case 90: { input.readMessage( - getExpirationPolicyFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; + internalGetExpirationPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; break; } // case 90 case 98: { filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; break; } // case 98 case 106: { input.readMessage( - getDeadLetterPolicyFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; + internalGetDeadLetterPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; break; } // case 106 case 114: { - input.readMessage(getRetryPolicyFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00002000; + input.readMessage( + internalGetRetryPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; break; } // case 114 case 120: { detached_ = input.readBool(); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 120 case 128: { enableExactlyOnceDelivery_ = input.readBool(); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 128 case 138: { input.readMessage( - getTopicMessageRetentionDurationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; + internalGetTopicMessageRetentionDurationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00020000; break; } // case 138 case 146: { - input.readMessage(getBigqueryConfigFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetBigqueryConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 146 case 152: { state_ = input.readEnum(); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; break; } // case 152 case 178: { input.readMessage( - getCloudStorageConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetCloudStorageConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 178 case 186: { input.readMessage( - getAnalyticsHubSubscriptionInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00040000; + internalGetAnalyticsHubSubscriptionInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00080000; break; } // case 186 + case 202: + { + com.google.pubsub.v1.MessageTransform m = + input.readMessage( + com.google.pubsub.v1.MessageTransform.parser(), extensionRegistry); + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.add(m); + } else { + messageTransformsBuilder_.addMessage(m); + } + break; + } // case 202 + case 210: + { + com.google.protobuf.MapEntry tags__ = + input.readMessage( + TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableTags().getMutableMap().put(tags__.getKey(), tags__.getValue()); + bitField0_ |= 0x00200000; + break; + } // case 210 + case 218: + { + input.readMessage( + internalGetBigtableConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 218 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3109,11 +3578,12 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * *
    -     * Required. The name of the subscription. It must have the format
    +     * Required. Identifier. The name of the subscription. It must have the format
          * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
          * start with a letter, and contain only letters (`[A-Za-z]`), numbers
          * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
    @@ -3121,7 +3591,9 @@ public Builder mergeFrom(
          * in length, and it must not start with `"goog"`.
          * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The name. */ @@ -3136,11 +3608,12 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * *
    -     * Required. The name of the subscription. It must have the format
    +     * Required. Identifier. The name of the subscription. It must have the format
          * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
          * start with a letter, and contain only letters (`[A-Za-z]`), numbers
          * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
    @@ -3148,7 +3621,9 @@ public java.lang.String getName() {
          * in length, and it must not start with `"goog"`.
          * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The bytes for name. */ @@ -3163,11 +3638,12 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * *
    -     * Required. The name of the subscription. It must have the format
    +     * Required. Identifier. The name of the subscription. It must have the format
          * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
          * start with a letter, and contain only letters (`[A-Za-z]`), numbers
          * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
    @@ -3175,7 +3651,9 @@ public com.google.protobuf.ByteString getNameBytes() {
          * in length, and it must not start with `"goog"`.
          * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @param value The name to set. * @return This builder for chaining. @@ -3189,11 +3667,12 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * *
    -     * Required. The name of the subscription. It must have the format
    +     * Required. Identifier. The name of the subscription. It must have the format
          * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
          * start with a letter, and contain only letters (`[A-Za-z]`), numbers
          * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
    @@ -3201,7 +3680,9 @@ public Builder setName(java.lang.String value) {
          * in length, and it must not start with `"goog"`.
          * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return This builder for chaining. */ @@ -3211,11 +3692,12 @@ public Builder clearName() { onChanged(); return this; } + /** * * *
    -     * Required. The name of the subscription. It must have the format
    +     * Required. Identifier. The name of the subscription. It must have the format
          * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
          * start with a letter, and contain only letters (`[A-Za-z]`), numbers
          * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
    @@ -3223,7 +3705,9 @@ public Builder clearName() {
          * in length, and it must not start with `"goog"`.
          * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @param value The bytes for name to set. * @return This builder for chaining. @@ -3240,6 +3724,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object topic_ = ""; + /** * * @@ -3266,6 +3751,7 @@ public java.lang.String getTopic() { return (java.lang.String) ref; } } + /** * * @@ -3292,6 +3778,7 @@ public com.google.protobuf.ByteString getTopicBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3317,6 +3804,7 @@ public Builder setTopic(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3338,6 +3826,7 @@ public Builder clearTopic() { onChanged(); return this; } + /** * * @@ -3366,11 +3855,12 @@ public Builder setTopicBytes(com.google.protobuf.ByteString value) { } private com.google.pubsub.v1.PushConfig pushConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PushConfig, com.google.pubsub.v1.PushConfig.Builder, com.google.pubsub.v1.PushConfigOrBuilder> pushConfigBuilder_; + /** * * @@ -3387,6 +3877,7 @@ public Builder setTopicBytes(com.google.protobuf.ByteString value) { public boolean hasPushConfig() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -3409,6 +3900,7 @@ public com.google.pubsub.v1.PushConfig getPushConfig() { return pushConfigBuilder_.getMessage(); } } + /** * * @@ -3433,6 +3925,7 @@ public Builder setPushConfig(com.google.pubsub.v1.PushConfig value) { onChanged(); return this; } + /** * * @@ -3454,6 +3947,7 @@ public Builder setPushConfig(com.google.pubsub.v1.PushConfig.Builder builderForV onChanged(); return this; } + /** * * @@ -3483,6 +3977,7 @@ public Builder mergePushConfig(com.google.pubsub.v1.PushConfig value) { } return this; } + /** * * @@ -3504,6 +3999,7 @@ public Builder clearPushConfig() { onChanged(); return this; } + /** * * @@ -3518,8 +4014,9 @@ public Builder clearPushConfig() { public com.google.pubsub.v1.PushConfig.Builder getPushConfigBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getPushConfigFieldBuilder().getBuilder(); + return internalGetPushConfigFieldBuilder().getBuilder(); } + /** * * @@ -3540,6 +4037,7 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { : pushConfig_; } } + /** * * @@ -3551,14 +4049,14 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { * .google.pubsub.v1.PushConfig push_config = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PushConfig, com.google.pubsub.v1.PushConfig.Builder, com.google.pubsub.v1.PushConfigOrBuilder> - getPushConfigFieldBuilder() { + internalGetPushConfigFieldBuilder() { if (pushConfigBuilder_ == null) { pushConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.PushConfig, com.google.pubsub.v1.PushConfig.Builder, com.google.pubsub.v1.PushConfigOrBuilder>( @@ -3569,11 +4067,12 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { } private com.google.pubsub.v1.BigQueryConfig bigqueryConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.BigQueryConfig, com.google.pubsub.v1.BigQueryConfig.Builder, com.google.pubsub.v1.BigQueryConfigOrBuilder> bigqueryConfigBuilder_; + /** * * @@ -3591,6 +4090,7 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { public boolean hasBigqueryConfig() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -3614,6 +4114,7 @@ public com.google.pubsub.v1.BigQueryConfig getBigqueryConfig() { return bigqueryConfigBuilder_.getMessage(); } } + /** * * @@ -3639,6 +4140,7 @@ public Builder setBigqueryConfig(com.google.pubsub.v1.BigQueryConfig value) { onChanged(); return this; } + /** * * @@ -3661,6 +4163,7 @@ public Builder setBigqueryConfig(com.google.pubsub.v1.BigQueryConfig.Builder bui onChanged(); return this; } + /** * * @@ -3691,6 +4194,7 @@ public Builder mergeBigqueryConfig(com.google.pubsub.v1.BigQueryConfig value) { } return this; } + /** * * @@ -3713,6 +4217,7 @@ public Builder clearBigqueryConfig() { onChanged(); return this; } + /** * * @@ -3728,8 +4233,9 @@ public Builder clearBigqueryConfig() { public com.google.pubsub.v1.BigQueryConfig.Builder getBigqueryConfigBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getBigqueryConfigFieldBuilder().getBuilder(); + return internalGetBigqueryConfigFieldBuilder().getBuilder(); } + /** * * @@ -3751,6 +4257,7 @@ public com.google.pubsub.v1.BigQueryConfigOrBuilder getBigqueryConfigOrBuilder() : bigqueryConfig_; } } + /** * * @@ -3763,14 +4270,14 @@ public com.google.pubsub.v1.BigQueryConfigOrBuilder getBigqueryConfigOrBuilder() * .google.pubsub.v1.BigQueryConfig bigquery_config = 18 [(.google.api.field_behavior) = OPTIONAL]; *
    */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.BigQueryConfig, com.google.pubsub.v1.BigQueryConfig.Builder, com.google.pubsub.v1.BigQueryConfigOrBuilder> - getBigqueryConfigFieldBuilder() { + internalGetBigqueryConfigFieldBuilder() { if (bigqueryConfigBuilder_ == null) { bigqueryConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.BigQueryConfig, com.google.pubsub.v1.BigQueryConfig.Builder, com.google.pubsub.v1.BigQueryConfigOrBuilder>( @@ -3781,11 +4288,12 @@ public com.google.pubsub.v1.BigQueryConfigOrBuilder getBigqueryConfigOrBuilder() } private com.google.pubsub.v1.CloudStorageConfig cloudStorageConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.CloudStorageConfig, com.google.pubsub.v1.CloudStorageConfig.Builder, com.google.pubsub.v1.CloudStorageConfigOrBuilder> cloudStorageConfigBuilder_; + /** * * @@ -3803,6 +4311,7 @@ public com.google.pubsub.v1.BigQueryConfigOrBuilder getBigqueryConfigOrBuilder() public boolean hasCloudStorageConfig() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -3826,6 +4335,7 @@ public com.google.pubsub.v1.CloudStorageConfig getCloudStorageConfig() { return cloudStorageConfigBuilder_.getMessage(); } } + /** * * @@ -3851,6 +4361,7 @@ public Builder setCloudStorageConfig(com.google.pubsub.v1.CloudStorageConfig val onChanged(); return this; } + /** * * @@ -3874,6 +4385,7 @@ public Builder setCloudStorageConfig( onChanged(); return this; } + /** * * @@ -3905,6 +4417,7 @@ public Builder mergeCloudStorageConfig(com.google.pubsub.v1.CloudStorageConfig v } return this; } + /** * * @@ -3927,6 +4440,7 @@ public Builder clearCloudStorageConfig() { onChanged(); return this; } + /** * * @@ -3942,8 +4456,9 @@ public Builder clearCloudStorageConfig() { public com.google.pubsub.v1.CloudStorageConfig.Builder getCloudStorageConfigBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getCloudStorageConfigFieldBuilder().getBuilder(); + return internalGetCloudStorageConfigFieldBuilder().getBuilder(); } + /** * * @@ -3965,6 +4480,7 @@ public com.google.pubsub.v1.CloudStorageConfigOrBuilder getCloudStorageConfigOrB : cloudStorageConfig_; } } + /** * * @@ -3977,14 +4493,14 @@ public com.google.pubsub.v1.CloudStorageConfigOrBuilder getCloudStorageConfigOrB * .google.pubsub.v1.CloudStorageConfig cloud_storage_config = 22 [(.google.api.field_behavior) = OPTIONAL]; *
    */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.CloudStorageConfig, com.google.pubsub.v1.CloudStorageConfig.Builder, com.google.pubsub.v1.CloudStorageConfigOrBuilder> - getCloudStorageConfigFieldBuilder() { + internalGetCloudStorageConfigFieldBuilder() { if (cloudStorageConfigBuilder_ == null) { cloudStorageConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.CloudStorageConfig, com.google.pubsub.v1.CloudStorageConfig.Builder, com.google.pubsub.v1.CloudStorageConfigOrBuilder>( @@ -3994,143 +4510,369 @@ public com.google.pubsub.v1.CloudStorageConfigOrBuilder getCloudStorageConfigOrB return cloudStorageConfigBuilder_; } - private int ackDeadlineSeconds_; + private com.google.pubsub.v1.BigtableConfig bigtableConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.BigtableConfig, + com.google.pubsub.v1.BigtableConfig.Builder, + com.google.pubsub.v1.BigtableConfigOrBuilder> + bigtableConfigBuilder_; + /** * * *
    -     * Optional. The approximate amount of time (on a best-effort basis) Pub/Sub
    -     * waits for the subscriber to acknowledge receipt before resending the
    -     * message. In the interval after the message is delivered and before it is
    -     * acknowledged, it is considered to be _outstanding_. During that time
    -     * period, the message will not be redelivered (on a best-effort basis).
    -     *
    -     * For pull subscriptions, this value is used as the initial value for the ack
    -     * deadline. To override this value for a given message, call
    -     * `ModifyAckDeadline` with the corresponding `ack_id` if using
    -     * non-streaming pull or send the `ack_id` in a
    -     * `StreamingModifyAckDeadlineRequest` if using streaming pull.
    -     * The minimum custom deadline you can specify is 10 seconds.
    -     * The maximum custom deadline you can specify is 600 seconds (10 minutes).
    -     * If this parameter is 0, a default value of 10 seconds is used.
    -     *
    -     * For push delivery, this value is also used to set the request timeout for
    -     * the call to the push endpoint.
    -     *
    -     * If the subscriber never acknowledges the message, the Pub/Sub
    -     * system will eventually redeliver the message.
    +     * Optional. If delivery to Bigtable is used with this subscription, this
    +     * field is used to configure it.
          * 
    * - * int32 ack_deadline_seconds = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The ackDeadlineSeconds. + * @return Whether the bigtableConfig field is set. */ - @java.lang.Override - public int getAckDeadlineSeconds() { - return ackDeadlineSeconds_; + public boolean hasBigtableConfig() { + return ((bitField0_ & 0x00000020) != 0); } + /** * * *
    -     * Optional. The approximate amount of time (on a best-effort basis) Pub/Sub
    -     * waits for the subscriber to acknowledge receipt before resending the
    -     * message. In the interval after the message is delivered and before it is
    -     * acknowledged, it is considered to be _outstanding_. During that time
    -     * period, the message will not be redelivered (on a best-effort basis).
    -     *
    -     * For pull subscriptions, this value is used as the initial value for the ack
    -     * deadline. To override this value for a given message, call
    -     * `ModifyAckDeadline` with the corresponding `ack_id` if using
    -     * non-streaming pull or send the `ack_id` in a
    -     * `StreamingModifyAckDeadlineRequest` if using streaming pull.
    -     * The minimum custom deadline you can specify is 10 seconds.
    -     * The maximum custom deadline you can specify is 600 seconds (10 minutes).
    -     * If this parameter is 0, a default value of 10 seconds is used.
    -     *
    -     * For push delivery, this value is also used to set the request timeout for
    -     * the call to the push endpoint.
    -     *
    -     * If the subscriber never acknowledges the message, the Pub/Sub
    -     * system will eventually redeliver the message.
    +     * Optional. If delivery to Bigtable is used with this subscription, this
    +     * field is used to configure it.
          * 
    * - * int32 ack_deadline_seconds = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The ackDeadlineSeconds to set. - * @return This builder for chaining. + * @return The bigtableConfig. */ - public Builder setAckDeadlineSeconds(int value) { - - ackDeadlineSeconds_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; + public com.google.pubsub.v1.BigtableConfig getBigtableConfig() { + if (bigtableConfigBuilder_ == null) { + return bigtableConfig_ == null + ? com.google.pubsub.v1.BigtableConfig.getDefaultInstance() + : bigtableConfig_; + } else { + return bigtableConfigBuilder_.getMessage(); + } } + /** * * *
    -     * Optional. The approximate amount of time (on a best-effort basis) Pub/Sub
    -     * waits for the subscriber to acknowledge receipt before resending the
    -     * message. In the interval after the message is delivered and before it is
    -     * acknowledged, it is considered to be _outstanding_. During that time
    -     * period, the message will not be redelivered (on a best-effort basis).
    -     *
    -     * For pull subscriptions, this value is used as the initial value for the ack
    -     * deadline. To override this value for a given message, call
    -     * `ModifyAckDeadline` with the corresponding `ack_id` if using
    -     * non-streaming pull or send the `ack_id` in a
    -     * `StreamingModifyAckDeadlineRequest` if using streaming pull.
    -     * The minimum custom deadline you can specify is 10 seconds.
    -     * The maximum custom deadline you can specify is 600 seconds (10 minutes).
    -     * If this parameter is 0, a default value of 10 seconds is used.
    -     *
    -     * For push delivery, this value is also used to set the request timeout for
    -     * the call to the push endpoint.
    -     *
    -     * If the subscriber never acknowledges the message, the Pub/Sub
    -     * system will eventually redeliver the message.
    +     * Optional. If delivery to Bigtable is used with this subscription, this
    +     * field is used to configure it.
          * 
    * - * int32 ack_deadline_seconds = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearAckDeadlineSeconds() { - bitField0_ = (bitField0_ & ~0x00000020); - ackDeadlineSeconds_ = 0; + public Builder setBigtableConfig(com.google.pubsub.v1.BigtableConfig value) { + if (bigtableConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bigtableConfig_ = value; + } else { + bigtableConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; onChanged(); return this; } - private boolean retainAckedMessages_; /** * * *
    -     * Optional. Indicates whether to retain acknowledged messages. If true, then
    -     * messages are not expunged from the subscription's backlog, even if they are
    -     * acknowledged, until they fall out of the `message_retention_duration`
    -     * window. This must be true if you would like to [`Seek` to a timestamp]
    -     * (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
    -     * the past to replay previously-acknowledged messages.
    +     * Optional. If delivery to Bigtable is used with this subscription, this
    +     * field is used to configure it.
          * 
    * - * bool retain_acked_messages = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The retainAckedMessages. + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public boolean getRetainAckedMessages() { - return retainAckedMessages_; + public Builder setBigtableConfig(com.google.pubsub.v1.BigtableConfig.Builder builderForValue) { + if (bigtableConfigBuilder_ == null) { + bigtableConfig_ = builderForValue.build(); + } else { + bigtableConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; } + /** * * *
    -     * Optional. Indicates whether to retain acknowledged messages. If true, then
    -     * messages are not expunged from the subscription's backlog, even if they are
    +     * Optional. If delivery to Bigtable is used with this subscription, this
    +     * field is used to configure it.
    +     * 
    + * + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeBigtableConfig(com.google.pubsub.v1.BigtableConfig value) { + if (bigtableConfigBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && bigtableConfig_ != null + && bigtableConfig_ != com.google.pubsub.v1.BigtableConfig.getDefaultInstance()) { + getBigtableConfigBuilder().mergeFrom(value); + } else { + bigtableConfig_ = value; + } + } else { + bigtableConfigBuilder_.mergeFrom(value); + } + if (bigtableConfig_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Optional. If delivery to Bigtable is used with this subscription, this
    +     * field is used to configure it.
    +     * 
    + * + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBigtableConfig() { + bitField0_ = (bitField0_ & ~0x00000020); + bigtableConfig_ = null; + if (bigtableConfigBuilder_ != null) { + bigtableConfigBuilder_.dispose(); + bigtableConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. If delivery to Bigtable is used with this subscription, this
    +     * field is used to configure it.
    +     * 
    + * + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.BigtableConfig.Builder getBigtableConfigBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetBigtableConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. If delivery to Bigtable is used with this subscription, this
    +     * field is used to configure it.
    +     * 
    + * + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.BigtableConfigOrBuilder getBigtableConfigOrBuilder() { + if (bigtableConfigBuilder_ != null) { + return bigtableConfigBuilder_.getMessageOrBuilder(); + } else { + return bigtableConfig_ == null + ? com.google.pubsub.v1.BigtableConfig.getDefaultInstance() + : bigtableConfig_; + } + } + + /** + * + * + *
    +     * Optional. If delivery to Bigtable is used with this subscription, this
    +     * field is used to configure it.
    +     * 
    + * + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.BigtableConfig, + com.google.pubsub.v1.BigtableConfig.Builder, + com.google.pubsub.v1.BigtableConfigOrBuilder> + internalGetBigtableConfigFieldBuilder() { + if (bigtableConfigBuilder_ == null) { + bigtableConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.pubsub.v1.BigtableConfig, + com.google.pubsub.v1.BigtableConfig.Builder, + com.google.pubsub.v1.BigtableConfigOrBuilder>( + getBigtableConfig(), getParentForChildren(), isClean()); + bigtableConfig_ = null; + } + return bigtableConfigBuilder_; + } + + private int ackDeadlineSeconds_; + + /** + * + * + *
    +     * Optional. The approximate amount of time (on a best-effort basis) Pub/Sub
    +     * waits for the subscriber to acknowledge receipt before resending the
    +     * message. In the interval after the message is delivered and before it is
    +     * acknowledged, it is considered to be _outstanding_. During that time
    +     * period, the message will not be redelivered (on a best-effort basis).
    +     *
    +     * For pull subscriptions, this value is used as the initial value for the ack
    +     * deadline. To override this value for a given message, call
    +     * `ModifyAckDeadline` with the corresponding `ack_id` if using
    +     * non-streaming pull or send the `ack_id` in a
    +     * `StreamingModifyAckDeadlineRequest` if using streaming pull.
    +     * The minimum custom deadline you can specify is 10 seconds.
    +     * The maximum custom deadline you can specify is 600 seconds (10 minutes).
    +     * If this parameter is 0, a default value of 10 seconds is used.
    +     *
    +     * For push delivery, this value is also used to set the request timeout for
    +     * the call to the push endpoint.
    +     *
    +     * If the subscriber never acknowledges the message, the Pub/Sub
    +     * system will eventually redeliver the message.
    +     * 
    + * + * int32 ack_deadline_seconds = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ackDeadlineSeconds. + */ + @java.lang.Override + public int getAckDeadlineSeconds() { + return ackDeadlineSeconds_; + } + + /** + * + * + *
    +     * Optional. The approximate amount of time (on a best-effort basis) Pub/Sub
    +     * waits for the subscriber to acknowledge receipt before resending the
    +     * message. In the interval after the message is delivered and before it is
    +     * acknowledged, it is considered to be _outstanding_. During that time
    +     * period, the message will not be redelivered (on a best-effort basis).
    +     *
    +     * For pull subscriptions, this value is used as the initial value for the ack
    +     * deadline. To override this value for a given message, call
    +     * `ModifyAckDeadline` with the corresponding `ack_id` if using
    +     * non-streaming pull or send the `ack_id` in a
    +     * `StreamingModifyAckDeadlineRequest` if using streaming pull.
    +     * The minimum custom deadline you can specify is 10 seconds.
    +     * The maximum custom deadline you can specify is 600 seconds (10 minutes).
    +     * If this parameter is 0, a default value of 10 seconds is used.
    +     *
    +     * For push delivery, this value is also used to set the request timeout for
    +     * the call to the push endpoint.
    +     *
    +     * If the subscriber never acknowledges the message, the Pub/Sub
    +     * system will eventually redeliver the message.
    +     * 
    + * + * int32 ack_deadline_seconds = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ackDeadlineSeconds to set. + * @return This builder for chaining. + */ + public Builder setAckDeadlineSeconds(int value) { + + ackDeadlineSeconds_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The approximate amount of time (on a best-effort basis) Pub/Sub
    +     * waits for the subscriber to acknowledge receipt before resending the
    +     * message. In the interval after the message is delivered and before it is
    +     * acknowledged, it is considered to be _outstanding_. During that time
    +     * period, the message will not be redelivered (on a best-effort basis).
    +     *
    +     * For pull subscriptions, this value is used as the initial value for the ack
    +     * deadline. To override this value for a given message, call
    +     * `ModifyAckDeadline` with the corresponding `ack_id` if using
    +     * non-streaming pull or send the `ack_id` in a
    +     * `StreamingModifyAckDeadlineRequest` if using streaming pull.
    +     * The minimum custom deadline you can specify is 10 seconds.
    +     * The maximum custom deadline you can specify is 600 seconds (10 minutes).
    +     * If this parameter is 0, a default value of 10 seconds is used.
    +     *
    +     * For push delivery, this value is also used to set the request timeout for
    +     * the call to the push endpoint.
    +     *
    +     * If the subscriber never acknowledges the message, the Pub/Sub
    +     * system will eventually redeliver the message.
    +     * 
    + * + * int32 ack_deadline_seconds = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAckDeadlineSeconds() { + bitField0_ = (bitField0_ & ~0x00000040); + ackDeadlineSeconds_ = 0; + onChanged(); + return this; + } + + private boolean retainAckedMessages_; + + /** + * + * + *
    +     * Optional. Indicates whether to retain acknowledged messages. If true, then
    +     * messages are not expunged from the subscription's backlog, even if they are
    +     * acknowledged, until they fall out of the `message_retention_duration`
    +     * window. This must be true if you would like to [`Seek` to a timestamp]
    +     * (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
    +     * the past to replay previously-acknowledged messages.
    +     * 
    + * + * bool retain_acked_messages = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The retainAckedMessages. + */ + @java.lang.Override + public boolean getRetainAckedMessages() { + return retainAckedMessages_; + } + + /** + * + * + *
    +     * Optional. Indicates whether to retain acknowledged messages. If true, then
    +     * messages are not expunged from the subscription's backlog, even if they are
          * acknowledged, until they fall out of the `message_retention_duration`
          * window. This must be true if you would like to [`Seek` to a timestamp]
          * (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
    @@ -4145,10 +4887,11 @@ public boolean getRetainAckedMessages() {
         public Builder setRetainAckedMessages(boolean value) {
     
           retainAckedMessages_ = value;
    -      bitField0_ |= 0x00000040;
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -4166,18 +4909,19 @@ public Builder setRetainAckedMessages(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearRetainAckedMessages() {
    -      bitField0_ = (bitField0_ & ~0x00000040);
    +      bitField0_ = (bitField0_ & ~0x00000080);
           retainAckedMessages_ = false;
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Duration messageRetentionDuration_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
                 com.google.protobuf.Duration,
                 com.google.protobuf.Duration.Builder,
                 com.google.protobuf.DurationOrBuilder>
             messageRetentionDurationBuilder_;
    +
         /**
          *
          *
    @@ -4196,8 +4940,9 @@ public Builder clearRetainAckedMessages() {
          * @return Whether the messageRetentionDuration field is set.
          */
         public boolean hasMessageRetentionDuration() {
    -      return ((bitField0_ & 0x00000080) != 0);
    +      return ((bitField0_ & 0x00000100) != 0);
         }
    +
         /**
          *
          *
    @@ -4224,6 +4969,7 @@ public com.google.protobuf.Duration getMessageRetentionDuration() {
             return messageRetentionDurationBuilder_.getMessage();
           }
         }
    +
         /**
          *
          *
    @@ -4248,10 +4994,11 @@ public Builder setMessageRetentionDuration(com.google.protobuf.Duration value) {
           } else {
             messageRetentionDurationBuilder_.setMessage(value);
           }
    -      bitField0_ |= 0x00000080;
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -4274,10 +5021,11 @@ public Builder setMessageRetentionDuration(
           } else {
             messageRetentionDurationBuilder_.setMessage(builderForValue.build());
           }
    -      bitField0_ |= 0x00000080;
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -4295,7 +5043,7 @@ public Builder setMessageRetentionDuration(
          */
         public Builder mergeMessageRetentionDuration(com.google.protobuf.Duration value) {
           if (messageRetentionDurationBuilder_ == null) {
    -        if (((bitField0_ & 0x00000080) != 0)
    +        if (((bitField0_ & 0x00000100) != 0)
                 && messageRetentionDuration_ != null
                 && messageRetentionDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
               getMessageRetentionDurationBuilder().mergeFrom(value);
    @@ -4306,11 +5054,12 @@ public Builder mergeMessageRetentionDuration(com.google.protobuf.Duration value)
             messageRetentionDurationBuilder_.mergeFrom(value);
           }
           if (messageRetentionDuration_ != null) {
    -        bitField0_ |= 0x00000080;
    +        bitField0_ |= 0x00000100;
             onChanged();
           }
           return this;
         }
    +
         /**
          *
          *
    @@ -4327,7 +5076,7 @@ public Builder mergeMessageRetentionDuration(com.google.protobuf.Duration value)
          * 
          */
         public Builder clearMessageRetentionDuration() {
    -      bitField0_ = (bitField0_ & ~0x00000080);
    +      bitField0_ = (bitField0_ & ~0x00000100);
           messageRetentionDuration_ = null;
           if (messageRetentionDurationBuilder_ != null) {
             messageRetentionDurationBuilder_.dispose();
    @@ -4336,6 +5085,7 @@ public Builder clearMessageRetentionDuration() {
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -4352,10 +5102,11 @@ public Builder clearMessageRetentionDuration() {
          * 
          */
         public com.google.protobuf.Duration.Builder getMessageRetentionDurationBuilder() {
    -      bitField0_ |= 0x00000080;
    +      bitField0_ |= 0x00000100;
           onChanged();
    -      return getMessageRetentionDurationFieldBuilder().getBuilder();
    +      return internalGetMessageRetentionDurationFieldBuilder().getBuilder();
         }
    +
         /**
          *
          *
    @@ -4380,6 +5131,7 @@ public com.google.protobuf.DurationOrBuilder getMessageRetentionDurationOrBuilde
                 : messageRetentionDuration_;
           }
         }
    +
         /**
          *
          *
    @@ -4395,14 +5147,14 @@ public com.google.protobuf.DurationOrBuilder getMessageRetentionDurationOrBuilde
          * .google.protobuf.Duration message_retention_duration = 8 [(.google.api.field_behavior) = OPTIONAL];
          * 
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
                 com.google.protobuf.Duration,
                 com.google.protobuf.Duration.Builder,
                 com.google.protobuf.DurationOrBuilder>
    -        getMessageRetentionDurationFieldBuilder() {
    +        internalGetMessageRetentionDurationFieldBuilder() {
           if (messageRetentionDurationBuilder_ == null) {
             messageRetentionDurationBuilder_ =
    -            new com.google.protobuf.SingleFieldBuilderV3<
    +            new com.google.protobuf.SingleFieldBuilder<
                     com.google.protobuf.Duration,
                     com.google.protobuf.Duration.Builder,
                     com.google.protobuf.DurationOrBuilder>(
    @@ -4429,7 +5181,7 @@ private com.google.protobuf.MapField interna
           if (!labels_.isMutable()) {
             labels_ = labels_.copy();
           }
    -      bitField0_ |= 0x00000100;
    +      bitField0_ |= 0x00000200;
           onChanged();
           return labels_;
         }
    @@ -4437,6 +5189,7 @@ private com.google.protobuf.MapField interna
         public int getLabelsCount() {
           return internalGetLabels().getMap().size();
         }
    +
         /**
          *
          *
    @@ -4454,12 +5207,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();
         }
    +
         /**
          *
          *
    @@ -4474,6 +5229,7 @@ public java.util.Map getLabels() {
         public java.util.Map getLabelsMap() {
           return internalGetLabels().getMap();
         }
    +
         /**
          *
          *
    @@ -4495,6 +5251,7 @@ public java.util.Map getLabelsMap() {
           java.util.Map map = internalGetLabels().getMap();
           return map.containsKey(key) ? map.get(key) : defaultValue;
         }
    +
         /**
          *
          *
    @@ -4518,10 +5275,11 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) {
         }
     
         public Builder clearLabels() {
    -      bitField0_ = (bitField0_ & ~0x00000100);
    +      bitField0_ = (bitField0_ & ~0x00000200);
           internalGetMutableLabels().getMutableMap().clear();
           return this;
         }
    +
         /**
          *
          *
    @@ -4539,12 +5297,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_ |= 0x00000100;
    +      bitField0_ |= 0x00000200;
           return internalGetMutableLabels().getMutableMap();
         }
    +
         /**
          *
          *
    @@ -4563,9 +5323,10 @@ public Builder putLabels(java.lang.String key, java.lang.String value) {
             throw new NullPointerException("map value");
           }
           internalGetMutableLabels().getMutableMap().put(key, value);
    -      bitField0_ |= 0x00000100;
    +      bitField0_ |= 0x00000200;
           return this;
         }
    +
         /**
          *
          *
    @@ -4578,11 +5339,12 @@ public Builder putLabels(java.lang.String key, java.lang.String value) {
          */
         public Builder putAllLabels(java.util.Map values) {
           internalGetMutableLabels().getMutableMap().putAll(values);
    -      bitField0_ |= 0x00000100;
    +      bitField0_ |= 0x00000200;
           return this;
         }
     
         private boolean enableMessageOrdering_;
    +
         /**
          *
          *
    @@ -4601,6 +5363,7 @@ public Builder putAllLabels(java.util.Map va
         public boolean getEnableMessageOrdering() {
           return enableMessageOrdering_;
         }
    +
         /**
          *
          *
    @@ -4619,10 +5382,11 @@ public boolean getEnableMessageOrdering() {
         public Builder setEnableMessageOrdering(boolean value) {
     
           enableMessageOrdering_ = value;
    -      bitField0_ |= 0x00000200;
    +      bitField0_ |= 0x00000400;
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -4638,18 +5402,19 @@ public Builder setEnableMessageOrdering(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearEnableMessageOrdering() {
    -      bitField0_ = (bitField0_ & ~0x00000200);
    +      bitField0_ = (bitField0_ & ~0x00000400);
           enableMessageOrdering_ = false;
           onChanged();
           return this;
         }
     
         private com.google.pubsub.v1.ExpirationPolicy expirationPolicy_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
                 com.google.pubsub.v1.ExpirationPolicy,
                 com.google.pubsub.v1.ExpirationPolicy.Builder,
                 com.google.pubsub.v1.ExpirationPolicyOrBuilder>
             expirationPolicyBuilder_;
    +
         /**
          *
          *
    @@ -4670,8 +5435,9 @@ public Builder clearEnableMessageOrdering() {
          * @return Whether the expirationPolicy field is set.
          */
         public boolean hasExpirationPolicy() {
    -      return ((bitField0_ & 0x00000400) != 0);
    +      return ((bitField0_ & 0x00000800) != 0);
         }
    +
         /**
          *
          *
    @@ -4700,6 +5466,7 @@ public com.google.pubsub.v1.ExpirationPolicy getExpirationPolicy() {
             return expirationPolicyBuilder_.getMessage();
           }
         }
    +
         /**
          *
          *
    @@ -4726,10 +5493,11 @@ public Builder setExpirationPolicy(com.google.pubsub.v1.ExpirationPolicy value)
           } else {
             expirationPolicyBuilder_.setMessage(value);
           }
    -      bitField0_ |= 0x00000400;
    +      bitField0_ |= 0x00000800;
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -4754,10 +5522,11 @@ public Builder setExpirationPolicy(
           } else {
             expirationPolicyBuilder_.setMessage(builderForValue.build());
           }
    -      bitField0_ |= 0x00000400;
    +      bitField0_ |= 0x00000800;
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -4777,7 +5546,7 @@ public Builder setExpirationPolicy(
          */
         public Builder mergeExpirationPolicy(com.google.pubsub.v1.ExpirationPolicy value) {
           if (expirationPolicyBuilder_ == null) {
    -        if (((bitField0_ & 0x00000400) != 0)
    +        if (((bitField0_ & 0x00000800) != 0)
                 && expirationPolicy_ != null
                 && expirationPolicy_ != com.google.pubsub.v1.ExpirationPolicy.getDefaultInstance()) {
               getExpirationPolicyBuilder().mergeFrom(value);
    @@ -4788,11 +5557,12 @@ public Builder mergeExpirationPolicy(com.google.pubsub.v1.ExpirationPolicy value
             expirationPolicyBuilder_.mergeFrom(value);
           }
           if (expirationPolicy_ != null) {
    -        bitField0_ |= 0x00000400;
    +        bitField0_ |= 0x00000800;
             onChanged();
           }
           return this;
         }
    +
         /**
          *
          *
    @@ -4811,7 +5581,7 @@ public Builder mergeExpirationPolicy(com.google.pubsub.v1.ExpirationPolicy value
          * 
          */
         public Builder clearExpirationPolicy() {
    -      bitField0_ = (bitField0_ & ~0x00000400);
    +      bitField0_ = (bitField0_ & ~0x00000800);
           expirationPolicy_ = null;
           if (expirationPolicyBuilder_ != null) {
             expirationPolicyBuilder_.dispose();
    @@ -4820,6 +5590,7 @@ public Builder clearExpirationPolicy() {
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -4838,10 +5609,11 @@ public Builder clearExpirationPolicy() {
          * 
          */
         public com.google.pubsub.v1.ExpirationPolicy.Builder getExpirationPolicyBuilder() {
    -      bitField0_ |= 0x00000400;
    +      bitField0_ |= 0x00000800;
           onChanged();
    -      return getExpirationPolicyFieldBuilder().getBuilder();
    +      return internalGetExpirationPolicyFieldBuilder().getBuilder();
         }
    +
         /**
          *
          *
    @@ -4868,6 +5640,7 @@ public com.google.pubsub.v1.ExpirationPolicyOrBuilder getExpirationPolicyOrBuild
                 : expirationPolicy_;
           }
         }
    +
         /**
          *
          *
    @@ -4885,14 +5658,14 @@ public com.google.pubsub.v1.ExpirationPolicyOrBuilder getExpirationPolicyOrBuild
          * .google.pubsub.v1.ExpirationPolicy expiration_policy = 11 [(.google.api.field_behavior) = OPTIONAL];
          * 
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
                 com.google.pubsub.v1.ExpirationPolicy,
                 com.google.pubsub.v1.ExpirationPolicy.Builder,
                 com.google.pubsub.v1.ExpirationPolicyOrBuilder>
    -        getExpirationPolicyFieldBuilder() {
    +        internalGetExpirationPolicyFieldBuilder() {
           if (expirationPolicyBuilder_ == null) {
             expirationPolicyBuilder_ =
    -            new com.google.protobuf.SingleFieldBuilderV3<
    +            new com.google.protobuf.SingleFieldBuilder<
                     com.google.pubsub.v1.ExpirationPolicy,
                     com.google.pubsub.v1.ExpirationPolicy.Builder,
                     com.google.pubsub.v1.ExpirationPolicyOrBuilder>(
    @@ -4903,6 +5676,7 @@ public com.google.pubsub.v1.ExpirationPolicyOrBuilder getExpirationPolicyOrBuild
         }
     
         private java.lang.Object filter_ = "";
    +
         /**
          *
          *
    @@ -4929,6 +5703,7 @@ public java.lang.String getFilter() {
             return (java.lang.String) ref;
           }
         }
    +
         /**
          *
          *
    @@ -4955,6 +5730,7 @@ public com.google.protobuf.ByteString getFilterBytes() {
             return (com.google.protobuf.ByteString) ref;
           }
         }
    +
         /**
          *
          *
    @@ -4976,10 +5752,11 @@ public Builder setFilter(java.lang.String value) {
             throw new NullPointerException();
           }
           filter_ = value;
    -      bitField0_ |= 0x00000800;
    +      bitField0_ |= 0x00001000;
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -4997,10 +5774,11 @@ public Builder setFilter(java.lang.String value) {
          */
         public Builder clearFilter() {
           filter_ = getDefaultInstance().getFilter();
    -      bitField0_ = (bitField0_ & ~0x00000800);
    +      bitField0_ = (bitField0_ & ~0x00001000);
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -5023,17 +5801,18 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) {
           }
           checkByteStringIsUtf8(value);
           filter_ = value;
    -      bitField0_ |= 0x00000800;
    +      bitField0_ |= 0x00001000;
           onChanged();
           return this;
         }
     
         private com.google.pubsub.v1.DeadLetterPolicy deadLetterPolicy_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
                 com.google.pubsub.v1.DeadLetterPolicy,
                 com.google.pubsub.v1.DeadLetterPolicy.Builder,
                 com.google.pubsub.v1.DeadLetterPolicyOrBuilder>
             deadLetterPolicyBuilder_;
    +
         /**
          *
          *
    @@ -5055,8 +5834,9 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) {
          * @return Whether the deadLetterPolicy field is set.
          */
         public boolean hasDeadLetterPolicy() {
    -      return ((bitField0_ & 0x00001000) != 0);
    +      return ((bitField0_ & 0x00002000) != 0);
         }
    +
         /**
          *
          *
    @@ -5086,6 +5866,7 @@ public com.google.pubsub.v1.DeadLetterPolicy getDeadLetterPolicy() {
             return deadLetterPolicyBuilder_.getMessage();
           }
         }
    +
         /**
          *
          *
    @@ -5113,10 +5894,11 @@ public Builder setDeadLetterPolicy(com.google.pubsub.v1.DeadLetterPolicy value)
           } else {
             deadLetterPolicyBuilder_.setMessage(value);
           }
    -      bitField0_ |= 0x00001000;
    +      bitField0_ |= 0x00002000;
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -5142,10 +5924,11 @@ public Builder setDeadLetterPolicy(
           } else {
             deadLetterPolicyBuilder_.setMessage(builderForValue.build());
           }
    -      bitField0_ |= 0x00001000;
    +      bitField0_ |= 0x00002000;
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -5166,7 +5949,7 @@ public Builder setDeadLetterPolicy(
          */
         public Builder mergeDeadLetterPolicy(com.google.pubsub.v1.DeadLetterPolicy value) {
           if (deadLetterPolicyBuilder_ == null) {
    -        if (((bitField0_ & 0x00001000) != 0)
    +        if (((bitField0_ & 0x00002000) != 0)
                 && deadLetterPolicy_ != null
                 && deadLetterPolicy_ != com.google.pubsub.v1.DeadLetterPolicy.getDefaultInstance()) {
               getDeadLetterPolicyBuilder().mergeFrom(value);
    @@ -5177,11 +5960,12 @@ public Builder mergeDeadLetterPolicy(com.google.pubsub.v1.DeadLetterPolicy value
             deadLetterPolicyBuilder_.mergeFrom(value);
           }
           if (deadLetterPolicy_ != null) {
    -        bitField0_ |= 0x00001000;
    +        bitField0_ |= 0x00002000;
             onChanged();
           }
           return this;
         }
    +
         /**
          *
          *
    @@ -5201,7 +5985,7 @@ public Builder mergeDeadLetterPolicy(com.google.pubsub.v1.DeadLetterPolicy value
          * 
          */
         public Builder clearDeadLetterPolicy() {
    -      bitField0_ = (bitField0_ & ~0x00001000);
    +      bitField0_ = (bitField0_ & ~0x00002000);
           deadLetterPolicy_ = null;
           if (deadLetterPolicyBuilder_ != null) {
             deadLetterPolicyBuilder_.dispose();
    @@ -5210,6 +5994,7 @@ public Builder clearDeadLetterPolicy() {
           onChanged();
           return this;
         }
    +
         /**
          *
          *
    @@ -5229,10 +6014,11 @@ public Builder clearDeadLetterPolicy() {
          * 
          */
         public com.google.pubsub.v1.DeadLetterPolicy.Builder getDeadLetterPolicyBuilder() {
    -      bitField0_ |= 0x00001000;
    +      bitField0_ |= 0x00002000;
           onChanged();
    -      return getDeadLetterPolicyFieldBuilder().getBuilder();
    +      return internalGetDeadLetterPolicyFieldBuilder().getBuilder();
         }
    +
         /**
          *
          *
    @@ -5260,6 +6046,7 @@ public com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuild
                 : deadLetterPolicy_;
           }
         }
    +
         /**
          *
          *
    @@ -5278,14 +6065,14 @@ public com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuild
          * .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
          * 
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
                 com.google.pubsub.v1.DeadLetterPolicy,
                 com.google.pubsub.v1.DeadLetterPolicy.Builder,
                 com.google.pubsub.v1.DeadLetterPolicyOrBuilder>
    -        getDeadLetterPolicyFieldBuilder() {
    +        internalGetDeadLetterPolicyFieldBuilder() {
           if (deadLetterPolicyBuilder_ == null) {
             deadLetterPolicyBuilder_ =
    -            new com.google.protobuf.SingleFieldBuilderV3<
    +            new com.google.protobuf.SingleFieldBuilder<
                     com.google.pubsub.v1.DeadLetterPolicy,
                     com.google.pubsub.v1.DeadLetterPolicy.Builder,
                     com.google.pubsub.v1.DeadLetterPolicyOrBuilder>(
    @@ -5296,11 +6083,12 @@ public com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuild
         }
     
         private com.google.pubsub.v1.RetryPolicy retryPolicy_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
                 com.google.pubsub.v1.RetryPolicy,
                 com.google.pubsub.v1.RetryPolicy.Builder,
                 com.google.pubsub.v1.RetryPolicyOrBuilder>
             retryPolicyBuilder_;
    +
         /**
          *
          *
    @@ -5310,8 +6098,8 @@ public com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuild
          *
          * If not set, the default retry policy is applied. This generally implies
          * that messages will be retried as soon as possible for healthy subscribers.
    -     * RetryPolicy will be triggered on NACKs or acknowledgement deadline
    -     * exceeded events for a given message.
    +     * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded
    +     * events for a given message.
          * 
    * * @@ -5321,8 +6109,9 @@ public com.google.pubsub.v1.DeadLetterPolicyOrBuilder getDeadLetterPolicyOrBuild * @return Whether the retryPolicy field is set. */ public boolean hasRetryPolicy() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00004000) != 0); } + /** * * @@ -5332,8 +6121,8 @@ public boolean hasRetryPolicy() { * * If not set, the default retry policy is applied. This generally implies * that messages will be retried as soon as possible for healthy subscribers. - * RetryPolicy will be triggered on NACKs or acknowledgement deadline - * exceeded events for a given message. + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + * events for a given message. *
    * * @@ -5351,6 +6140,7 @@ public com.google.pubsub.v1.RetryPolicy getRetryPolicy() { return retryPolicyBuilder_.getMessage(); } } + /** * * @@ -5360,8 +6150,8 @@ public com.google.pubsub.v1.RetryPolicy getRetryPolicy() { * * If not set, the default retry policy is applied. This generally implies * that messages will be retried as soon as possible for healthy subscribers. - * RetryPolicy will be triggered on NACKs or acknowledgement deadline - * exceeded events for a given message. + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + * events for a given message. *
    * * @@ -5377,10 +6167,11 @@ public Builder setRetryPolicy(com.google.pubsub.v1.RetryPolicy value) { } else { retryPolicyBuilder_.setMessage(value); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } + /** * * @@ -5390,8 +6181,8 @@ public Builder setRetryPolicy(com.google.pubsub.v1.RetryPolicy value) { * * If not set, the default retry policy is applied. This generally implies * that messages will be retried as soon as possible for healthy subscribers. - * RetryPolicy will be triggered on NACKs or acknowledgement deadline - * exceeded events for a given message. + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + * events for a given message. *
    * * @@ -5404,10 +6195,11 @@ public Builder setRetryPolicy(com.google.pubsub.v1.RetryPolicy.Builder builderFo } else { retryPolicyBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } + /** * * @@ -5417,8 +6209,8 @@ public Builder setRetryPolicy(com.google.pubsub.v1.RetryPolicy.Builder builderFo * * If not set, the default retry policy is applied. This generally implies * that messages will be retried as soon as possible for healthy subscribers. - * RetryPolicy will be triggered on NACKs or acknowledgement deadline - * exceeded events for a given message. + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + * events for a given message. *
    * * @@ -5427,7 +6219,7 @@ public Builder setRetryPolicy(com.google.pubsub.v1.RetryPolicy.Builder builderFo */ public Builder mergeRetryPolicy(com.google.pubsub.v1.RetryPolicy value) { if (retryPolicyBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) + if (((bitField0_ & 0x00004000) != 0) && retryPolicy_ != null && retryPolicy_ != com.google.pubsub.v1.RetryPolicy.getDefaultInstance()) { getRetryPolicyBuilder().mergeFrom(value); @@ -5438,11 +6230,12 @@ public Builder mergeRetryPolicy(com.google.pubsub.v1.RetryPolicy value) { retryPolicyBuilder_.mergeFrom(value); } if (retryPolicy_ != null) { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); } return this; } + /** * * @@ -5452,8 +6245,8 @@ public Builder mergeRetryPolicy(com.google.pubsub.v1.RetryPolicy value) { * * If not set, the default retry policy is applied. This generally implies * that messages will be retried as soon as possible for healthy subscribers. - * RetryPolicy will be triggered on NACKs or acknowledgement deadline - * exceeded events for a given message. + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + * events for a given message. *
    * * @@ -5461,7 +6254,7 @@ public Builder mergeRetryPolicy(com.google.pubsub.v1.RetryPolicy value) { * */ public Builder clearRetryPolicy() { - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00004000); retryPolicy_ = null; if (retryPolicyBuilder_ != null) { retryPolicyBuilder_.dispose(); @@ -5470,6 +6263,7 @@ public Builder clearRetryPolicy() { onChanged(); return this; } + /** * * @@ -5479,8 +6273,8 @@ public Builder clearRetryPolicy() { * * If not set, the default retry policy is applied. This generally implies * that messages will be retried as soon as possible for healthy subscribers. - * RetryPolicy will be triggered on NACKs or acknowledgement deadline - * exceeded events for a given message. + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + * events for a given message. * * * @@ -5488,10 +6282,11 @@ public Builder clearRetryPolicy() { * */ public com.google.pubsub.v1.RetryPolicy.Builder getRetryPolicyBuilder() { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); - return getRetryPolicyFieldBuilder().getBuilder(); + return internalGetRetryPolicyFieldBuilder().getBuilder(); } + /** * * @@ -5501,8 +6296,8 @@ public com.google.pubsub.v1.RetryPolicy.Builder getRetryPolicyBuilder() { * * If not set, the default retry policy is applied. This generally implies * that messages will be retried as soon as possible for healthy subscribers. - * RetryPolicy will be triggered on NACKs or acknowledgement deadline - * exceeded events for a given message. + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + * events for a given message. * * * @@ -5518,6 +6313,7 @@ public com.google.pubsub.v1.RetryPolicyOrBuilder getRetryPolicyOrBuilder() { : retryPolicy_; } } + /** * * @@ -5527,22 +6323,22 @@ public com.google.pubsub.v1.RetryPolicyOrBuilder getRetryPolicyOrBuilder() { * * If not set, the default retry policy is applied. This generally implies * that messages will be retried as soon as possible for healthy subscribers. - * RetryPolicy will be triggered on NACKs or acknowledgement deadline - * exceeded events for a given message. + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + * events for a given message. * * * * .google.pubsub.v1.RetryPolicy retry_policy = 14 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.RetryPolicy, com.google.pubsub.v1.RetryPolicy.Builder, com.google.pubsub.v1.RetryPolicyOrBuilder> - getRetryPolicyFieldBuilder() { + internalGetRetryPolicyFieldBuilder() { if (retryPolicyBuilder_ == null) { retryPolicyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.RetryPolicy, com.google.pubsub.v1.RetryPolicy.Builder, com.google.pubsub.v1.RetryPolicyOrBuilder>( @@ -5553,6 +6349,7 @@ public com.google.pubsub.v1.RetryPolicyOrBuilder getRetryPolicyOrBuilder() { } private boolean detached_; + /** * * @@ -5572,6 +6369,7 @@ public com.google.pubsub.v1.RetryPolicyOrBuilder getRetryPolicyOrBuilder() { public boolean getDetached() { return detached_; } + /** * * @@ -5591,10 +6389,11 @@ public boolean getDetached() { public Builder setDetached(boolean value) { detached_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } + /** * * @@ -5611,13 +6410,14 @@ public Builder setDetached(boolean value) { * @return This builder for chaining. */ public Builder clearDetached() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); detached_ = false; onChanged(); return this; } private boolean enableExactlyOnceDelivery_; + /** * * @@ -5627,7 +6427,7 @@ public Builder clearDetached() { * subscription: * * * The message sent to a subscriber is guaranteed not to be resent - * before the message's acknowledgement deadline expires. + * before the message's acknowledgment deadline expires. * * An acknowledged message will not be resent to a subscriber. * * Note that subscribers may still receive multiple copies of a message @@ -5645,6 +6445,7 @@ public Builder clearDetached() { public boolean getEnableExactlyOnceDelivery() { return enableExactlyOnceDelivery_; } + /** * * @@ -5654,7 +6455,7 @@ public boolean getEnableExactlyOnceDelivery() { * subscription: * * * The message sent to a subscriber is guaranteed not to be resent - * before the message's acknowledgement deadline expires. + * before the message's acknowledgment deadline expires. * * An acknowledged message will not be resent to a subscriber. * * Note that subscribers may still receive multiple copies of a message @@ -5672,10 +6473,11 @@ public boolean getEnableExactlyOnceDelivery() { public Builder setEnableExactlyOnceDelivery(boolean value) { enableExactlyOnceDelivery_ = value; - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } + /** * * @@ -5685,7 +6487,7 @@ public Builder setEnableExactlyOnceDelivery(boolean value) { * subscription: * * * The message sent to a subscriber is guaranteed not to be resent - * before the message's acknowledgement deadline expires. + * before the message's acknowledgment deadline expires. * * An acknowledged message will not be resent to a subscriber. * * Note that subscribers may still receive multiple copies of a message @@ -5700,18 +6502,19 @@ public Builder setEnableExactlyOnceDelivery(boolean value) { * @return This builder for chaining. */ public Builder clearEnableExactlyOnceDelivery() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); enableExactlyOnceDelivery_ = false; onChanged(); return this; } private com.google.protobuf.Duration topicMessageRetentionDuration_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> topicMessageRetentionDurationBuilder_; + /** * * @@ -5731,8 +6534,9 @@ public Builder clearEnableExactlyOnceDelivery() { * @return Whether the topicMessageRetentionDuration field is set. */ public boolean hasTopicMessageRetentionDuration() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00020000) != 0); } + /** * * @@ -5760,6 +6564,7 @@ public com.google.protobuf.Duration getTopicMessageRetentionDuration() { return topicMessageRetentionDurationBuilder_.getMessage(); } } + /** * * @@ -5785,10 +6590,11 @@ public Builder setTopicMessageRetentionDuration(com.google.protobuf.Duration val } else { topicMessageRetentionDurationBuilder_.setMessage(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } + /** * * @@ -5812,10 +6618,11 @@ public Builder setTopicMessageRetentionDuration( } else { topicMessageRetentionDurationBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } + /** * * @@ -5834,7 +6641,7 @@ public Builder setTopicMessageRetentionDuration( */ public Builder mergeTopicMessageRetentionDuration(com.google.protobuf.Duration value) { if (topicMessageRetentionDurationBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) + if (((bitField0_ & 0x00020000) != 0) && topicMessageRetentionDuration_ != null && topicMessageRetentionDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { @@ -5846,11 +6653,12 @@ public Builder mergeTopicMessageRetentionDuration(com.google.protobuf.Duration v topicMessageRetentionDurationBuilder_.mergeFrom(value); } if (topicMessageRetentionDuration_ != null) { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); } return this; } + /** * * @@ -5868,7 +6676,7 @@ public Builder mergeTopicMessageRetentionDuration(com.google.protobuf.Duration v * */ public Builder clearTopicMessageRetentionDuration() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); topicMessageRetentionDuration_ = null; if (topicMessageRetentionDurationBuilder_ != null) { topicMessageRetentionDurationBuilder_.dispose(); @@ -5877,6 +6685,7 @@ public Builder clearTopicMessageRetentionDuration() { onChanged(); return this; } + /** * * @@ -5894,10 +6703,11 @@ public Builder clearTopicMessageRetentionDuration() { * */ public com.google.protobuf.Duration.Builder getTopicMessageRetentionDurationBuilder() { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); - return getTopicMessageRetentionDurationFieldBuilder().getBuilder(); + return internalGetTopicMessageRetentionDurationFieldBuilder().getBuilder(); } + /** * * @@ -5923,6 +6733,7 @@ public com.google.protobuf.DurationOrBuilder getTopicMessageRetentionDurationOrB : topicMessageRetentionDuration_; } } + /** * * @@ -5939,14 +6750,14 @@ public com.google.protobuf.DurationOrBuilder getTopicMessageRetentionDurationOrB * .google.protobuf.Duration topic_message_retention_duration = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getTopicMessageRetentionDurationFieldBuilder() { + internalGetTopicMessageRetentionDurationFieldBuilder() { if (topicMessageRetentionDurationBuilder_ == null) { topicMessageRetentionDurationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -5957,6 +6768,7 @@ public com.google.protobuf.DurationOrBuilder getTopicMessageRetentionDurationOrB } private int state_ = 0; + /** * * @@ -5975,6 +6787,7 @@ public com.google.protobuf.DurationOrBuilder getTopicMessageRetentionDurationOrB public int getStateValue() { return state_; } + /** * * @@ -5992,10 +6805,11 @@ public int getStateValue() { */ public Builder setStateValue(int value) { state_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } + /** * * @@ -6016,6 +6830,7 @@ public com.google.pubsub.v1.Subscription.State getState() { com.google.pubsub.v1.Subscription.State.forNumber(state_); return result == null ? com.google.pubsub.v1.Subscription.State.UNRECOGNIZED : result; } + /** * * @@ -6035,11 +6850,12 @@ public Builder setState(com.google.pubsub.v1.Subscription.State value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; state_ = value.getNumber(); onChanged(); return this; } + /** * * @@ -6055,7 +6871,7 @@ public Builder setState(com.google.pubsub.v1.Subscription.State value) { * @return This builder for chaining. */ public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00040000); state_ = 0; onChanged(); return this; @@ -6063,17 +6879,18 @@ public Builder clearState() { private com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo analyticsHubSubscriptionInfo_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo, com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.Builder, com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfoOrBuilder> analyticsHubSubscriptionInfoBuilder_; + /** * * *
          * Output only. Information about the associated Analytics Hub subscription.
    -     * Only set if the subscritpion is created by Analytics Hub.
    +     * Only set if the subscription is created by Analytics Hub.
          * 
    * * @@ -6083,14 +6900,15 @@ public Builder clearState() { * @return Whether the analyticsHubSubscriptionInfo field is set. */ public boolean hasAnalyticsHubSubscriptionInfo() { - return ((bitField0_ & 0x00040000) != 0); + return ((bitField0_ & 0x00080000) != 0); } + /** * * *
          * Output only. Information about the associated Analytics Hub subscription.
    -     * Only set if the subscritpion is created by Analytics Hub.
    +     * Only set if the subscription is created by Analytics Hub.
          * 
    * * @@ -6109,12 +6927,13 @@ public boolean hasAnalyticsHubSubscriptionInfo() { return analyticsHubSubscriptionInfoBuilder_.getMessage(); } } + /** * * *
          * Output only. Information about the associated Analytics Hub subscription.
    -     * Only set if the subscritpion is created by Analytics Hub.
    +     * Only set if the subscription is created by Analytics Hub.
          * 
    * * @@ -6131,16 +6950,17 @@ public Builder setAnalyticsHubSubscriptionInfo( } else { analyticsHubSubscriptionInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return this; } + /** * * *
          * Output only. Information about the associated Analytics Hub subscription.
    -     * Only set if the subscritpion is created by Analytics Hub.
    +     * Only set if the subscription is created by Analytics Hub.
          * 
    * * @@ -6154,16 +6974,17 @@ public Builder setAnalyticsHubSubscriptionInfo( } else { analyticsHubSubscriptionInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return this; } + /** * * *
          * Output only. Information about the associated Analytics Hub subscription.
    -     * Only set if the subscritpion is created by Analytics Hub.
    +     * Only set if the subscription is created by Analytics Hub.
          * 
    * * @@ -6173,7 +6994,7 @@ public Builder setAnalyticsHubSubscriptionInfo( public Builder mergeAnalyticsHubSubscriptionInfo( com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo value) { if (analyticsHubSubscriptionInfoBuilder_ == null) { - if (((bitField0_ & 0x00040000) != 0) + if (((bitField0_ & 0x00080000) != 0) && analyticsHubSubscriptionInfo_ != null && analyticsHubSubscriptionInfo_ != com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo @@ -6186,17 +7007,18 @@ public Builder mergeAnalyticsHubSubscriptionInfo( analyticsHubSubscriptionInfoBuilder_.mergeFrom(value); } if (analyticsHubSubscriptionInfo_ != null) { - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); } return this; } + /** * * *
          * Output only. Information about the associated Analytics Hub subscription.
    -     * Only set if the subscritpion is created by Analytics Hub.
    +     * Only set if the subscription is created by Analytics Hub.
          * 
    * * @@ -6204,7 +7026,7 @@ public Builder mergeAnalyticsHubSubscriptionInfo( * */ public Builder clearAnalyticsHubSubscriptionInfo() { - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); analyticsHubSubscriptionInfo_ = null; if (analyticsHubSubscriptionInfoBuilder_ != null) { analyticsHubSubscriptionInfoBuilder_.dispose(); @@ -6213,12 +7035,13 @@ public Builder clearAnalyticsHubSubscriptionInfo() { onChanged(); return this; } + /** * * *
          * Output only. Information about the associated Analytics Hub subscription.
    -     * Only set if the subscritpion is created by Analytics Hub.
    +     * Only set if the subscription is created by Analytics Hub.
          * 
    * * @@ -6227,16 +7050,17 @@ public Builder clearAnalyticsHubSubscriptionInfo() { */ public com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.Builder getAnalyticsHubSubscriptionInfoBuilder() { - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); - return getAnalyticsHubSubscriptionInfoFieldBuilder().getBuilder(); + return internalGetAnalyticsHubSubscriptionInfoFieldBuilder().getBuilder(); } + /** * * *
          * Output only. Information about the associated Analytics Hub subscription.
    -     * Only set if the subscritpion is created by Analytics Hub.
    +     * Only set if the subscription is created by Analytics Hub.
          * 
    * * @@ -6253,26 +7077,27 @@ public Builder clearAnalyticsHubSubscriptionInfo() { : analyticsHubSubscriptionInfo_; } } + /** * * *
          * Output only. Information about the associated Analytics Hub subscription.
    -     * Only set if the subscritpion is created by Analytics Hub.
    +     * Only set if the subscription is created by Analytics Hub.
          * 
    * * * .google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo analytics_hub_subscription_info = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo, com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.Builder, com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfoOrBuilder> - getAnalyticsHubSubscriptionInfoFieldBuilder() { + internalGetAnalyticsHubSubscriptionInfoFieldBuilder() { if (analyticsHubSubscriptionInfoBuilder_ == null) { analyticsHubSubscriptionInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo, com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.Builder, com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfoOrBuilder>( @@ -6282,15 +7107,650 @@ public Builder clearAnalyticsHubSubscriptionInfo() { return analyticsHubSubscriptionInfoBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private java.util.List messageTransforms_ = + java.util.Collections.emptyList(); + + private void ensureMessageTransformsIsMutable() { + if (!((bitField0_ & 0x00100000) != 0)) { + messageTransforms_ = + new java.util.ArrayList(messageTransforms_); + bitField0_ |= 0x00100000; + } } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + private com.google.protobuf.RepeatedFieldBuilder< + com.google.pubsub.v1.MessageTransform, + com.google.pubsub.v1.MessageTransform.Builder, + com.google.pubsub.v1.MessageTransformOrBuilder> + messageTransformsBuilder_; + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getMessageTransformsList() { + if (messageTransformsBuilder_ == null) { + return java.util.Collections.unmodifiableList(messageTransforms_); + } else { + return messageTransformsBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getMessageTransformsCount() { + if (messageTransformsBuilder_ == null) { + return messageTransforms_.size(); + } else { + return messageTransformsBuilder_.getCount(); + } + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform getMessageTransforms(int index) { + if (messageTransformsBuilder_ == null) { + return messageTransforms_.get(index); + } else { + return messageTransformsBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransforms(int index, com.google.pubsub.v1.MessageTransform value) { + if (messageTransformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessageTransformsIsMutable(); + messageTransforms_.set(index, value); + onChanged(); + } else { + messageTransformsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransforms( + int index, com.google.pubsub.v1.MessageTransform.Builder builderForValue) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.set(index, builderForValue.build()); + onChanged(); + } else { + messageTransformsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms(com.google.pubsub.v1.MessageTransform value) { + if (messageTransformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessageTransformsIsMutable(); + messageTransforms_.add(value); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms(int index, com.google.pubsub.v1.MessageTransform value) { + if (messageTransformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessageTransformsIsMutable(); + messageTransforms_.add(index, value); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms( + com.google.pubsub.v1.MessageTransform.Builder builderForValue) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.add(builderForValue.build()); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms( + int index, com.google.pubsub.v1.MessageTransform.Builder builderForValue) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.add(index, builderForValue.build()); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllMessageTransforms( + java.lang.Iterable values) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, messageTransforms_); + onChanged(); + } else { + messageTransformsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMessageTransforms() { + if (messageTransformsBuilder_ == null) { + messageTransforms_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00100000); + onChanged(); + } else { + messageTransformsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeMessageTransforms(int index) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.remove(index); + onChanged(); + } else { + messageTransformsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform.Builder getMessageTransformsBuilder(int index) { + return internalGetMessageTransformsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuilder(int index) { + if (messageTransformsBuilder_ == null) { + return messageTransforms_.get(index); + } else { + return messageTransformsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getMessageTransformsOrBuilderList() { + if (messageTransformsBuilder_ != null) { + return messageTransformsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(messageTransforms_); + } + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform.Builder addMessageTransformsBuilder() { + return internalGetMessageTransformsFieldBuilder() + .addBuilder(com.google.pubsub.v1.MessageTransform.getDefaultInstance()); + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform.Builder addMessageTransformsBuilder(int index) { + return internalGetMessageTransformsFieldBuilder() + .addBuilder(index, com.google.pubsub.v1.MessageTransform.getDefaultInstance()); + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages before they are delivered to
    +     * subscribers. Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getMessageTransformsBuilderList() { + return internalGetMessageTransformsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.pubsub.v1.MessageTransform, + com.google.pubsub.v1.MessageTransform.Builder, + com.google.pubsub.v1.MessageTransformOrBuilder> + internalGetMessageTransformsFieldBuilder() { + if (messageTransformsBuilder_ == null) { + messageTransformsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.pubsub.v1.MessageTransform, + com.google.pubsub.v1.MessageTransform.Builder, + com.google.pubsub.v1.MessageTransformOrBuilder>( + messageTransforms_, + ((bitField0_ & 0x00100000) != 0), + getParentForChildren(), + isClean()); + messageTransforms_ = null; + } + return messageTransformsBuilder_; + } + + 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_ |= 0x00200000; + 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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 26 [(.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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 26 [(.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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 26 [(.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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 26 [(.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_ & ~0x00200000); + 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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 26 [(.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_ |= 0x00200000; + return internalGetMutableTags().getMutableMap(); + } + + /** + * + * + *
    +     * Optional. Input only. Immutable. Tag keys/values directly bound to this
    +     * resource. For example:
    +     * "123/environment": "production",
    +     * "123/costCenter": "marketing"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 26 [(.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_ |= 0x00200000; + return this; + } + + /** + * + * + *
    +     * Optional. Input only. Immutable. Tag keys/values directly bound to this
    +     * resource. For example:
    +     * "123/environment": "production",
    +     * "123/costCenter": "marketing"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 26 [(.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_ |= 0x00200000; + return this; } // @@protoc_insertion_point(builder_scope:google.pubsub.v1.Subscription) diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionName.java index a8731d5c9..2c12a10dc 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed 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-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java index 51ea4432a..ebb45ec6a 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface SubscriptionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.Subscription) @@ -28,7 +30,7 @@ public interface SubscriptionOrBuilder * * *
    -   * Required. The name of the subscription. It must have the format
    +   * Required. Identifier. The name of the subscription. It must have the format
        * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
        * start with a letter, and contain only letters (`[A-Za-z]`), numbers
        * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
    @@ -36,16 +38,19 @@ public interface SubscriptionOrBuilder
        * in length, and it must not start with `"goog"`.
        * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The name. */ java.lang.String getName(); + /** * * *
    -   * Required. The name of the subscription. It must have the format
    +   * Required. Identifier. The name of the subscription. It must have the format
        * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
        * start with a letter, and contain only letters (`[A-Za-z]`), numbers
        * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
    @@ -53,7 +58,9 @@ public interface SubscriptionOrBuilder
        * in length, and it must not start with `"goog"`.
        * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The bytes for name. */ @@ -75,6 +82,7 @@ public interface SubscriptionOrBuilder * @return The topic. */ java.lang.String getTopic(); + /** * * @@ -106,6 +114,7 @@ public interface SubscriptionOrBuilder * @return Whether the pushConfig field is set. */ boolean hasPushConfig(); + /** * * @@ -120,6 +129,7 @@ public interface SubscriptionOrBuilder * @return The pushConfig. */ com.google.pubsub.v1.PushConfig getPushConfig(); + /** * * @@ -148,6 +158,7 @@ public interface SubscriptionOrBuilder * @return Whether the bigqueryConfig field is set. */ boolean hasBigqueryConfig(); + /** * * @@ -163,6 +174,7 @@ public interface SubscriptionOrBuilder * @return The bigqueryConfig. */ com.google.pubsub.v1.BigQueryConfig getBigqueryConfig(); + /** * * @@ -192,6 +204,7 @@ public interface SubscriptionOrBuilder * @return Whether the cloudStorageConfig field is set. */ boolean hasCloudStorageConfig(); + /** * * @@ -207,6 +220,7 @@ public interface SubscriptionOrBuilder * @return The cloudStorageConfig. */ com.google.pubsub.v1.CloudStorageConfig getCloudStorageConfig(); + /** * * @@ -221,6 +235,52 @@ public interface SubscriptionOrBuilder */ com.google.pubsub.v1.CloudStorageConfigOrBuilder getCloudStorageConfigOrBuilder(); + /** + * + * + *
    +   * Optional. If delivery to Bigtable is used with this subscription, this
    +   * field is used to configure it.
    +   * 
    + * + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bigtableConfig field is set. + */ + boolean hasBigtableConfig(); + + /** + * + * + *
    +   * Optional. If delivery to Bigtable is used with this subscription, this
    +   * field is used to configure it.
    +   * 
    + * + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bigtableConfig. + */ + com.google.pubsub.v1.BigtableConfig getBigtableConfig(); + + /** + * + * + *
    +   * Optional. If delivery to Bigtable is used with this subscription, this
    +   * field is used to configure it.
    +   * 
    + * + * + * .google.pubsub.v1.BigtableConfig bigtable_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.BigtableConfigOrBuilder getBigtableConfigOrBuilder(); + /** * * @@ -289,6 +349,7 @@ public interface SubscriptionOrBuilder * @return Whether the messageRetentionDuration field is set. */ boolean hasMessageRetentionDuration(); + /** * * @@ -307,6 +368,7 @@ public interface SubscriptionOrBuilder * @return The messageRetentionDuration. */ com.google.protobuf.Duration getMessageRetentionDuration(); + /** * * @@ -335,6 +397,7 @@ public interface SubscriptionOrBuilder * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ int getLabelsCount(); + /** * * @@ -346,9 +409,11 @@ public interface SubscriptionOrBuilder * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Deprecated java.util.Map getLabels(); + /** * * @@ -360,6 +425,7 @@ public interface SubscriptionOrBuilder * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ java.util.Map getLabelsMap(); + /** * * @@ -375,6 +441,7 @@ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); + /** * * @@ -423,6 +490,7 @@ java.lang.String getLabelsOrDefault( * @return Whether the expirationPolicy field is set. */ boolean hasExpirationPolicy(); + /** * * @@ -443,6 +511,7 @@ java.lang.String getLabelsOrDefault( * @return The expirationPolicy. */ com.google.pubsub.v1.ExpirationPolicy getExpirationPolicy(); + /** * * @@ -478,6 +547,7 @@ java.lang.String getLabelsOrDefault( * @return The filter. */ java.lang.String getFilter(); + /** * * @@ -516,6 +586,7 @@ java.lang.String getLabelsOrDefault( * @return Whether the deadLetterPolicy field is set. */ boolean hasDeadLetterPolicy(); + /** * * @@ -537,6 +608,7 @@ java.lang.String getLabelsOrDefault( * @return The deadLetterPolicy. */ com.google.pubsub.v1.DeadLetterPolicy getDeadLetterPolicy(); + /** * * @@ -566,8 +638,8 @@ java.lang.String getLabelsOrDefault( * * If not set, the default retry policy is applied. This generally implies * that messages will be retried as soon as possible for healthy subscribers. - * RetryPolicy will be triggered on NACKs or acknowledgement deadline - * exceeded events for a given message. + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + * events for a given message. * * * @@ -577,6 +649,7 @@ java.lang.String getLabelsOrDefault( * @return Whether the retryPolicy field is set. */ boolean hasRetryPolicy(); + /** * * @@ -586,8 +659,8 @@ java.lang.String getLabelsOrDefault( * * If not set, the default retry policy is applied. This generally implies * that messages will be retried as soon as possible for healthy subscribers. - * RetryPolicy will be triggered on NACKs or acknowledgement deadline - * exceeded events for a given message. + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + * events for a given message. * * * @@ -597,6 +670,7 @@ java.lang.String getLabelsOrDefault( * @return The retryPolicy. */ com.google.pubsub.v1.RetryPolicy getRetryPolicy(); + /** * * @@ -606,8 +680,8 @@ java.lang.String getLabelsOrDefault( * * If not set, the default retry policy is applied. This generally implies * that messages will be retried as soon as possible for healthy subscribers. - * RetryPolicy will be triggered on NACKs or acknowledgement deadline - * exceeded events for a given message. + * RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + * events for a given message. * * * @@ -642,7 +716,7 @@ java.lang.String getLabelsOrDefault( * subscription: * * * The message sent to a subscriber is guaranteed not to be resent - * before the message's acknowledgement deadline expires. + * before the message's acknowledgment deadline expires. * * An acknowledged message will not be resent to a subscriber. * * Note that subscribers may still receive multiple copies of a message @@ -676,6 +750,7 @@ java.lang.String getLabelsOrDefault( * @return Whether the topicMessageRetentionDuration field is set. */ boolean hasTopicMessageRetentionDuration(); + /** * * @@ -695,6 +770,7 @@ java.lang.String getLabelsOrDefault( * @return The topicMessageRetentionDuration. */ com.google.protobuf.Duration getTopicMessageRetentionDuration(); + /** * * @@ -728,6 +804,7 @@ java.lang.String getLabelsOrDefault( * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -749,7 +826,7 @@ java.lang.String getLabelsOrDefault( * *
        * Output only. Information about the associated Analytics Hub subscription.
    -   * Only set if the subscritpion is created by Analytics Hub.
    +   * Only set if the subscription is created by Analytics Hub.
        * 
    * * @@ -759,12 +836,13 @@ java.lang.String getLabelsOrDefault( * @return Whether the analyticsHubSubscriptionInfo field is set. */ boolean hasAnalyticsHubSubscriptionInfo(); + /** * * *
        * Output only. Information about the associated Analytics Hub subscription.
    -   * Only set if the subscritpion is created by Analytics Hub.
    +   * Only set if the subscription is created by Analytics Hub.
        * 
    * * @@ -774,12 +852,13 @@ java.lang.String getLabelsOrDefault( * @return The analyticsHubSubscriptionInfo. */ com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo getAnalyticsHubSubscriptionInfo(); + /** * * *
        * Output only. Information about the associated Analytics Hub subscription.
    -   * Only set if the subscritpion is created by Analytics Hub.
    +   * Only set if the subscription is created by Analytics Hub.
        * 
    * * @@ -788,4 +867,173 @@ java.lang.String getLabelsOrDefault( */ com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfoOrBuilder getAnalyticsHubSubscriptionInfoOrBuilder(); + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages before they are delivered to
    +   * subscribers. Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getMessageTransformsList(); + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages before they are delivered to
    +   * subscribers. Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.MessageTransform getMessageTransforms(int index); + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages before they are delivered to
    +   * subscribers. Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getMessageTransformsCount(); + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages before they are delivered to
    +   * subscribers. Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getMessageTransformsOrBuilderList(); + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages before they are delivered to
    +   * subscribers. Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuilder(int index); + + /** + * + * + *
    +   * Optional. Input only. Immutable. Tag keys/values directly bound to this
    +   * resource. For example:
    +   * "123/environment": "production",
    +   * "123/costCenter": "marketing"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 26 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 26 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 26 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 26 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 26 [(.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-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java index 0f8477e86..52f12129f 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.Topic} */ -public final class Topic extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Topic extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.Topic) TopicOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Topic"); + } + // Use Topic.newBuilder() to construct. - private Topic(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Topic(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,12 +55,7 @@ private Topic() { name_ = ""; kmsKeyName_ = ""; state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Topic(); + messageTransforms_ = java.util.Collections.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -61,13 +69,15 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 2: return internalGetLabels(); + case 14: + return internalGetTags(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_Topic_fieldAccessorTable @@ -120,6 +130,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + /** * * @@ -130,6 +150,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -140,6 +161,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * ACTIVE = 1; */ public static final int ACTIVE_VALUE = 1; + /** * * @@ -211,7 +233,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.pubsub.v1.Topic.getDescriptor().getEnumTypes().get(0); } @@ -241,11 +263,12 @@ private State(int value) { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * *
    -   * Required. The name of the topic. It must have the format
    +   * Required. Identifier. The name of the topic. It must have the format
        * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
        * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
        * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
    @@ -253,7 +276,9 @@ private State(int value) {
        * must not start with `"goog"`.
        * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The name. */ @@ -269,11 +294,12 @@ public java.lang.String getName() { return s; } } + /** * * *
    -   * Required. The name of the topic. It must have the format
    +   * Required. Identifier. The name of the topic. It must have the format
        * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
        * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
        * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
    @@ -281,7 +307,9 @@ public java.lang.String getName() {
        * must not start with `"goog"`.
        * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The bytes for name. */ @@ -324,6 +352,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -341,12 +370,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(); } + /** * * @@ -361,6 +392,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -382,6 +414,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -406,6 +439,7 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { public static final int MESSAGE_STORAGE_POLICY_FIELD_NUMBER = 3; private com.google.pubsub.v1.MessageStoragePolicy messageStoragePolicy_; + /** * * @@ -425,6 +459,7 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { public boolean hasMessageStoragePolicy() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -446,6 +481,7 @@ public com.google.pubsub.v1.MessageStoragePolicy getMessageStoragePolicy() { ? com.google.pubsub.v1.MessageStoragePolicy.getDefaultInstance() : messageStoragePolicy_; } + /** * * @@ -470,6 +506,7 @@ public com.google.pubsub.v1.MessageStoragePolicyOrBuilder getMessageStoragePolic @SuppressWarnings("serial") private volatile java.lang.Object kmsKeyName_ = ""; + /** * * @@ -480,7 +517,9 @@ public com.google.pubsub.v1.MessageStoragePolicyOrBuilder getMessageStoragePolic * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The kmsKeyName. */ @@ -496,6 +535,7 @@ public java.lang.String getKmsKeyName() { return s; } } + /** * * @@ -506,7 +546,9 @@ public java.lang.String getKmsKeyName() { * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for kmsKeyName. */ @@ -525,6 +567,7 @@ public com.google.protobuf.ByteString getKmsKeyNameBytes() { public static final int SCHEMA_SETTINGS_FIELD_NUMBER = 6; private com.google.pubsub.v1.SchemaSettings schemaSettings_; + /** * * @@ -542,6 +585,7 @@ public com.google.protobuf.ByteString getKmsKeyNameBytes() { public boolean hasSchemaSettings() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -561,6 +605,7 @@ public com.google.pubsub.v1.SchemaSettings getSchemaSettings() { ? com.google.pubsub.v1.SchemaSettings.getDefaultInstance() : schemaSettings_; } + /** * * @@ -581,6 +626,7 @@ public com.google.pubsub.v1.SchemaSettingsOrBuilder getSchemaSettingsOrBuilder() public static final int SATISFIES_PZS_FIELD_NUMBER = 7; private boolean satisfiesPzs_ = false; + /** * * @@ -600,6 +646,7 @@ public boolean getSatisfiesPzs() { public static final int MESSAGE_RETENTION_DURATION_FIELD_NUMBER = 8; private com.google.protobuf.Duration messageRetentionDuration_; + /** * * @@ -625,6 +672,7 @@ public boolean getSatisfiesPzs() { public boolean hasMessageRetentionDuration() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -652,6 +700,7 @@ public com.google.protobuf.Duration getMessageRetentionDuration() { ? com.google.protobuf.Duration.getDefaultInstance() : messageRetentionDuration_; } + /** * * @@ -680,6 +729,7 @@ public com.google.protobuf.DurationOrBuilder getMessageRetentionDurationOrBuilde public static final int STATE_FIELD_NUMBER = 9; private int state_ = 0; + /** * * @@ -696,6 +746,7 @@ public com.google.protobuf.DurationOrBuilder getMessageRetentionDurationOrBuilde public int getStateValue() { return state_; } + /** * * @@ -716,6 +767,7 @@ public com.google.pubsub.v1.Topic.State getState() { public static final int INGESTION_DATA_SOURCE_SETTINGS_FIELD_NUMBER = 10; private com.google.pubsub.v1.IngestionDataSourceSettings ingestionDataSourceSettings_; + /** * * @@ -733,6 +785,7 @@ public com.google.pubsub.v1.Topic.State getState() { public boolean hasIngestionDataSourceSettings() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -752,6 +805,7 @@ public com.google.pubsub.v1.IngestionDataSourceSettings getIngestionDataSourceSe ? com.google.pubsub.v1.IngestionDataSourceSettings.getDefaultInstance() : ingestionDataSourceSettings_; } + /** * * @@ -771,6 +825,232 @@ public com.google.pubsub.v1.IngestionDataSourceSettings getIngestionDataSourceSe : ingestionDataSourceSettings_; } + public static final int MESSAGE_TRANSFORMS_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private java.util.List messageTransforms_; + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages published to the topic.
    +   * Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getMessageTransformsList() { + return messageTransforms_; + } + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages published to the topic.
    +   * Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getMessageTransformsOrBuilderList() { + return messageTransforms_; + } + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages published to the topic.
    +   * Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getMessageTransformsCount() { + return messageTransforms_.size(); + } + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages published to the topic.
    +   * Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.MessageTransform getMessageTransforms(int index) { + return messageTransforms_.get(index); + } + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages published to the topic.
    +   * Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuilder(int index) { + return messageTransforms_.get(index); + } + + public static final int TAGS_FIELD_NUMBER = 14; + + private static final class TagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_Topic_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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 14 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 14 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 14 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 14 [(.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 @@ -785,16 +1065,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2); if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getMessageStoragePolicy()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, kmsKeyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, kmsKeyName_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(6, getSchemaSettings()); @@ -811,6 +1091,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(10, getIngestionDataSourceSettings()); } + for (int i = 0; i < messageTransforms_.size(); i++) { + output.writeMessage(13, messageTransforms_.get(i)); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 14); getUnknownFields().writeTo(output); } @@ -820,8 +1105,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } for (java.util.Map.Entry entry : internalGetLabels().getMap().entrySet()) { @@ -837,8 +1122,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMessageStoragePolicy()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, kmsKeyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, kmsKeyName_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSchemaSettings()); @@ -859,6 +1144,20 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 10, getIngestionDataSourceSettings()); } + for (int i = 0; i < messageTransforms_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(13, messageTransforms_.get(i)); + } + 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(14, tags__); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -896,6 +1195,8 @@ public boolean equals(final java.lang.Object obj) { if (!getIngestionDataSourceSettings().equals(other.getIngestionDataSourceSettings())) return false; } + if (!getMessageTransformsList().equals(other.getMessageTransformsList())) return false; + if (!internalGetTags().equals(other.internalGetTags())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -935,6 +1236,14 @@ public int hashCode() { hash = (37 * hash) + INGESTION_DATA_SOURCE_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getIngestionDataSourceSettings().hashCode(); } + if (getMessageTransformsCount() > 0) { + hash = (37 * hash) + MESSAGE_TRANSFORMS_FIELD_NUMBER; + hash = (53 * hash) + getMessageTransformsList().hashCode(); + } + if (!internalGetTags().getMap().isEmpty()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTags().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -976,38 +1285,38 @@ public static com.google.pubsub.v1.Topic parseFrom( public static com.google.pubsub.v1.Topic parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.Topic parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.Topic parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.Topic parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.Topic parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.Topic parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1030,10 +1339,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -1043,7 +1353,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.Topic} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.Topic) com.google.pubsub.v1.TopicOrBuilder { @@ -1057,6 +1367,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 2: return internalGetLabels(); + case 14: + return internalGetTags(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -1068,13 +1380,15 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi switch (number) { case 2: return internalGetMutableLabels(); + case 14: + return internalGetMutableTags(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_Topic_fieldAccessorTable @@ -1087,17 +1401,18 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMessageStoragePolicyFieldBuilder(); - getSchemaSettingsFieldBuilder(); - getMessageRetentionDurationFieldBuilder(); - getIngestionDataSourceSettingsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMessageStoragePolicyFieldBuilder(); + internalGetSchemaSettingsFieldBuilder(); + internalGetMessageRetentionDurationFieldBuilder(); + internalGetIngestionDataSourceSettingsFieldBuilder(); + internalGetMessageTransformsFieldBuilder(); } } @@ -1130,6 +1445,14 @@ public Builder clear() { ingestionDataSourceSettingsBuilder_.dispose(); ingestionDataSourceSettingsBuilder_ = null; } + if (messageTransformsBuilder_ == null) { + messageTransforms_ = java.util.Collections.emptyList(); + } else { + messageTransforms_ = null; + messageTransformsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + internalGetMutableTags().clear(); return this; } @@ -1155,6 +1478,7 @@ public com.google.pubsub.v1.Topic build() { @java.lang.Override public com.google.pubsub.v1.Topic buildPartial() { com.google.pubsub.v1.Topic result = new com.google.pubsub.v1.Topic(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -1162,6 +1486,18 @@ public com.google.pubsub.v1.Topic buildPartial() { return result; } + private void buildPartialRepeatedFields(com.google.pubsub.v1.Topic result) { + if (messageTransformsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + messageTransforms_ = java.util.Collections.unmodifiableList(messageTransforms_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.messageTransforms_ = messageTransforms_; + } else { + result.messageTransforms_ = messageTransformsBuilder_.build(); + } + } + private void buildPartial0(com.google.pubsub.v1.Topic result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -1207,42 +1543,13 @@ private void buildPartial0(com.google.pubsub.v1.Topic result) { : ingestionDataSourceSettingsBuilder_.build(); to_bitField0_ |= 0x00000008; } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.tags_ = internalGetTags(); + result.tags_.makeImmutable(); + } result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.Topic) { @@ -1285,6 +1592,35 @@ public Builder mergeFrom(com.google.pubsub.v1.Topic other) { if (other.hasIngestionDataSourceSettings()) { mergeIngestionDataSourceSettings(other.getIngestionDataSourceSettings()); } + if (messageTransformsBuilder_ == null) { + if (!other.messageTransforms_.isEmpty()) { + if (messageTransforms_.isEmpty()) { + messageTransforms_ = other.messageTransforms_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureMessageTransformsIsMutable(); + messageTransforms_.addAll(other.messageTransforms_); + } + onChanged(); + } + } else { + if (!other.messageTransforms_.isEmpty()) { + if (messageTransformsBuilder_.isEmpty()) { + messageTransformsBuilder_.dispose(); + messageTransformsBuilder_ = null; + messageTransforms_ = other.messageTransforms_; + bitField0_ = (bitField0_ & ~0x00000200); + messageTransformsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMessageTransformsFieldBuilder() + : null; + } else { + messageTransformsBuilder_.addAllMessages(other.messageTransforms_); + } + } + } + internalGetMutableTags().mergeFrom(other.internalGetTags()); + bitField0_ |= 0x00000400; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1332,7 +1668,7 @@ public Builder mergeFrom( case 26: { input.readMessage( - getMessageStoragePolicyFieldBuilder().getBuilder(), extensionRegistry); + internalGetMessageStoragePolicyFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -1344,7 +1680,8 @@ public Builder mergeFrom( } // case 42 case 50: { - input.readMessage(getSchemaSettingsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetSchemaSettingsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 50 @@ -1357,7 +1694,8 @@ public Builder mergeFrom( case 66: { input.readMessage( - getMessageRetentionDurationFieldBuilder().getBuilder(), extensionRegistry); + internalGetMessageRetentionDurationFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000040; break; } // case 66 @@ -1370,10 +1708,33 @@ public Builder mergeFrom( case 82: { input.readMessage( - getIngestionDataSourceSettingsFieldBuilder().getBuilder(), extensionRegistry); + internalGetIngestionDataSourceSettingsFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000100; break; } // case 82 + case 106: + { + com.google.pubsub.v1.MessageTransform m = + input.readMessage( + com.google.pubsub.v1.MessageTransform.parser(), extensionRegistry); + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.add(m); + } else { + messageTransformsBuilder_.addMessage(m); + } + break; + } // case 106 + case 114: + { + com.google.protobuf.MapEntry tags__ = + input.readMessage( + TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableTags().getMutableMap().put(tags__.getKey(), tags__.getValue()); + bitField0_ |= 0x00000400; + break; + } // case 114 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1394,11 +1755,12 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * *
    -     * Required. The name of the topic. It must have the format
    +     * Required. Identifier. The name of the topic. It must have the format
          * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
          * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
          * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
    @@ -1406,7 +1768,9 @@ public Builder mergeFrom(
          * must not start with `"goog"`.
          * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The name. */ @@ -1421,11 +1785,12 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * *
    -     * Required. The name of the topic. It must have the format
    +     * Required. Identifier. The name of the topic. It must have the format
          * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
          * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
          * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
    @@ -1433,7 +1798,9 @@ public java.lang.String getName() {
          * must not start with `"goog"`.
          * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The bytes for name. */ @@ -1448,11 +1815,12 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * *
    -     * Required. The name of the topic. It must have the format
    +     * Required. Identifier. The name of the topic. It must have the format
          * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
          * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
          * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
    @@ -1460,7 +1828,9 @@ public com.google.protobuf.ByteString getNameBytes() {
          * must not start with `"goog"`.
          * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @param value The name to set. * @return This builder for chaining. @@ -1474,11 +1844,12 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * *
    -     * Required. The name of the topic. It must have the format
    +     * Required. Identifier. The name of the topic. It must have the format
          * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
          * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
          * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
    @@ -1486,7 +1857,9 @@ public Builder setName(java.lang.String value) {
          * must not start with `"goog"`.
          * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return This builder for chaining. */ @@ -1496,11 +1869,12 @@ public Builder clearName() { onChanged(); return this; } + /** * * *
    -     * Required. The name of the topic. It must have the format
    +     * Required. Identifier. The name of the topic. It must have the format
          * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
          * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
          * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
    @@ -1508,7 +1882,9 @@ public Builder clearName() {
          * must not start with `"goog"`.
          * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @param value The bytes for name to set. * @return This builder for chaining. @@ -1549,6 +1925,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -1566,12 +1943,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(); } + /** * * @@ -1586,6 +1965,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -1607,6 +1987,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -1634,6 +2015,7 @@ public Builder clearLabels() { internalGetMutableLabels().getMutableMap().clear(); return this; } + /** * * @@ -1651,12 +2033,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_ |= 0x00000002; return internalGetMutableLabels().getMutableMap(); } + /** * * @@ -1678,6 +2062,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { bitField0_ |= 0x00000002; return this; } + /** * * @@ -1695,11 +2080,12 @@ public Builder putAllLabels(java.util.Map va } private com.google.pubsub.v1.MessageStoragePolicy messageStoragePolicy_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.MessageStoragePolicy, com.google.pubsub.v1.MessageStoragePolicy.Builder, com.google.pubsub.v1.MessageStoragePolicyOrBuilder> messageStoragePolicyBuilder_; + /** * * @@ -1718,6 +2104,7 @@ public Builder putAllLabels(java.util.Map va public boolean hasMessageStoragePolicy() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1742,6 +2129,7 @@ public com.google.pubsub.v1.MessageStoragePolicy getMessageStoragePolicy() { return messageStoragePolicyBuilder_.getMessage(); } } + /** * * @@ -1768,6 +2156,7 @@ public Builder setMessageStoragePolicy(com.google.pubsub.v1.MessageStoragePolicy onChanged(); return this; } + /** * * @@ -1792,6 +2181,7 @@ public Builder setMessageStoragePolicy( onChanged(); return this; } + /** * * @@ -1824,6 +2214,7 @@ public Builder mergeMessageStoragePolicy(com.google.pubsub.v1.MessageStoragePoli } return this; } + /** * * @@ -1847,6 +2238,7 @@ public Builder clearMessageStoragePolicy() { onChanged(); return this; } + /** * * @@ -1863,8 +2255,9 @@ public Builder clearMessageStoragePolicy() { public com.google.pubsub.v1.MessageStoragePolicy.Builder getMessageStoragePolicyBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getMessageStoragePolicyFieldBuilder().getBuilder(); + return internalGetMessageStoragePolicyFieldBuilder().getBuilder(); } + /** * * @@ -1887,6 +2280,7 @@ public com.google.pubsub.v1.MessageStoragePolicyOrBuilder getMessageStoragePolic : messageStoragePolicy_; } } + /** * * @@ -1900,14 +2294,14 @@ public com.google.pubsub.v1.MessageStoragePolicyOrBuilder getMessageStoragePolic * .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3 [(.google.api.field_behavior) = OPTIONAL]; *
    */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.MessageStoragePolicy, com.google.pubsub.v1.MessageStoragePolicy.Builder, com.google.pubsub.v1.MessageStoragePolicyOrBuilder> - getMessageStoragePolicyFieldBuilder() { + internalGetMessageStoragePolicyFieldBuilder() { if (messageStoragePolicyBuilder_ == null) { messageStoragePolicyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.MessageStoragePolicy, com.google.pubsub.v1.MessageStoragePolicy.Builder, com.google.pubsub.v1.MessageStoragePolicyOrBuilder>( @@ -1918,6 +2312,7 @@ public com.google.pubsub.v1.MessageStoragePolicyOrBuilder getMessageStoragePolic } private java.lang.Object kmsKeyName_ = ""; + /** * * @@ -1928,7 +2323,9 @@ public com.google.pubsub.v1.MessageStoragePolicyOrBuilder getMessageStoragePolic * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The kmsKeyName. */ @@ -1943,6 +2340,7 @@ public java.lang.String getKmsKeyName() { return (java.lang.String) ref; } } + /** * * @@ -1953,7 +2351,9 @@ public java.lang.String getKmsKeyName() { * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for kmsKeyName. */ @@ -1968,6 +2368,7 @@ public com.google.protobuf.ByteString getKmsKeyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1978,7 +2379,9 @@ public com.google.protobuf.ByteString getKmsKeyNameBytes() { * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The kmsKeyName to set. * @return This builder for chaining. @@ -1992,6 +2395,7 @@ public Builder setKmsKeyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2002,7 +2406,9 @@ public Builder setKmsKeyName(java.lang.String value) { * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -2012,6 +2418,7 @@ public Builder clearKmsKeyName() { onChanged(); return this; } + /** * * @@ -2022,7 +2429,9 @@ public Builder clearKmsKeyName() { * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for kmsKeyName to set. * @return This builder for chaining. @@ -2039,11 +2448,12 @@ public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { } private com.google.pubsub.v1.SchemaSettings schemaSettings_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.SchemaSettings, com.google.pubsub.v1.SchemaSettings.Builder, com.google.pubsub.v1.SchemaSettingsOrBuilder> schemaSettingsBuilder_; + /** * * @@ -2060,6 +2470,7 @@ public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { public boolean hasSchemaSettings() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -2082,6 +2493,7 @@ public com.google.pubsub.v1.SchemaSettings getSchemaSettings() { return schemaSettingsBuilder_.getMessage(); } } + /** * * @@ -2106,6 +2518,7 @@ public Builder setSchemaSettings(com.google.pubsub.v1.SchemaSettings value) { onChanged(); return this; } + /** * * @@ -2127,6 +2540,7 @@ public Builder setSchemaSettings(com.google.pubsub.v1.SchemaSettings.Builder bui onChanged(); return this; } + /** * * @@ -2156,6 +2570,7 @@ public Builder mergeSchemaSettings(com.google.pubsub.v1.SchemaSettings value) { } return this; } + /** * * @@ -2177,6 +2592,7 @@ public Builder clearSchemaSettings() { onChanged(); return this; } + /** * * @@ -2191,8 +2607,9 @@ public Builder clearSchemaSettings() { public com.google.pubsub.v1.SchemaSettings.Builder getSchemaSettingsBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getSchemaSettingsFieldBuilder().getBuilder(); + return internalGetSchemaSettingsFieldBuilder().getBuilder(); } + /** * * @@ -2213,6 +2630,7 @@ public com.google.pubsub.v1.SchemaSettingsOrBuilder getSchemaSettingsOrBuilder() : schemaSettings_; } } + /** * * @@ -2224,14 +2642,14 @@ public com.google.pubsub.v1.SchemaSettingsOrBuilder getSchemaSettingsOrBuilder() * .google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL]; *
    */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.SchemaSettings, com.google.pubsub.v1.SchemaSettings.Builder, com.google.pubsub.v1.SchemaSettingsOrBuilder> - getSchemaSettingsFieldBuilder() { + internalGetSchemaSettingsFieldBuilder() { if (schemaSettingsBuilder_ == null) { schemaSettingsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.SchemaSettings, com.google.pubsub.v1.SchemaSettings.Builder, com.google.pubsub.v1.SchemaSettingsOrBuilder>( @@ -2242,6 +2660,7 @@ public com.google.pubsub.v1.SchemaSettingsOrBuilder getSchemaSettingsOrBuilder() } private boolean satisfiesPzs_; + /** * * @@ -2258,6 +2677,7 @@ public com.google.pubsub.v1.SchemaSettingsOrBuilder getSchemaSettingsOrBuilder() public boolean getSatisfiesPzs() { return satisfiesPzs_; } + /** * * @@ -2278,6 +2698,7 @@ public Builder setSatisfiesPzs(boolean value) { onChanged(); return this; } + /** * * @@ -2298,11 +2719,12 @@ public Builder clearSatisfiesPzs() { } private com.google.protobuf.Duration messageRetentionDuration_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> messageRetentionDurationBuilder_; + /** * * @@ -2327,6 +2749,7 @@ public Builder clearSatisfiesPzs() { public boolean hasMessageRetentionDuration() { return ((bitField0_ & 0x00000040) != 0); } + /** * * @@ -2357,6 +2780,7 @@ public com.google.protobuf.Duration getMessageRetentionDuration() { return messageRetentionDurationBuilder_.getMessage(); } } + /** * * @@ -2389,6 +2813,7 @@ public Builder setMessageRetentionDuration(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -2419,6 +2844,7 @@ public Builder setMessageRetentionDuration( onChanged(); return this; } + /** * * @@ -2456,6 +2882,7 @@ public Builder mergeMessageRetentionDuration(com.google.protobuf.Duration value) } return this; } + /** * * @@ -2485,6 +2912,7 @@ public Builder clearMessageRetentionDuration() { onChanged(); return this; } + /** * * @@ -2507,8 +2935,9 @@ public Builder clearMessageRetentionDuration() { public com.google.protobuf.Duration.Builder getMessageRetentionDurationBuilder() { bitField0_ |= 0x00000040; onChanged(); - return getMessageRetentionDurationFieldBuilder().getBuilder(); + return internalGetMessageRetentionDurationFieldBuilder().getBuilder(); } + /** * * @@ -2537,6 +2966,7 @@ public com.google.protobuf.DurationOrBuilder getMessageRetentionDurationOrBuilde : messageRetentionDuration_; } } + /** * * @@ -2556,14 +2986,14 @@ public com.google.protobuf.DurationOrBuilder getMessageRetentionDurationOrBuilde * .google.protobuf.Duration message_retention_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; *
    */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getMessageRetentionDurationFieldBuilder() { + internalGetMessageRetentionDurationFieldBuilder() { if (messageRetentionDurationBuilder_ == null) { messageRetentionDurationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -2574,6 +3004,7 @@ public com.google.protobuf.DurationOrBuilder getMessageRetentionDurationOrBuilde } private int state_ = 0; + /** * * @@ -2590,6 +3021,7 @@ public com.google.protobuf.DurationOrBuilder getMessageRetentionDurationOrBuilde public int getStateValue() { return state_; } + /** * * @@ -2609,6 +3041,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -2626,6 +3059,7 @@ public com.google.pubsub.v1.Topic.State getState() { com.google.pubsub.v1.Topic.State result = com.google.pubsub.v1.Topic.State.forNumber(state_); return result == null ? com.google.pubsub.v1.Topic.State.UNRECOGNIZED : result; } + /** * * @@ -2648,6 +3082,7 @@ public Builder setState(com.google.pubsub.v1.Topic.State value) { onChanged(); return this; } + /** * * @@ -2668,11 +3103,12 @@ public Builder clearState() { } private com.google.pubsub.v1.IngestionDataSourceSettings ingestionDataSourceSettings_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionDataSourceSettings, com.google.pubsub.v1.IngestionDataSourceSettings.Builder, com.google.pubsub.v1.IngestionDataSourceSettingsOrBuilder> ingestionDataSourceSettingsBuilder_; + /** * * @@ -2689,6 +3125,7 @@ public Builder clearState() { public boolean hasIngestionDataSourceSettings() { return ((bitField0_ & 0x00000100) != 0); } + /** * * @@ -2711,6 +3148,7 @@ public com.google.pubsub.v1.IngestionDataSourceSettings getIngestionDataSourceSe return ingestionDataSourceSettingsBuilder_.getMessage(); } } + /** * * @@ -2736,6 +3174,7 @@ public Builder setIngestionDataSourceSettings( onChanged(); return this; } + /** * * @@ -2758,6 +3197,7 @@ public Builder setIngestionDataSourceSettings( onChanged(); return this; } + /** * * @@ -2789,6 +3229,7 @@ public Builder mergeIngestionDataSourceSettings( } return this; } + /** * * @@ -2810,6 +3251,7 @@ public Builder clearIngestionDataSourceSettings() { onChanged(); return this; } + /** * * @@ -2825,8 +3267,9 @@ public Builder clearIngestionDataSourceSettings() { getIngestionDataSourceSettingsBuilder() { bitField0_ |= 0x00000100; onChanged(); - return getIngestionDataSourceSettingsFieldBuilder().getBuilder(); + return internalGetIngestionDataSourceSettingsFieldBuilder().getBuilder(); } + /** * * @@ -2848,6 +3291,7 @@ public Builder clearIngestionDataSourceSettings() { : ingestionDataSourceSettings_; } } + /** * * @@ -2859,14 +3303,14 @@ public Builder clearIngestionDataSourceSettings() { * .google.pubsub.v1.IngestionDataSourceSettings ingestion_data_source_settings = 10 [(.google.api.field_behavior) = OPTIONAL]; *
    */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionDataSourceSettings, com.google.pubsub.v1.IngestionDataSourceSettings.Builder, com.google.pubsub.v1.IngestionDataSourceSettingsOrBuilder> - getIngestionDataSourceSettingsFieldBuilder() { + internalGetIngestionDataSourceSettingsFieldBuilder() { if (ingestionDataSourceSettingsBuilder_ == null) { ingestionDataSourceSettingsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.IngestionDataSourceSettings, com.google.pubsub.v1.IngestionDataSourceSettings.Builder, com.google.pubsub.v1.IngestionDataSourceSettingsOrBuilder>( @@ -2876,15 +3320,650 @@ public Builder clearIngestionDataSourceSettings() { return ingestionDataSourceSettingsBuilder_; } + private java.util.List messageTransforms_ = + java.util.Collections.emptyList(); + + private void ensureMessageTransformsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + messageTransforms_ = + new java.util.ArrayList(messageTransforms_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.pubsub.v1.MessageTransform, + com.google.pubsub.v1.MessageTransform.Builder, + com.google.pubsub.v1.MessageTransformOrBuilder> + messageTransformsBuilder_; + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getMessageTransformsList() { + if (messageTransformsBuilder_ == null) { + return java.util.Collections.unmodifiableList(messageTransforms_); + } else { + return messageTransformsBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getMessageTransformsCount() { + if (messageTransformsBuilder_ == null) { + return messageTransforms_.size(); + } else { + return messageTransformsBuilder_.getCount(); + } + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform getMessageTransforms(int index) { + if (messageTransformsBuilder_ == null) { + return messageTransforms_.get(index); + } else { + return messageTransformsBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransforms(int index, com.google.pubsub.v1.MessageTransform value) { + if (messageTransformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessageTransformsIsMutable(); + messageTransforms_.set(index, value); + onChanged(); + } else { + messageTransformsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransforms( + int index, com.google.pubsub.v1.MessageTransform.Builder builderForValue) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.set(index, builderForValue.build()); + onChanged(); + } else { + messageTransformsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms(com.google.pubsub.v1.MessageTransform value) { + if (messageTransformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessageTransformsIsMutable(); + messageTransforms_.add(value); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms(int index, com.google.pubsub.v1.MessageTransform value) { + if (messageTransformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessageTransformsIsMutable(); + messageTransforms_.add(index, value); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms( + com.google.pubsub.v1.MessageTransform.Builder builderForValue) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.add(builderForValue.build()); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms( + int index, com.google.pubsub.v1.MessageTransform.Builder builderForValue) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.add(index, builderForValue.build()); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllMessageTransforms( + java.lang.Iterable values) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, messageTransforms_); + onChanged(); + } else { + messageTransformsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMessageTransforms() { + if (messageTransformsBuilder_ == null) { + messageTransforms_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + messageTransformsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeMessageTransforms(int index) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.remove(index); + onChanged(); + } else { + messageTransformsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform.Builder getMessageTransformsBuilder(int index) { + return internalGetMessageTransformsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuilder(int index) { + if (messageTransformsBuilder_ == null) { + return messageTransforms_.get(index); + } else { + return messageTransformsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getMessageTransformsOrBuilderList() { + if (messageTransformsBuilder_ != null) { + return messageTransformsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(messageTransforms_); + } + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform.Builder addMessageTransformsBuilder() { + return internalGetMessageTransformsFieldBuilder() + .addBuilder(com.google.pubsub.v1.MessageTransform.getDefaultInstance()); + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform.Builder addMessageTransformsBuilder(int index) { + return internalGetMessageTransformsFieldBuilder() + .addBuilder(index, com.google.pubsub.v1.MessageTransform.getDefaultInstance()); + } + + /** + * + * + *
    +     * Optional. Transforms to be applied to messages published to the topic.
    +     * Transforms are applied in the order specified.
    +     * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getMessageTransformsBuilderList() { + return internalGetMessageTransformsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.pubsub.v1.MessageTransform, + com.google.pubsub.v1.MessageTransform.Builder, + com.google.pubsub.v1.MessageTransformOrBuilder> + internalGetMessageTransformsFieldBuilder() { + if (messageTransformsBuilder_ == null) { + messageTransformsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.pubsub.v1.MessageTransform, + com.google.pubsub.v1.MessageTransform.Builder, + com.google.pubsub.v1.MessageTransformOrBuilder>( + messageTransforms_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + messageTransforms_ = null; + } + return messageTransformsBuilder_; + } + + 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_ |= 0x00000400; + 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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public 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 - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + @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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 14 [(.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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 14 [(.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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 14 [(.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_ & ~0x00000400); + 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"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 14 [(.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_ |= 0x00000400; + return internalGetMutableTags().getMutableMap(); + } + + /** + * + * + *
    +     * Optional. Input only. Immutable. Tag keys/values directly bound to this
    +     * resource. For example:
    +     * "123/environment": "production",
    +     * "123/costCenter": "marketing"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 14 [(.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_ |= 0x00000400; + return this; + } + + /** + * + * + *
    +     * Optional. Input only. Immutable. Tag keys/values directly bound to this
    +     * resource. For example:
    +     * "123/environment": "production",
    +     * "123/costCenter": "marketing"
    +     * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +     * using tags with Pub/Sub resources.
    +     * 
    + * + * + * map<string, string> tags = 14 [(.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_ |= 0x00000400; + return this; } // @@protoc_insertion_point(builder_scope:google.pubsub.v1.Topic) diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java index 8fe96fcb8..0a21c87d8 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -217,7 +217,8 @@ public Builder setTopic(String topic) { private Builder(TopicName topicName) { Preconditions.checkArgument( Objects.equals(topicName.pathTemplate, PROJECT_TOPIC), - "toBuilder is only supported when TopicName has the pattern of projects/{project}/topics/{topic}"); + "toBuilder is only supported when TopicName has the pattern of" + + " projects/{project}/topics/{topic}"); this.project = topicName.project; this.topic = topicName.topic; } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java index 38b54f234..4d3334471 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface TopicOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.Topic) @@ -28,7 +30,7 @@ public interface TopicOrBuilder * * *
    -   * Required. The name of the topic. It must have the format
    +   * Required. Identifier. The name of the topic. It must have the format
        * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
        * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
        * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
    @@ -36,16 +38,19 @@ public interface TopicOrBuilder
        * must not start with `"goog"`.
        * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The name. */ java.lang.String getName(); + /** * * *
    -   * Required. The name of the topic. It must have the format
    +   * Required. Identifier. The name of the topic. It must have the format
        * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
        * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
        * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
    @@ -53,7 +58,9 @@ public interface TopicOrBuilder
        * must not start with `"goog"`.
        * 
    * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The bytes for name. */ @@ -70,6 +77,7 @@ public interface TopicOrBuilder * map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL]; */ int getLabelsCount(); + /** * * @@ -81,9 +89,11 @@ public interface TopicOrBuilder * map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL]; */ boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Deprecated java.util.Map getLabels(); + /** * * @@ -95,6 +105,7 @@ public interface TopicOrBuilder * map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL]; */ java.util.Map getLabelsMap(); + /** * * @@ -110,6 +121,7 @@ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); + /** * * @@ -138,6 +150,7 @@ java.lang.String getLabelsOrDefault( * @return Whether the messageStoragePolicy field is set. */ boolean hasMessageStoragePolicy(); + /** * * @@ -154,6 +167,7 @@ java.lang.String getLabelsOrDefault( * @return The messageStoragePolicy. */ com.google.pubsub.v1.MessageStoragePolicy getMessageStoragePolicy(); + /** * * @@ -179,11 +193,14 @@ java.lang.String getLabelsOrDefault( * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The kmsKeyName. */ java.lang.String getKmsKeyName(); + /** * * @@ -194,7 +211,9 @@ java.lang.String getLabelsOrDefault( * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for kmsKeyName. */ @@ -214,6 +233,7 @@ java.lang.String getLabelsOrDefault( * @return Whether the schemaSettings field is set. */ boolean hasSchemaSettings(); + /** * * @@ -228,6 +248,7 @@ java.lang.String getLabelsOrDefault( * @return The schemaSettings. */ com.google.pubsub.v1.SchemaSettings getSchemaSettings(); + /** * * @@ -277,6 +298,7 @@ java.lang.String getLabelsOrDefault( * @return Whether the messageRetentionDuration field is set. */ boolean hasMessageRetentionDuration(); + /** * * @@ -299,6 +321,7 @@ java.lang.String getLabelsOrDefault( * @return The messageRetentionDuration. */ com.google.protobuf.Duration getMessageRetentionDuration(); + /** * * @@ -333,6 +356,7 @@ java.lang.String getLabelsOrDefault( * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -361,6 +385,7 @@ java.lang.String getLabelsOrDefault( * @return Whether the ingestionDataSourceSettings field is set. */ boolean hasIngestionDataSourceSettings(); + /** * * @@ -375,6 +400,7 @@ java.lang.String getLabelsOrDefault( * @return The ingestionDataSourceSettings. */ com.google.pubsub.v1.IngestionDataSourceSettings getIngestionDataSourceSettings(); + /** * * @@ -388,4 +414,173 @@ java.lang.String getLabelsOrDefault( */ com.google.pubsub.v1.IngestionDataSourceSettingsOrBuilder getIngestionDataSourceSettingsOrBuilder(); + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages published to the topic.
    +   * Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getMessageTransformsList(); + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages published to the topic.
    +   * Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.MessageTransform getMessageTransforms(int index); + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages published to the topic.
    +   * Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getMessageTransformsCount(); + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages published to the topic.
    +   * Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getMessageTransformsOrBuilderList(); + + /** + * + * + *
    +   * Optional. Transforms to be applied to messages published to the topic.
    +   * Transforms are applied in the order specified.
    +   * 
    + * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuilder(int index); + + /** + * + * + *
    +   * Optional. Input only. Immutable. Tag keys/values directly bound to this
    +   * resource. For example:
    +   * "123/environment": "production",
    +   * "123/costCenter": "marketing"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 14 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 14 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 14 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 14 [(.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"
    +   * See https://docs.cloud.google.com/pubsub/docs/tags for more information on
    +   * using tags with Pub/Sub resources.
    +   * 
    + * + * + * map<string, string> tags = 14 [(.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-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequest.java index adae2a400..954a9f822 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.pubsub.v1.UpdateSnapshotRequest} */ -public final class UpdateSnapshotRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateSnapshotRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.UpdateSnapshotRequest) UpdateSnapshotRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateSnapshotRequest"); + } + // Use UpdateSnapshotRequest.newBuilder() to construct. - private UpdateSnapshotRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateSnapshotRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateSnapshotRequest() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateSnapshotRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_UpdateSnapshotRequest_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int SNAPSHOT_FIELD_NUMBER = 1; private com.google.pubsub.v1.Snapshot snapshot_; + /** * * @@ -79,6 +87,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasSnapshot() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -94,6 +103,7 @@ public boolean hasSnapshot() { public com.google.pubsub.v1.Snapshot getSnapshot() { return snapshot_ == null ? com.google.pubsub.v1.Snapshot.getDefaultInstance() : snapshot_; } + /** * * @@ -110,6 +120,7 @@ public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotOrBuilder() { public static final int UPDATE_MASK_FIELD_NUMBER = 2; private com.google.protobuf.FieldMask updateMask_; + /** * * @@ -127,6 +138,7 @@ public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -144,6 +156,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -280,38 +293,38 @@ public static com.google.pubsub.v1.UpdateSnapshotRequest parseFrom( public static com.google.pubsub.v1.UpdateSnapshotRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.UpdateSnapshotRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.UpdateSnapshotRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.UpdateSnapshotRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.UpdateSnapshotRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.UpdateSnapshotRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -334,10 +347,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -347,7 +361,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.UpdateSnapshotRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.UpdateSnapshotRequest) com.google.pubsub.v1.UpdateSnapshotRequestOrBuilder { @@ -357,7 +371,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_UpdateSnapshotRequest_fieldAccessorTable @@ -371,15 +385,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSnapshotFieldBuilder(); - getUpdateMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSnapshotFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); } } @@ -445,39 +459,6 @@ private void buildPartial0(com.google.pubsub.v1.UpdateSnapshotRequest result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.UpdateSnapshotRequest) { @@ -524,13 +505,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getSnapshotFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetSnapshotFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -554,11 +537,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.pubsub.v1.Snapshot snapshot_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Snapshot, com.google.pubsub.v1.Snapshot.Builder, com.google.pubsub.v1.SnapshotOrBuilder> snapshotBuilder_; + /** * * @@ -574,6 +558,7 @@ public Builder mergeFrom( public boolean hasSnapshot() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -593,6 +578,7 @@ public com.google.pubsub.v1.Snapshot getSnapshot() { return snapshotBuilder_.getMessage(); } } + /** * * @@ -616,6 +602,7 @@ public Builder setSnapshot(com.google.pubsub.v1.Snapshot value) { onChanged(); return this; } + /** * * @@ -636,6 +623,7 @@ public Builder setSnapshot(com.google.pubsub.v1.Snapshot.Builder builderForValue onChanged(); return this; } + /** * * @@ -664,6 +652,7 @@ public Builder mergeSnapshot(com.google.pubsub.v1.Snapshot value) { } return this; } + /** * * @@ -684,6 +673,7 @@ public Builder clearSnapshot() { onChanged(); return this; } + /** * * @@ -697,8 +687,9 @@ public Builder clearSnapshot() { public com.google.pubsub.v1.Snapshot.Builder getSnapshotBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getSnapshotFieldBuilder().getBuilder(); + return internalGetSnapshotFieldBuilder().getBuilder(); } + /** * * @@ -716,6 +707,7 @@ public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotOrBuilder() { return snapshot_ == null ? com.google.pubsub.v1.Snapshot.getDefaultInstance() : snapshot_; } } + /** * * @@ -726,14 +718,14 @@ public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotOrBuilder() { * .google.pubsub.v1.Snapshot snapshot = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Snapshot, com.google.pubsub.v1.Snapshot.Builder, com.google.pubsub.v1.SnapshotOrBuilder> - getSnapshotFieldBuilder() { + internalGetSnapshotFieldBuilder() { if (snapshotBuilder_ == null) { snapshotBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Snapshot, com.google.pubsub.v1.Snapshot.Builder, com.google.pubsub.v1.SnapshotOrBuilder>( @@ -744,11 +736,12 @@ public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotOrBuilder() { } private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -765,6 +758,7 @@ public com.google.pubsub.v1.SnapshotOrBuilder getSnapshotOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -787,6 +781,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -811,6 +806,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -832,6 +828,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -861,6 +858,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -882,6 +880,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -896,8 +895,9 @@ public Builder clearUpdateMask() { public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -918,6 +918,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -929,14 +930,14 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { + internalGetUpdateMaskFieldBuilder() { if (updateMaskBuilder_ == null) { updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( @@ -946,17 +947,6 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return updateMaskBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.UpdateSnapshotRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequestOrBuilder.java index 45bdef5dd..76a1b76dc 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSnapshotRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface UpdateSnapshotRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.UpdateSnapshotRequest) @@ -36,6 +38,7 @@ public interface UpdateSnapshotRequestOrBuilder * @return Whether the snapshot field is set. */ boolean hasSnapshot(); + /** * * @@ -48,6 +51,7 @@ public interface UpdateSnapshotRequestOrBuilder * @return The snapshot. */ com.google.pubsub.v1.Snapshot getSnapshot(); + /** * * @@ -73,6 +77,7 @@ public interface UpdateSnapshotRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -87,6 +92,7 @@ public interface UpdateSnapshotRequestOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSubscriptionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSubscriptionRequest.java index 8bf7d85d6..59183a696 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSubscriptionRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSubscriptionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.pubsub.v1.UpdateSubscriptionRequest} */ -public final class UpdateSubscriptionRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateSubscriptionRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.UpdateSubscriptionRequest) UpdateSubscriptionRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateSubscriptionRequest"); + } + // Use UpdateSubscriptionRequest.newBuilder() to construct. - private UpdateSubscriptionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateSubscriptionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateSubscriptionRequest() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateSubscriptionRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_UpdateSubscriptionRequest_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int SUBSCRIPTION_FIELD_NUMBER = 1; private com.google.pubsub.v1.Subscription subscription_; + /** * * @@ -81,6 +89,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasSubscription() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -100,6 +109,7 @@ public com.google.pubsub.v1.Subscription getSubscription() { ? com.google.pubsub.v1.Subscription.getDefaultInstance() : subscription_; } + /** * * @@ -120,6 +130,7 @@ public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionOrBuilder() { public static final int UPDATE_MASK_FIELD_NUMBER = 2; private com.google.protobuf.FieldMask updateMask_; + /** * * @@ -137,6 +148,7 @@ public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -154,6 +166,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -290,38 +303,38 @@ public static com.google.pubsub.v1.UpdateSubscriptionRequest parseFrom( public static com.google.pubsub.v1.UpdateSubscriptionRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.UpdateSubscriptionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.UpdateSubscriptionRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.UpdateSubscriptionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.UpdateSubscriptionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.UpdateSubscriptionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -344,10 +357,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -357,7 +371,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.UpdateSubscriptionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.UpdateSubscriptionRequest) com.google.pubsub.v1.UpdateSubscriptionRequestOrBuilder { @@ -367,7 +381,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_UpdateSubscriptionRequest_fieldAccessorTable @@ -381,15 +395,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSubscriptionFieldBuilder(); - getUpdateMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSubscriptionFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); } } @@ -456,39 +470,6 @@ private void buildPartial0(com.google.pubsub.v1.UpdateSubscriptionRequest result result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.UpdateSubscriptionRequest) { @@ -535,13 +516,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getSubscriptionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetSubscriptionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -565,11 +548,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.pubsub.v1.Subscription subscription_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Subscription, com.google.pubsub.v1.Subscription.Builder, com.google.pubsub.v1.SubscriptionOrBuilder> subscriptionBuilder_; + /** * * @@ -586,6 +570,7 @@ public Builder mergeFrom( public boolean hasSubscription() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -608,6 +593,7 @@ public com.google.pubsub.v1.Subscription getSubscription() { return subscriptionBuilder_.getMessage(); } } + /** * * @@ -632,6 +618,7 @@ public Builder setSubscription(com.google.pubsub.v1.Subscription value) { onChanged(); return this; } + /** * * @@ -653,6 +640,7 @@ public Builder setSubscription(com.google.pubsub.v1.Subscription.Builder builder onChanged(); return this; } + /** * * @@ -682,6 +670,7 @@ public Builder mergeSubscription(com.google.pubsub.v1.Subscription value) { } return this; } + /** * * @@ -703,6 +692,7 @@ public Builder clearSubscription() { onChanged(); return this; } + /** * * @@ -717,8 +707,9 @@ public Builder clearSubscription() { public com.google.pubsub.v1.Subscription.Builder getSubscriptionBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getSubscriptionFieldBuilder().getBuilder(); + return internalGetSubscriptionFieldBuilder().getBuilder(); } + /** * * @@ -739,6 +730,7 @@ public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionOrBuilder() { : subscription_; } } + /** * * @@ -750,14 +742,14 @@ public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionOrBuilder() { * .google.pubsub.v1.Subscription subscription = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Subscription, com.google.pubsub.v1.Subscription.Builder, com.google.pubsub.v1.SubscriptionOrBuilder> - getSubscriptionFieldBuilder() { + internalGetSubscriptionFieldBuilder() { if (subscriptionBuilder_ == null) { subscriptionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Subscription, com.google.pubsub.v1.Subscription.Builder, com.google.pubsub.v1.SubscriptionOrBuilder>( @@ -768,11 +760,12 @@ public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionOrBuilder() { } private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -789,6 +782,7 @@ public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -811,6 +805,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -835,6 +830,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -856,6 +852,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -885,6 +882,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -906,6 +904,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -920,8 +919,9 @@ public Builder clearUpdateMask() { public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -942,6 +942,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -953,14 +954,14 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { + internalGetUpdateMaskFieldBuilder() { if (updateMaskBuilder_ == null) { updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( @@ -970,17 +971,6 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return updateMaskBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.UpdateSubscriptionRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSubscriptionRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSubscriptionRequestOrBuilder.java index 469ccb8e5..e54b29c99 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSubscriptionRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateSubscriptionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface UpdateSubscriptionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.UpdateSubscriptionRequest) @@ -38,6 +40,7 @@ public interface UpdateSubscriptionRequestOrBuilder * @return Whether the subscription field is set. */ boolean hasSubscription(); + /** * * @@ -52,6 +55,7 @@ public interface UpdateSubscriptionRequestOrBuilder * @return The subscription. */ com.google.pubsub.v1.Subscription getSubscription(); + /** * * @@ -79,6 +83,7 @@ public interface UpdateSubscriptionRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -93,6 +98,7 @@ public interface UpdateSubscriptionRequestOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequest.java index fa2713ec6..a504c1e61 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.pubsub.v1.UpdateTopicRequest} */ -public final class UpdateTopicRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateTopicRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.UpdateTopicRequest) UpdateTopicRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateTopicRequest"); + } + // Use UpdateTopicRequest.newBuilder() to construct. - private UpdateTopicRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateTopicRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateTopicRequest() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateTopicRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_UpdateTopicRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_UpdateTopicRequest_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int TOPIC_FIELD_NUMBER = 1; private com.google.pubsub.v1.Topic topic_; + /** * * @@ -79,6 +87,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasTopic() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -94,6 +103,7 @@ public boolean hasTopic() { public com.google.pubsub.v1.Topic getTopic() { return topic_ == null ? com.google.pubsub.v1.Topic.getDefaultInstance() : topic_; } + /** * * @@ -110,6 +120,7 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicOrBuilder() { public static final int UPDATE_MASK_FIELD_NUMBER = 2; private com.google.protobuf.FieldMask updateMask_; + /** * * @@ -130,6 +141,7 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -150,6 +162,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -288,38 +301,38 @@ public static com.google.pubsub.v1.UpdateTopicRequest parseFrom( public static com.google.pubsub.v1.UpdateTopicRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.UpdateTopicRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.UpdateTopicRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.UpdateTopicRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.UpdateTopicRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.UpdateTopicRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -342,10 +355,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -355,7 +369,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.UpdateTopicRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.UpdateTopicRequest) com.google.pubsub.v1.UpdateTopicRequestOrBuilder { @@ -365,7 +379,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto .internal_static_google_pubsub_v1_UpdateTopicRequest_fieldAccessorTable @@ -379,15 +393,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTopicFieldBuilder(); - getUpdateMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTopicFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); } } @@ -453,39 +467,6 @@ private void buildPartial0(com.google.pubsub.v1.UpdateTopicRequest result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.UpdateTopicRequest) { @@ -532,13 +513,14 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getTopicFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetTopicFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -562,11 +544,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.pubsub.v1.Topic topic_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Topic, com.google.pubsub.v1.Topic.Builder, com.google.pubsub.v1.TopicOrBuilder> topicBuilder_; + /** * * @@ -581,6 +564,7 @@ public Builder mergeFrom( public boolean hasTopic() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -599,6 +583,7 @@ public com.google.pubsub.v1.Topic getTopic() { return topicBuilder_.getMessage(); } } + /** * * @@ -621,6 +606,7 @@ public Builder setTopic(com.google.pubsub.v1.Topic value) { onChanged(); return this; } + /** * * @@ -640,6 +626,7 @@ public Builder setTopic(com.google.pubsub.v1.Topic.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -667,6 +654,7 @@ public Builder mergeTopic(com.google.pubsub.v1.Topic value) { } return this; } + /** * * @@ -686,6 +674,7 @@ public Builder clearTopic() { onChanged(); return this; } + /** * * @@ -698,8 +687,9 @@ public Builder clearTopic() { public com.google.pubsub.v1.Topic.Builder getTopicBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getTopicFieldBuilder().getBuilder(); + return internalGetTopicFieldBuilder().getBuilder(); } + /** * * @@ -716,6 +706,7 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicOrBuilder() { return topic_ == null ? com.google.pubsub.v1.Topic.getDefaultInstance() : topic_; } } + /** * * @@ -725,14 +716,14 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicOrBuilder() { * * .google.pubsub.v1.Topic topic = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Topic, com.google.pubsub.v1.Topic.Builder, com.google.pubsub.v1.TopicOrBuilder> - getTopicFieldBuilder() { + internalGetTopicFieldBuilder() { if (topicBuilder_ == null) { topicBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Topic, com.google.pubsub.v1.Topic.Builder, com.google.pubsub.v1.TopicOrBuilder>(getTopic(), getParentForChildren(), isClean()); @@ -742,11 +733,12 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicOrBuilder() { } private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** * * @@ -766,6 +758,7 @@ public com.google.pubsub.v1.TopicOrBuilder getTopicOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -791,6 +784,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -818,6 +812,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -842,6 +837,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -874,6 +870,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -898,6 +895,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -915,8 +913,9 @@ public Builder clearUpdateMask() { public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -940,6 +939,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -954,14 +954,14 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { + internalGetUpdateMaskFieldBuilder() { if (updateMaskBuilder_ == null) { updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( @@ -971,17 +971,6 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return updateMaskBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.UpdateTopicRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequestOrBuilder.java index cbac7a5a5..180f0b5b0 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UpdateTopicRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/pubsub.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface UpdateTopicRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.UpdateTopicRequest) @@ -36,6 +38,7 @@ public interface UpdateTopicRequestOrBuilder * @return Whether the topic field is set. */ boolean hasTopic(); + /** * * @@ -48,6 +51,7 @@ public interface UpdateTopicRequestOrBuilder * @return The topic. */ com.google.pubsub.v1.Topic getTopic(); + /** * * @@ -76,6 +80,7 @@ public interface UpdateTopicRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -93,6 +98,7 @@ public interface UpdateTopicRequestOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageRequest.java index 994119324..2acb3165e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ValidateMessageRequest} */ -public final class ValidateMessageRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ValidateMessageRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ValidateMessageRequest) ValidateMessageRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ValidateMessageRequest"); + } + // Use ValidateMessageRequest.newBuilder() to construct. - private ValidateMessageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ValidateMessageRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private ValidateMessageRequest() { encoding_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ValidateMessageRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ValidateMessageRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ValidateMessageRequest_fieldAccessorTable @@ -82,6 +89,7 @@ public enum SchemaSpecCase private SchemaSpecCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -118,6 +126,7 @@ public SchemaSpecCase getSchemaSpecCase() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -144,6 +153,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -172,6 +182,7 @@ public com.google.protobuf.ByteString getParentBytes() { } public static final int NAME_FIELD_NUMBER = 2; + /** * * @@ -188,6 +199,7 @@ public com.google.protobuf.ByteString getParentBytes() { public boolean hasName() { return schemaSpecCase_ == 2; } + /** * * @@ -217,6 +229,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -248,6 +261,7 @@ public com.google.protobuf.ByteString getNameBytes() { } public static final int SCHEMA_FIELD_NUMBER = 3; + /** * * @@ -263,6 +277,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasSchema() { return schemaSpecCase_ == 3; } + /** * * @@ -281,6 +296,7 @@ public com.google.pubsub.v1.Schema getSchema() { } return com.google.pubsub.v1.Schema.getDefaultInstance(); } + /** * * @@ -300,6 +316,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { public static final int MESSAGE_FIELD_NUMBER = 4; private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -318,6 +335,7 @@ public com.google.protobuf.ByteString getMessage() { public static final int ENCODING_FIELD_NUMBER = 5; private int encoding_ = 0; + /** * * @@ -333,6 +351,7 @@ public com.google.protobuf.ByteString getMessage() { public int getEncodingValue() { return encoding_; } + /** * * @@ -364,11 +383,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } if (schemaSpecCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, schemaSpec_); + com.google.protobuf.GeneratedMessage.writeString(output, 2, schemaSpec_); } if (schemaSpecCase_ == 3) { output.writeMessage(3, (com.google.pubsub.v1.Schema) schemaSpec_); @@ -388,11 +407,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } if (schemaSpecCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, schemaSpec_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, schemaSpec_); } if (schemaSpecCase_ == 3) { size += @@ -506,38 +525,38 @@ public static com.google.pubsub.v1.ValidateMessageRequest parseFrom( public static com.google.pubsub.v1.ValidateMessageRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ValidateMessageRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ValidateMessageRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ValidateMessageRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ValidateMessageRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ValidateMessageRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -560,10 +579,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -573,7 +593,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ValidateMessageRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ValidateMessageRequest) com.google.pubsub.v1.ValidateMessageRequestOrBuilder { @@ -583,7 +603,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ValidateMessageRequest_fieldAccessorTable @@ -595,7 +615,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ValidateMessageRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -667,39 +687,6 @@ private void buildPartialOneofs(com.google.pubsub.v1.ValidateMessageRequest resu } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.ValidateMessageRequest) { @@ -717,7 +704,7 @@ public Builder mergeFrom(com.google.pubsub.v1.ValidateMessageRequest other) { bitField0_ |= 0x00000001; onChanged(); } - if (other.getMessage() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getMessage().isEmpty()) { setMessage(other.getMessage()); } if (other.encoding_ != 0) { @@ -782,7 +769,7 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getSchemaFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetSchemaFieldBuilder().getBuilder(), extensionRegistry); schemaSpecCase_ = 3; break; } // case 26 @@ -832,6 +819,7 @@ public Builder clearSchemaSpec() { private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -857,6 +845,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -882,6 +871,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -906,6 +896,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -926,6 +917,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -969,6 +961,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public boolean hasName() { return schemaSpecCase_ == 2; } + /** * * @@ -999,6 +992,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -1029,6 +1023,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1052,6 +1047,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1073,6 +1069,7 @@ public Builder clearName() { } return this; } + /** * * @@ -1098,11 +1095,12 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder> schemaBuilder_; + /** * * @@ -1118,6 +1116,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasSchema() { return schemaSpecCase_ == 3; } + /** * * @@ -1143,6 +1142,7 @@ public com.google.pubsub.v1.Schema getSchema() { return com.google.pubsub.v1.Schema.getDefaultInstance(); } } + /** * * @@ -1165,6 +1165,7 @@ public Builder setSchema(com.google.pubsub.v1.Schema value) { schemaSpecCase_ = 3; return this; } + /** * * @@ -1184,6 +1185,7 @@ public Builder setSchema(com.google.pubsub.v1.Schema.Builder builderForValue) { schemaSpecCase_ = 3; return this; } + /** * * @@ -1215,6 +1217,7 @@ public Builder mergeSchema(com.google.pubsub.v1.Schema value) { schemaSpecCase_ = 3; return this; } + /** * * @@ -1240,6 +1243,7 @@ public Builder clearSchema() { } return this; } + /** * * @@ -1250,8 +1254,9 @@ public Builder clearSchema() { * .google.pubsub.v1.Schema schema = 3; */ public com.google.pubsub.v1.Schema.Builder getSchemaBuilder() { - return getSchemaFieldBuilder().getBuilder(); + return internalGetSchemaFieldBuilder().getBuilder(); } + /** * * @@ -1272,6 +1277,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { return com.google.pubsub.v1.Schema.getDefaultInstance(); } } + /** * * @@ -1281,17 +1287,17 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { * * .google.pubsub.v1.Schema schema = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder> - getSchemaFieldBuilder() { + internalGetSchemaFieldBuilder() { if (schemaBuilder_ == null) { if (!(schemaSpecCase_ == 3)) { schemaSpec_ = com.google.pubsub.v1.Schema.getDefaultInstance(); } schemaBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder>( @@ -1304,6 +1310,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { } private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -1319,6 +1326,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { public com.google.protobuf.ByteString getMessage() { return message_; } + /** * * @@ -1340,6 +1348,7 @@ public Builder setMessage(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1359,6 +1368,7 @@ public Builder clearMessage() { } private int encoding_ = 0; + /** * * @@ -1374,6 +1384,7 @@ public Builder clearMessage() { public int getEncodingValue() { return encoding_; } + /** * * @@ -1392,6 +1403,7 @@ public Builder setEncodingValue(int value) { onChanged(); return this; } + /** * * @@ -1408,6 +1420,7 @@ public com.google.pubsub.v1.Encoding getEncoding() { com.google.pubsub.v1.Encoding result = com.google.pubsub.v1.Encoding.forNumber(encoding_); return result == null ? com.google.pubsub.v1.Encoding.UNRECOGNIZED : result; } + /** * * @@ -1429,6 +1442,7 @@ public Builder setEncoding(com.google.pubsub.v1.Encoding value) { onChanged(); return this; } + /** * * @@ -1447,17 +1461,6 @@ public Builder clearEncoding() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ValidateMessageRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageRequestOrBuilder.java index 3eb379d3d..5f00d2f91 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ValidateMessageRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ValidateMessageRequest) @@ -39,6 +41,7 @@ public interface ValidateMessageRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -69,6 +72,7 @@ public interface ValidateMessageRequestOrBuilder * @return Whether the name field is set. */ boolean hasName(); + /** * * @@ -83,6 +87,7 @@ public interface ValidateMessageRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -110,6 +115,7 @@ public interface ValidateMessageRequestOrBuilder * @return Whether the schema field is set. */ boolean hasSchema(); + /** * * @@ -122,6 +128,7 @@ public interface ValidateMessageRequestOrBuilder * @return The schema. */ com.google.pubsub.v1.Schema getSchema(); + /** * * @@ -158,6 +165,7 @@ public interface ValidateMessageRequestOrBuilder * @return The enum numeric value on the wire for encoding. */ int getEncodingValue(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageResponse.java index 96999cf11..559ef7b70 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.pubsub.v1.ValidateMessageResponse} */ -public final class ValidateMessageResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ValidateMessageResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ValidateMessageResponse) ValidateMessageResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ValidateMessageResponse"); + } + // Use ValidateMessageResponse.newBuilder() to construct. - private ValidateMessageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ValidateMessageResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ValidateMessageResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ValidateMessageResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ValidateMessageResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ValidateMessageResponse_fieldAccessorTable @@ -154,38 +161,38 @@ public static com.google.pubsub.v1.ValidateMessageResponse parseFrom( public static com.google.pubsub.v1.ValidateMessageResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ValidateMessageResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ValidateMessageResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ValidateMessageResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ValidateMessageResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ValidateMessageResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -208,10 +215,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -222,7 +230,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ValidateMessageResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ValidateMessageResponse) com.google.pubsub.v1.ValidateMessageResponseOrBuilder { @@ -232,7 +240,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ValidateMessageResponse_fieldAccessorTable @@ -244,7 +252,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ValidateMessageResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -282,39 +290,6 @@ public com.google.pubsub.v1.ValidateMessageResponse buildPartial() { return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.ValidateMessageResponse) { @@ -370,17 +345,6 @@ public Builder mergeFrom( return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ValidateMessageResponse) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageResponseOrBuilder.java index f66974da0..387ce625e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateMessageResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ValidateMessageResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ValidateMessageResponse) diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaRequest.java index 60a92235f..27199f5c1 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.pubsub.v1.ValidateSchemaRequest} */ -public final class ValidateSchemaRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ValidateSchemaRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ValidateSchemaRequest) ValidateSchemaRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ValidateSchemaRequest"); + } + // Use ValidateSchemaRequest.newBuilder() to construct. - private ValidateSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ValidateSchemaRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private ValidateSchemaRequest() { parent_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ValidateSchemaRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ValidateSchemaRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ValidateSchemaRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -123,6 +132,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int SCHEMA_FIELD_NUMBER = 2; private com.google.pubsub.v1.Schema schema_; + /** * * @@ -138,6 +148,7 @@ public com.google.protobuf.ByteString getParentBytes() { public boolean hasSchema() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -153,6 +164,7 @@ public boolean hasSchema() { public com.google.pubsub.v1.Schema getSchema() { return schema_ == null ? com.google.pubsub.v1.Schema.getDefaultInstance() : schema_; } + /** * * @@ -181,8 +193,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getSchema()); @@ -196,8 +208,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSchema()); @@ -282,38 +294,38 @@ public static com.google.pubsub.v1.ValidateSchemaRequest parseFrom( public static com.google.pubsub.v1.ValidateSchemaRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ValidateSchemaRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ValidateSchemaRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ValidateSchemaRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ValidateSchemaRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ValidateSchemaRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -336,10 +348,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -349,7 +362,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ValidateSchemaRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ValidateSchemaRequest) com.google.pubsub.v1.ValidateSchemaRequestOrBuilder { @@ -359,7 +372,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ValidateSchemaRequest_fieldAccessorTable @@ -373,14 +386,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSchemaFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSchemaFieldBuilder(); } } @@ -441,39 +454,6 @@ private void buildPartial0(com.google.pubsub.v1.ValidateSchemaRequest result) { result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.ValidateSchemaRequest) { @@ -528,7 +508,7 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getSchemaFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetSchemaFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -552,6 +532,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -577,6 +558,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -602,6 +584,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -626,6 +609,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -646,6 +630,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -673,11 +658,12 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private com.google.pubsub.v1.Schema schema_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder> schemaBuilder_; + /** * * @@ -692,6 +678,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public boolean hasSchema() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -710,6 +697,7 @@ public com.google.pubsub.v1.Schema getSchema() { return schemaBuilder_.getMessage(); } } + /** * * @@ -732,6 +720,7 @@ public Builder setSchema(com.google.pubsub.v1.Schema value) { onChanged(); return this; } + /** * * @@ -751,6 +740,7 @@ public Builder setSchema(com.google.pubsub.v1.Schema.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -778,6 +768,7 @@ public Builder mergeSchema(com.google.pubsub.v1.Schema value) { } return this; } + /** * * @@ -797,6 +788,7 @@ public Builder clearSchema() { onChanged(); return this; } + /** * * @@ -809,8 +801,9 @@ public Builder clearSchema() { public com.google.pubsub.v1.Schema.Builder getSchemaBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getSchemaFieldBuilder().getBuilder(); + return internalGetSchemaFieldBuilder().getBuilder(); } + /** * * @@ -827,6 +820,7 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { return schema_ == null ? com.google.pubsub.v1.Schema.getDefaultInstance() : schema_; } } + /** * * @@ -836,14 +830,14 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { * * .google.pubsub.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder> - getSchemaFieldBuilder() { + internalGetSchemaFieldBuilder() { if (schemaBuilder_ == null) { schemaBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.pubsub.v1.Schema, com.google.pubsub.v1.Schema.Builder, com.google.pubsub.v1.SchemaOrBuilder>( @@ -853,17 +847,6 @@ public com.google.pubsub.v1.SchemaOrBuilder getSchemaOrBuilder() { return schemaBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ValidateSchemaRequest) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaRequestOrBuilder.java index 824700d69..3ec527a91 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ValidateSchemaRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ValidateSchemaRequest) @@ -39,6 +41,7 @@ public interface ValidateSchemaRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -67,6 +70,7 @@ public interface ValidateSchemaRequestOrBuilder * @return Whether the schema field is set. */ boolean hasSchema(); + /** * * @@ -79,6 +83,7 @@ public interface ValidateSchemaRequestOrBuilder * @return The schema. */ com.google.pubsub.v1.Schema getSchema(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaResponse.java index afc2763c3..dda69a413 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.pubsub.v1.ValidateSchemaResponse} */ -public final class ValidateSchemaResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ValidateSchemaResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.pubsub.v1.ValidateSchemaResponse) ValidateSchemaResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ValidateSchemaResponse"); + } + // Use ValidateSchemaResponse.newBuilder() to construct. - private ValidateSchemaResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ValidateSchemaResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ValidateSchemaResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ValidateSchemaResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ValidateSchemaResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ValidateSchemaResponse_fieldAccessorTable @@ -154,38 +161,38 @@ public static com.google.pubsub.v1.ValidateSchemaResponse parseFrom( public static com.google.pubsub.v1.ValidateSchemaResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ValidateSchemaResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ValidateSchemaResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.pubsub.v1.ValidateSchemaResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.pubsub.v1.ValidateSchemaResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.pubsub.v1.ValidateSchemaResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -208,10 +215,11 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * * @@ -222,7 +230,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.pubsub.v1.ValidateSchemaResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ValidateSchemaResponse) com.google.pubsub.v1.ValidateSchemaResponseOrBuilder { @@ -232,7 +240,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.SchemaProto .internal_static_google_pubsub_v1_ValidateSchemaResponse_fieldAccessorTable @@ -244,7 +252,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.pubsub.v1.ValidateSchemaResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -282,39 +290,6 @@ public com.google.pubsub.v1.ValidateSchemaResponse buildPartial() { return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.ValidateSchemaResponse) { @@ -370,17 +345,6 @@ public Builder mergeFrom( return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ValidateSchemaResponse) } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaResponseOrBuilder.java index f9378438b..cae8fc5fb 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ValidateSchemaResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/pubsub/v1/schema.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.5 package com.google.pubsub.v1; +@com.google.protobuf.Generated public interface ValidateSchemaResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ValidateSchemaResponse) diff --git a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto index 0f269f525..382343c6a 100644 --- a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto +++ b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,17 +23,25 @@ import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/pubsub/v1/schema.proto"; -option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.PubSub.V1"; -option go_package = "cloud.google.com/go/pubsub/apiv1/pubsubpb;pubsubpb"; +option go_package = "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb;pubsubpb"; option java_multiple_files = true; option java_outer_classname = "PubsubProto"; option java_package = "com.google.pubsub.v1"; option php_namespace = "Google\\Cloud\\PubSub\\V1"; option ruby_package = "Google::Cloud::PubSub::V1"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" +}; +option (google.api.resource_definition) = { + type: "analyticshub.googleapis.com/Listing" + pattern: "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" +}; // The service that an application uses to manipulate topics, and to send // messages to a topic. @@ -323,6 +331,167 @@ message IngestionDataSourceSettings { string match_glob = 9 [(google.api.field_behavior) = OPTIONAL]; } + // Ingestion settings for Azure Event Hubs. + message AzureEventHubs { + // Possible states for managed ingestion from Event Hubs. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // Ingestion is active. + ACTIVE = 1; + + // Permission denied encountered while consuming data from Event Hubs. + // This can happen when `client_id`, or `tenant_id` are invalid. Or the + // right permissions haven't been granted. + EVENT_HUBS_PERMISSION_DENIED = 2; + + // Permission denied encountered while publishing to the topic. + PUBLISH_PERMISSION_DENIED = 3; + + // The provided Event Hubs namespace couldn't be found. + NAMESPACE_NOT_FOUND = 4; + + // The provided Event Hub couldn't be found. + EVENT_HUB_NOT_FOUND = 5; + + // The provided Event Hubs subscription couldn't be found. + SUBSCRIPTION_NOT_FOUND = 6; + + // The provided Event Hubs resource group couldn't be found. + RESOURCE_GROUP_NOT_FOUND = 7; + } + + // Output only. An output-only field that indicates the state of the Event + // Hubs ingestion source. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Name of the resource group within the azure subscription. + string resource_group = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the Event Hubs namespace. + string namespace = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the Event Hub. + string event_hub = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The client id of the Azure application that is being used to + // authenticate Pub/Sub. + string client_id = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The tenant id of the Azure application that is being used to + // authenticate Pub/Sub. + string tenant_id = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Azure subscription id. + string subscription_id = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The GCP service account to be used for Federated Identity + // authentication. + string gcp_service_account = 8 [(google.api.field_behavior) = OPTIONAL]; + } + + // Ingestion settings for Amazon MSK. + message AwsMsk { + // Possible states for managed ingestion from Amazon MSK. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // Ingestion is active. + ACTIVE = 1; + + // Permission denied encountered while consuming data from Amazon MSK. + MSK_PERMISSION_DENIED = 2; + + // Permission denied encountered while publishing to the topic. + PUBLISH_PERMISSION_DENIED = 3; + + // The provided MSK cluster wasn't found. + CLUSTER_NOT_FOUND = 4; + + // The provided topic wasn't found. + TOPIC_NOT_FOUND = 5; + } + + // Output only. An output-only field that indicates the state of the Amazon + // MSK ingestion source. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The Amazon Resource Name (ARN) that uniquely identifies the + // cluster. + string cluster_arn = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the topic in the Amazon MSK cluster that Pub/Sub + // will import from. + string topic = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; + + // Required. AWS role ARN to be used for Federated Identity authentication + // with Amazon MSK. Check the Pub/Sub docs for how to set up this role and + // the required permissions that need to be attached to it. + string aws_role_arn = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The GCP service account to be used for Federated Identity + // authentication with Amazon MSK (via a `AssumeRoleWithWebIdentity` call + // for the provided role). The `aws_role_arn` must be set up with + // `accounts.google.com:sub` equals to this service account number. + string gcp_service_account = 5 [(google.api.field_behavior) = REQUIRED]; + } + + // Ingestion settings for Confluent Cloud. + message ConfluentCloud { + // Possible states for managed ingestion from Confluent Cloud. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // Ingestion is active. + ACTIVE = 1; + + // Permission denied encountered while consuming data from Confluent + // Cloud. + CONFLUENT_CLOUD_PERMISSION_DENIED = 2; + + // Permission denied encountered while publishing to the topic. + PUBLISH_PERMISSION_DENIED = 3; + + // The provided bootstrap server address is unreachable. + UNREACHABLE_BOOTSTRAP_SERVER = 4; + + // The provided cluster wasn't found. + CLUSTER_NOT_FOUND = 5; + + // The provided topic wasn't found. + TOPIC_NOT_FOUND = 6; + } + + // Output only. An output-only field that indicates the state of the + // Confluent Cloud ingestion source. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The address of the bootstrap server. The format is url:port. + string bootstrap_server = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The id of the cluster. + string cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the topic in the Confluent Cloud cluster that + // Pub/Sub will import from. + string topic = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The id of the identity pool to be used for Federated Identity + // authentication with Confluent Cloud. See + // https://docs.confluent.io/cloud/current/security/authenticate/workload-identities/identity-providers/oauth/identity-pools.html#add-oauth-identity-pools. + string identity_pool_id = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. The GCP service account to be used for Federated Identity + // authentication with `identity_pool_id`. + string gcp_service_account = 6 [(google.api.field_behavior) = REQUIRED]; + } + // Only one source type can have settings set. oneof source { // Optional. Amazon Kinesis Data Streams. @@ -330,6 +499,16 @@ message IngestionDataSourceSettings { // Optional. Cloud Storage. CloudStorage cloud_storage = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Azure Event Hubs. + AzureEventHubs azure_event_hubs = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Amazon MSK. + AwsMsk aws_msk = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Confluent Cloud. + ConfluentCloud confluent_cloud = 6 [(google.api.field_behavior) = OPTIONAL]; } // Optional. Platform Logs settings. If unset, no Platform Logs will be @@ -382,6 +561,14 @@ message IngestionFailureEvent { // occurs, one or more Avro objects won't be ingested. message AvroFailureReason {} + // Set when a Pub/Sub message fails to get published due to a schema + // validation violation. + message SchemaViolationReason {} + + // Set when a Pub/Sub message fails to get published due to a message + // transformation error. + message MessageTransformationFailureReason {} + // Failure when ingesting from a Cloud Storage source. message CloudStorageFailure { // Optional. Name of the Cloud Storage bucket used for ingestion. @@ -405,12 +592,153 @@ message IngestionFailureEvent { // being published. ApiViolationReason api_violation_reason = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Pub/Sub message failed schema validation. + SchemaViolationReason schema_violation_reason = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Failure encountered when applying a message transformation to + // the Pub/Sub message. + MessageTransformationFailureReason message_transformation_failure_reason = + 8 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Failure when ingesting from an Amazon MSK source. + message AwsMskFailureReason { + // Optional. The ARN of the cluster of the topic being ingested from. + string cluster_arn = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the Kafka topic being ingested from. + string kafka_topic = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The partition ID of the message that failed to be ingested. + int64 partition_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The offset within the partition of the message that failed to + // be ingested. + int64 offset = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Reason why ingestion failed for the specified message. + oneof reason { + // Optional. The Pub/Sub API limits prevented the desired message from + // being published. + ApiViolationReason api_violation_reason = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Pub/Sub message failed schema validation. + SchemaViolationReason schema_violation_reason = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Failure encountered when applying a message transformation to + // the Pub/Sub message. + MessageTransformationFailureReason message_transformation_failure_reason = + 7 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Failure when ingesting from an Azure Event Hubs source. + message AzureEventHubsFailureReason { + // Optional. The namespace containing the event hub being ingested from. + string namespace = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the event hub being ingested from. + string event_hub = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The partition ID of the message that failed to be ingested. + int64 partition_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The offset within the partition of the message that failed to + // be ingested. + int64 offset = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Reason why ingestion failed for the specified message. + oneof reason { + // Optional. The Pub/Sub API limits prevented the desired message from + // being published. + ApiViolationReason api_violation_reason = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Pub/Sub message failed schema validation. + SchemaViolationReason schema_violation_reason = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Failure encountered when applying a message transformation to + // the Pub/Sub message. + MessageTransformationFailureReason message_transformation_failure_reason = + 7 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Failure when ingesting from a Confluent Cloud source. + message ConfluentCloudFailureReason { + // Optional. The cluster ID containing the topic being ingested from. + string cluster_id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the Kafka topic being ingested from. + string kafka_topic = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The partition ID of the message that failed to be ingested. + int64 partition_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The offset within the partition of the message that failed to + // be ingested. + int64 offset = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Reason why ingestion failed for the specified message. + oneof reason { + // Optional. The Pub/Sub API limits prevented the desired message from + // being published. + ApiViolationReason api_violation_reason = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Pub/Sub message failed schema validation. + SchemaViolationReason schema_violation_reason = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Failure encountered when applying a message transformation to + // the Pub/Sub message. + MessageTransformationFailureReason message_transformation_failure_reason = + 7 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Failure when ingesting from an AWS Kinesis source. + message AwsKinesisFailureReason { + // Optional. The stream ARN of the Kinesis stream being ingested from. + string stream_arn = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The partition key of the message that failed to be ingested. + string partition_key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sequence number of the message that failed to be ingested. + string sequence_number = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Reason why ingestion failed for the specified message. + oneof reason { + // Optional. The Pub/Sub message failed schema validation. + SchemaViolationReason schema_violation_reason = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Failure encountered when applying a message transformation to + // the Pub/Sub message. + MessageTransformationFailureReason message_transformation_failure_reason = + 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The message failed to be published due to an API violation. + // This is only set when the size of the data field of the Kinesis record + // is zero. + ApiViolationReason api_violation_reason = 6 + [(google.api.field_behavior) = OPTIONAL]; } } // Required. Name of the import topic. Format is: // projects/{project_name}/topics/{topic_name}. - string topic = 1 [(google.api.field_behavior) = REQUIRED]; + string topic = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; // Required. Error details explaining why ingestion to Pub/Sub has failed. string error_message = 2 [(google.api.field_behavior) = REQUIRED]; @@ -419,15 +747,129 @@ message IngestionFailureEvent { // Optional. Failure when ingesting from Cloud Storage. CloudStorageFailure cloud_storage_failure = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Failure when ingesting from Amazon MSK. + AwsMskFailureReason aws_msk_failure = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Failure when ingesting from Azure Event Hubs. + AzureEventHubsFailureReason azure_event_hubs_failure = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Failure when ingesting from Confluent Cloud. + ConfluentCloudFailureReason confluent_cloud_failure = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Failure when ingesting from AWS Kinesis. + AwsKinesisFailureReason aws_kinesis_failure = 7 + [(google.api.field_behavior) = OPTIONAL]; } } +// User-defined JavaScript function that can transform or filter a Pub/Sub +// message. +message JavaScriptUDF { + // Required. Name of the JavasScript function that should applied to Pub/Sub + // messages. + string function_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. JavaScript code that contains a function `function_name` with the + // below signature: + // + // ``` + // /** + // * Transforms a Pub/Sub message. + // + // * @return {(Object)>|null)} - To + // * filter a message, return `null`. To transform a message return a map + // * with the following keys: + // * - (required) 'data' : {string} + // * - (optional) 'attributes' : {Object} + // * Returning empty `attributes` will remove all attributes from the + // * message. + // * + // * @param {(Object)>} Pub/Sub + // * message. Keys: + // * - (required) 'data' : {string} + // * - (required) 'attributes' : {Object} + // * + // * @param {Object} metadata - Pub/Sub message metadata. + // * Keys: + // * - (optional) 'message_id' : {string} + // * - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format + // * - (optional) 'ordering_key': {string} + // */ + // + // function (message, metadata) { + // } + // ``` + string code = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration for making inference requests against Vertex AI models. +message AIInference { + // Configuration for making inferences using arbitrary JSON payloads. + message UnstructuredInference { + // Optional. A parameters object to be included in each inference request. + // The parameters object is combined with the data field of the Pub/Sub + // message to form the inference request. + google.protobuf.Struct parameters = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. An endpoint to a Vertex AI model of the form + // `projects/{project}/locations/{location}/endpoints/{endpoint}` or + // `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`. + // Vertex AI API requests will be sent to this endpoint. + string endpoint = 1 [(google.api.field_behavior) = REQUIRED]; + + // The format of inference requests made to the endpoint. + oneof inference_mode { + // Optional. Requests and responses can be any arbitrary JSON object. + UnstructuredInference unstructured_inference = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The service account to use to make prediction requests against + // endpoints. The resource creator or updater that specifies this field must + // have `iam.serviceAccounts.actAs` permission on the service account. If not + // specified, the Pub/Sub [service + // agent](https://cloud.google.com/iam/docs/service-agents), + // service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. + string service_account_email = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// All supported message transforms types. +message MessageTransform { + // The type of transform to apply to messages. + oneof transform { + // Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's + // are specified on a resource, each must have a unique `function_name`. + JavaScriptUDF javascript_udf = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. AI Inference. Specifies the Vertex AI endpoint that inference + // requests built from the Pub/Sub message data and provided parameters will + // be sent to. + AIInference ai_inference = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. This field is deprecated, use the `disabled` field to disable + // transforms. + bool enabled = 3 [deprecated = true, (google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the transform is disabled and will not be applied to + // messages. Defaults to `false`. + bool disabled = 4 [(google.api.field_behavior) = OPTIONAL]; +} + // A topic resource. message Topic { option (google.api.resource) = { type: "pubsub.googleapis.com/Topic" pattern: "projects/{project}/topics/{topic}" pattern: "_deleted-topic_" + plural: "topics" + singular: "topic" }; // The state of the topic. @@ -444,13 +886,16 @@ message Topic { INGESTION_RESOURCE_ERROR = 2; } - // Required. The name of the topic. It must have the format + // Required. Identifier. The name of the topic. It must have the format // `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, // and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), // underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent // signs (`%`). It must be between 3 and 255 characters in length, and it // must not start with `"goog"`. - string name = 1 [(google.api.field_behavior) = REQUIRED]; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IDENTIFIER + ]; // Optional. See [Creating and managing labels] // (https://cloud.google.com/pubsub/docs/labels). @@ -466,7 +911,12 @@ message Topic { // protect access to messages published on this topic. // // The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - string kms_key_name = 5 [(google.api.field_behavior) = OPTIONAL]; + string kms_key_name = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; // Optional. Settings for validating messages published against a schema. SchemaSettings schema_settings = 6 [(google.api.field_behavior) = OPTIONAL]; @@ -493,6 +943,23 @@ message Topic { // Optional. Settings for ingestion from a data source into this topic. IngestionDataSourceSettings ingestion_data_source_settings = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Transforms to be applied to messages published to the topic. + // Transforms are applied in the order specified. + repeated MessageTransform message_transforms = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Input only. Immutable. Tag keys/values directly bound to this + // resource. For example: + // "123/environment": "production", + // "123/costCenter": "marketing" + // See https://docs.cloud.google.com/pubsub/docs/tags for more information on + // using tags with Pub/Sub resources. + map tags = 14 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; } // A message that is published by publishers and consumed by subscribers. The @@ -666,7 +1133,10 @@ message ListTopicSnapshotsRequest { // Response for the `ListTopicSnapshots` method. message ListTopicSnapshotsResponse { // Optional. The names of the snapshots that match the request. - repeated string snapshots = 1 [(google.api.field_behavior) = OPTIONAL]; + repeated string snapshots = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" } + ]; // Optional. If not empty, indicates that there may be more snapshots that // match the request; this value should be passed in a new @@ -812,7 +1282,7 @@ service Subscriber { } // Establishes a stream with the server, which sends messages down to the - // client. The client streams acknowledgements and ack deadline modifications + // client. The client streams acknowledgments and ack deadline modifications // back to the server. The server will close the stream and return the status // on any error. The server may close the stream with status `UNAVAILABLE` to // reassign server-side resources, in which case, the client should @@ -936,6 +1406,8 @@ message Subscription { option (google.api.resource) = { type: "pubsub.googleapis.com/Subscription" pattern: "projects/{project}/subscriptions/{subscription}" + plural: "subscriptions" + singular: "subscription" }; // Possible states for a subscription. @@ -952,13 +1424,18 @@ message Subscription { RESOURCE_ERROR = 2; } - // Information about an associated Analytics Hub subscription - // (https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions). + // Information about an associated [Analytics Hub + // subscription](https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions). message AnalyticsHubSubscriptionInfo { // Optional. The name of the associated Analytics Hub listing resource. // Pattern: // "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" - string listing = 1 [(google.api.field_behavior) = OPTIONAL]; + string listing = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "analyticshub.googleapis.com/Listing" + } + ]; // Optional. The name of the associated Analytics Hub subscription resource. // Pattern: @@ -966,13 +1443,16 @@ message Subscription { string subscription = 2 [(google.api.field_behavior) = OPTIONAL]; } - // Required. The name of the subscription. It must have the format + // Required. Identifier. The name of the subscription. It must have the format // `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must // start with a letter, and contain only letters (`[A-Za-z]`), numbers // (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), // plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters // in length, and it must not start with `"goog"`. - string name = 1 [(google.api.field_behavior) = REQUIRED]; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IDENTIFIER + ]; // Required. The name of the topic from which this subscription is receiving // messages. Format is `projects/{project}/topics/{topic}`. The value of this @@ -995,6 +1475,10 @@ message Subscription { CloudStorageConfig cloud_storage_config = 22 [(google.api.field_behavior) = OPTIONAL]; + // Optional. If delivery to Bigtable is used with this subscription, this + // field is used to configure it. + BigtableConfig bigtable_config = 27 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The approximate amount of time (on a best-effort basis) Pub/Sub // waits for the subscriber to acknowledge receipt before resending the // message. In the interval after the message is delivered and before it is @@ -1076,8 +1560,8 @@ message Subscription { // // If not set, the default retry policy is applied. This generally implies // that messages will be retried as soon as possible for healthy subscribers. - // RetryPolicy will be triggered on NACKs or acknowledgement deadline - // exceeded events for a given message. + // RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded + // events for a given message. RetryPolicy retry_policy = 14 [(google.api.field_behavior) = OPTIONAL]; // Optional. Indicates whether the subscription is detached from its topic. @@ -1092,7 +1576,7 @@ message Subscription { // subscription: // // * The message sent to a subscriber is guaranteed not to be resent - // before the message's acknowledgement deadline expires. + // before the message's acknowledgment deadline expires. // * An acknowledged message will not be resent to a subscriber. // // Note that subscribers may still receive multiple copies of a message @@ -1116,9 +1600,26 @@ message Subscription { State state = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Information about the associated Analytics Hub subscription. - // Only set if the subscritpion is created by Analytics Hub. + // Only set if the subscription is created by Analytics Hub. AnalyticsHubSubscriptionInfo analytics_hub_subscription_info = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Transforms to be applied to messages before they are delivered to + // subscribers. Transforms are applied in the order specified. + repeated MessageTransform message_transforms = 25 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Input only. Immutable. Tag keys/values directly bound to this + // resource. For example: + // "123/environment": "production", + // "123/costCenter": "marketing" + // See https://docs.cloud.google.com/pubsub/docs/tags for more information on + // using tags with Pub/Sub resources. + map tags = 26 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; } // A policy that specifies how Pub/Sub retries message delivery. @@ -1126,7 +1627,7 @@ message Subscription { // Retry delay will be exponential based on provided minimum and maximum // backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. // -// RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded +// RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded // events for a given message. // // Retry Policy is implemented on a best effort basis. At times, the delay @@ -1160,13 +1661,16 @@ message DeadLetterPolicy { // The operation will fail if the topic does not exist. // Users should ensure that there is a subscription attached to this topic // since messages published to a topic with no subscriptions are lost. - string dead_letter_topic = 1 [(google.api.field_behavior) = OPTIONAL]; + string dead_letter_topic = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; // Optional. The maximum number of delivery attempts for any message. The // value must be between 5 and 100. // // The number of delivery attempts is defined as 1 + (the sum of number of - // NACKs and number of times the acknowledgement deadline has been exceeded + // NACKs and number of times the acknowledgment deadline has been exceeded // for the message). // // A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that @@ -1305,6 +1809,11 @@ message BigQueryConfig { // Cannot write to the destination because enforce_in_transit is set to true // and the destination locations are not in the allowed regions. IN_TRANSIT_LOCATION_RESTRICTION = 5; + + // Cannot write to the BigQuery table because the table is not in the same + // location as where Vertex AI models used in `message_transform`s are + // deployed. + VERTEX_AI_LOCATION_RESTRICTION = 6; } // Optional. The name of the table to which to write data, of the form @@ -1348,6 +1857,84 @@ message BigQueryConfig { string service_account_email = 7 [(google.api.field_behavior) = OPTIONAL]; } +// Configuration for a Bigtable subscription. The Pub/Sub message will be +// written to a Bigtable row as follows: +// - row key: subscription name and message ID delimited by #. +// - columns: message bytes written to a single column family "data" with an +// empty-string column qualifier. +// - cell timestamp: the message publish timestamp. +message BigtableConfig { + // Possible states for a Bigtable subscription. + // Note: more states could be added in the future. Please code accordingly. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // The subscription can actively send messages to Bigtable. + ACTIVE = 1; + + // Cannot write to Bigtable because the instance, table, or app profile + // does not exist. + NOT_FOUND = 2; + + // Cannot write to Bigtable because the app profile is not configured for + // single-cluster routing. + APP_PROFILE_MISCONFIGURED = 3; + + // Cannot write to Bigtable because of permission denied errors. + // This can happen if: + // - The Pub/Sub service agent has not been granted the + // [appropriate Bigtable IAM permission + // bigtable.tables.mutateRows]({$universe.dns_names.final_documentation_domain}/bigtable/docs/access-control#permissions) + // - The bigtable.googleapis.com API is not enabled for the project + // ([instructions]({$universe.dns_names.final_documentation_domain}/service-usage/docs/enable-disable)) + PERMISSION_DENIED = 4; + + // Cannot write to Bigtable because of a missing column family ("data") or + // if there is no structured row key for the subscription name + message ID. + SCHEMA_MISMATCH = 5; + + // Cannot write to the destination because enforce_in_transit is set to true + // and the destination locations are not in the allowed regions. + IN_TRANSIT_LOCATION_RESTRICTION = 6; + + // Cannot write to Bigtable because the table is not in the same location as + // where Vertex AI models used in `message_transform`s are deployed. + VERTEX_AI_LOCATION_RESTRICTION = 7; + } + + // Optional. The unique name of the table to write messages to. + // + // Values are of the form + // `projects//instances//tables/`. + string table = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The app profile to use for the Bigtable writes. If not specified, + // the "default" application profile will be used. The app profile must use + // single-cluster routing. + string app_profile_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The service account to use to write to Bigtable. The subscription + // creator or updater that specifies this field must have + // `iam.serviceAccounts.actAs` permission on the service account. If not + // specified, the Pub/Sub [service + // agent](https://cloud.google.com/iam/docs/service-agents), + // service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. + string service_account_email = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When true, write the subscription name, message_id, publish_time, + // attributes, and ordering_key to additional columns in the table under the + // pubsub_metadata column family. The subscription name, message_id, and + // publish_time fields are put in their own columns while all other message + // properties (other than data) are written to a JSON object in the attributes + // column. + bool write_metadata = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. An output-only field that indicates whether or not the + // subscription can receive messages. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Configuration for a Cloud Storage subscription. message CloudStorageConfig { // Configuration for writing message data in text format. @@ -1393,6 +1980,11 @@ message CloudStorageConfig { // Cannot write to the Cloud Storage bucket due to an incompatibility // between the topic schema and subscription settings. SCHEMA_MISMATCH = 5; + + // Cannot write to the Cloud Storage bucket because the bucket is not in the + // same location as where Vertex AI models used in `message_transform`s are + // deployed. + VERTEX_AI_LOCATION_RESTRICTION = 6; } // Required. User-provided name for the Cloud Storage bucket. @@ -1428,7 +2020,7 @@ message CloudStorageConfig { // Optional. The maximum duration that can elapse before a new Cloud Storage // file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not - // exceed the subscription's acknowledgement deadline. + // exceed the subscription's acknowledgment deadline. google.protobuf.Duration max_duration = 6 [(google.api.field_behavior) = OPTIONAL]; @@ -1650,7 +2242,7 @@ message AcknowledgeRequest { } // Request for the `StreamingPull` streaming RPC method. This request is used to -// establish the initial stream as well as to stream acknowledgements and ack +// establish the initial stream as well as to stream acknowledgments and ack // deadline modifications from the client to the server. message StreamingPullRequest { // Required. The subscription for which to initialize the new stream. This @@ -1664,12 +2256,11 @@ message StreamingPullRequest { } ]; - // Optional. List of acknowledgement IDs for acknowledging previously received + // Optional. List of acknowledgment IDs for acknowledging previously received // messages (received on this stream or a different stream). If an ack ID has // expired, the corresponding message may be redelivered later. Acknowledging - // a message more than once will not result in an error. If the - // acknowledgement ID is malformed, the stream will be aborted with status - // `INVALID_ARGUMENT`. + // a message more than once will not result in an error. If the acknowledgment + // ID is malformed, the stream will be aborted with status `INVALID_ARGUMENT`. repeated string ack_ids = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The list of new ack deadlines for the IDs listed in @@ -1686,7 +2277,7 @@ message StreamingPullRequest { repeated int32 modify_deadline_seconds = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. List of acknowledgement IDs whose deadline will be modified based + // Optional. List of acknowledgment IDs whose deadline will be modified based // on the corresponding element in `modify_deadline_seconds`. This field can // be used to indicate that more time is needed to process a message by the // subscriber, or to make the message available for redelivery if the @@ -1730,44 +2321,49 @@ message StreamingPullRequest { // set on a subsequent request, the stream will be aborted with status // `INVALID_ARGUMENT`. int64 max_outstanding_bytes = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The protocol version used by the client. This property can only + // be set on the initial StreamingPullRequest. If it is set on a subsequent + // request, the stream will be aborted with status `INVALID_ARGUMENT`. + int64 protocol_version = 10 [(google.api.field_behavior) = OPTIONAL]; } // Response for the `StreamingPull` method. This response is used to stream // messages from the server to the client. message StreamingPullResponse { - // Acknowledgement IDs sent in one or more previous requests to acknowledge a + // Acknowledgment IDs sent in one or more previous requests to acknowledge a // previously received message. message AcknowledgeConfirmation { - // Optional. Successfully processed acknowledgement IDs. + // Optional. Successfully processed acknowledgment IDs. repeated string ack_ids = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. List of acknowledgement IDs that were malformed or whose - // acknowledgement deadline has expired. + // Optional. List of acknowledgment IDs that were malformed or whose + // acknowledgment deadline has expired. repeated string invalid_ack_ids = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. List of acknowledgement IDs that were out of order. + // Optional. List of acknowledgment IDs that were out of order. repeated string unordered_ack_ids = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. List of acknowledgement IDs that failed processing with + // Optional. List of acknowledgment IDs that failed processing with // temporary issues. repeated string temporary_failed_ack_ids = 4 [(google.api.field_behavior) = OPTIONAL]; } - // Acknowledgement IDs sent in one or more previous requests to modify the + // Acknowledgment IDs sent in one or more previous requests to modify the // deadline for a specific message. message ModifyAckDeadlineConfirmation { - // Optional. Successfully processed acknowledgement IDs. + // Optional. Successfully processed acknowledgment IDs. repeated string ack_ids = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. List of acknowledgement IDs that were malformed or whose - // acknowledgement deadline has expired. + // Optional. List of acknowledgment IDs that were malformed or whose + // acknowledgment deadline has expired. repeated string invalid_ack_ids = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. List of acknowledgement IDs that failed processing with + // Optional. List of acknowledgment IDs that failed processing with // temporary issues. repeated string temporary_failed_ack_ids = 3 [(google.api.field_behavior) = OPTIONAL]; @@ -1784,17 +2380,17 @@ message StreamingPullResponse { bool message_ordering_enabled = 2 [(google.api.field_behavior) = OPTIONAL]; } - // Optional. Received Pub/Sub messages. This will not be empty. + // Optional. Received Pub/Sub messages. repeated ReceivedMessage received_messages = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. This field will only be set if `enable_exactly_once_delivery` is - // set to `true`. + // set to `true` and is not guaranteed to be populated. AcknowledgeConfirmation acknowledge_confirmation = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. This field will only be set if `enable_exactly_once_delivery` is - // set to `true`. + // set to `true` and is not guaranteed to be populated. ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3 [(google.api.field_behavior) = OPTIONAL]; @@ -1835,6 +2431,18 @@ message CreateSnapshotRequest { // Optional. See [Creating and managing // labels](https://cloud.google.com/pubsub/docs/labels). map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Input only. Immutable. Tag keys/values directly bound to this + // resource. For example: + // "123/environment": "production", + // "123/costCenter": "marketing" + // See https://docs.cloud.google.com/pubsub/docs/tags for more information on + // using tags with Pub/Sub resources. + map tags = 4 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; } // Request for the UpdateSnapshot method. @@ -1857,6 +2465,8 @@ message Snapshot { option (google.api.resource) = { type: "pubsub.googleapis.com/Snapshot" pattern: "projects/{project}/snapshots/{snapshot}" + plural: "snapshots" + singular: "snapshot" }; // Optional. The name of the snapshot. diff --git a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/schema.proto b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/schema.proto index d52c678c5..48a6b2aee 100644 --- a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/schema.proto +++ b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/schema.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,9 +23,8 @@ import "google/api/resource.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; -option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.PubSub.V1"; -option go_package = "cloud.google.com/go/pubsub/apiv1/pubsubpb;pubsubpb"; +option go_package = "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb;pubsubpb"; option java_multiple_files = true; option java_outer_classname = "SchemaProto"; option java_package = "com.google.pubsub.v1"; diff --git a/renovate.json b/renovate.json index 9afb4c0bf..91b1a27f7 100644 --- a/renovate.json +++ b/renovate.json @@ -20,36 +20,15 @@ ".github/workflows/samples.yaml" ], "customManagers": [ - { - "customType": "regex", - "fileMatch": [ - "^.kokoro/presubmit/graalvm-native.*.cfg$" - ], - "matchStrings": [ - "value: \"gcr.io/cloud-devrel-public-resources/graalvm.*:(?.*?)\"" - ], - "depNameTemplate": "com.google.cloud:sdk-platform-java-config", - "datasourceTemplate": "maven" - }, { "customType": "regex", "fileMatch": [ "^.github/workflows/unmanaged_dependency_check.yaml$" ], "matchStrings": [ - "uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v(?.+?)\\n" - ], - "depNameTemplate": "com.google.cloud:sdk-platform-java-config", - "datasourceTemplate": "maven" - }, - { - "fileMatch": [ - "^.github/workflows/hermetic_library_generation.yaml$" - ], - "matchStrings": [ - "uses: googleapis/sdk-platform-java/.github/scripts@v(?.+?)\\n" + "uses: googleapis/google-cloud-java/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@v(?.+?)\\n" ], - "depNameTemplate": "com.google.api:gapic-generator-java", + "depNameTemplate": "com.google.cloud:gapic-libraries-bom", "datasourceTemplate": "maven" } ], @@ -73,7 +52,6 @@ "^org.jacoco:", "^org.codehaus.mojo:", "^org.sonatype.plugins:", - "^com.coveo:", "^com.google.cloud:google-cloud-shared-config" ], "semanticCommitType": "build", @@ -111,15 +89,10 @@ "^com.fasterxml.jackson.core" ], "groupName": "jackson dependencies" - }, - { - "matchPackagePatterns": [ - "^com.google.api:gapic-generator-java", - "^com.google.cloud:sdk-platform-java-config" - ], - "groupName": "SDK platform Java dependencies" } ], "semanticCommits": true, - "dependencyDashboard": true -} \ No newline at end of file + "dependencyDashboard": true, + "prConcurrentLimit": 0, + "prHourlyLimit": 0 +} diff --git a/samples/README.md b/samples/README.md index 5656f6f4d..4390e7ea6 100644 --- a/samples/README.md +++ b/samples/README.md @@ -2,7 +2,7 @@ 1. Clone this repo and navigate to the `snippets` directory. ```shell - git clone https://github.com/googlepis/java-pubsub + git clone https://github.com/googleapis/java-pubsub cd java-pubsub/samples/snippets ``` diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index d04a0348c..f5f4ee888 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -44,7 +44,7 @@ com.google.cloud google-cloud-pubsub - 1.134.2 + 1.148.0 @@ -57,7 +57,7 @@ org.xerial.snappy snappy-java - 1.1.10.7 + 1.1.10.8 @@ -69,34 +69,34 @@ com.google.truth truth - 1.4.4 + 1.4.5 test com.google.protobuf protobuf-java-util - 4.28.3 + 4.33.5 com.google.cloud google-cloud-core - 2.48.0 + 2.65.0 tests com.google.cloud google-cloud-bigquery - 2.44.0 + 2.59.0 com.google.cloud google-cloud-storage - 2.45.0 + 2.63.0 com.google.cloud.opentelemetry exporter-trace - 0.33.0 + 0.36.0 @@ -106,7 +106,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.6.0 + 3.6.1 add-snippets-source diff --git a/samples/pom.xml b/samples/pom.xml index 521e6a914..b63314dd5 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -53,7 +53,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.1.3 + 3.1.4 true diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 64cbe3041..432ce85de 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -43,7 +43,7 @@ com.google.cloud google-cloud-pubsub - 1.134.2 + 1.150.3-SNAPSHOT @@ -56,12 +56,12 @@ org.xerial.snappy snappy-java - 1.1.10.7 + 1.1.10.8 com.google.protobuf protobuf-java-util - 4.28.3 + 4.33.5 @@ -73,29 +73,29 @@ com.google.truth truth - 1.4.4 + 1.4.5 test com.google.cloud google-cloud-core - 2.48.0 + 2.65.0 tests com.google.cloud google-cloud-bigquery - 2.44.0 + 2.59.0 com.google.cloud google-cloud-storage - 2.45.0 + 2.63.0 com.google.cloud.opentelemetry exporter-trace - 0.33.0 + 0.36.0 @@ -105,7 +105,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.6.0 + 3.6.1 add-snippets-source diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index fc08b048b..42f69ff4a 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -45,7 +45,7 @@ com.google.cloud libraries-bom - 26.50.0 + 26.76.0 pom import @@ -70,7 +70,7 @@ com.google.cloud.opentelemetry exporter-trace - 0.33.0 + 0.36.0 org.apache.avro @@ -80,12 +80,12 @@ org.xerial.snappy snappy-java - 1.1.10.7 + 1.1.10.8 com.google.protobuf protobuf-java-util - 4.28.3 + 4.33.5 @@ -97,13 +97,13 @@ com.google.truth truth - 1.4.4 + 1.4.5 test com.google.cloud google-cloud-core - 2.48.0 + 2.65.0 tests diff --git a/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithSmtExample.java b/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithSmtExample.java new file mode 100644 index 000000000..53516c540 --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/CreateSubscriptionWithSmtExample.java @@ -0,0 +1,74 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package pubsub; + +// [START pubsub_create_subscription_with_smt] +import com.google.cloud.pubsub.v1.SubscriptionAdminClient; +import com.google.pubsub.v1.JavaScriptUDF; +import com.google.pubsub.v1.MessageTransform; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.ProjectTopicName; +import com.google.pubsub.v1.Subscription; +import java.io.IOException; + +public class CreateSubscriptionWithSmtExample { + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String topicId = "your-topic-id"; + String subscriptionId = "your-subscription-id"; + + createSubscriptionWithSmtExample(projectId, topicId, subscriptionId); + } + + public static void createSubscriptionWithSmtExample( + String projectId, String topicId, String subscriptionId) throws IOException { + + // UDF that removes the 'ssn' field, if present + String code = + "function redactSSN(message, metadata) {" + + " const data = JSON.parse(message.data);" + + " delete data['ssn'];" + + " message.data = JSON.stringify(data);" + + " return message;" + + "}"; + String functionName = "redactSSN"; + + JavaScriptUDF udf = + JavaScriptUDF.newBuilder().setCode(code).setFunctionName(functionName).build(); + MessageTransform transform = MessageTransform.newBuilder().setJavascriptUdf(udf).build(); + + try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { + + ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId); + ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of(projectId, subscriptionId); + + Subscription subscription = + subscriptionAdminClient.createSubscription( + Subscription.newBuilder() + .setName(subscriptionName.toString()) + .setTopic(topicName.toString()) + // Add the UDF message transform + .addMessageTransforms(transform) + .build()); + + System.out.println("Created subscription with SMT: " + subscription.getAllFields()); + } + } +} +// [END pubsub_create_subscription_with_smt] diff --git a/samples/snippets/src/main/java/pubsub/CreateTopicWithAwsMskIngestionExample.java b/samples/snippets/src/main/java/pubsub/CreateTopicWithAwsMskIngestionExample.java new file mode 100644 index 000000000..52aed57dd --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/CreateTopicWithAwsMskIngestionExample.java @@ -0,0 +1,74 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package pubsub; + +// [START pubsub_create_topic_with_aws_msk_ingestion] + +import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.pubsub.v1.IngestionDataSourceSettings; +import com.google.pubsub.v1.Topic; +import com.google.pubsub.v1.TopicName; +import java.io.IOException; + +public class CreateTopicWithAwsMskIngestionExample { + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String topicId = "your-topic-id"; + // AWS MSK ingestion settings. + String clusterArn = "cluster-arn"; + String mskTopic = "msk-topic"; + String awsRoleArn = "aws-role-arn"; + String gcpServiceAccount = "gcp-service-account"; + + createTopicWithAwsMskIngestionExample( + projectId, topicId, clusterArn, mskTopic, awsRoleArn, gcpServiceAccount); + } + + public static void createTopicWithAwsMskIngestionExample( + String projectId, + String topicId, + String clusterArn, + String mskTopic, + String awsRoleArn, + String gcpServiceAccount) + throws IOException { + try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { + TopicName topicName = TopicName.of(projectId, topicId); + + IngestionDataSourceSettings.AwsMsk awsMsk = + IngestionDataSourceSettings.AwsMsk.newBuilder() + .setClusterArn(clusterArn) + .setTopic(mskTopic) + .setAwsRoleArn(awsRoleArn) + .setGcpServiceAccount(gcpServiceAccount) + .build(); + IngestionDataSourceSettings ingestionDataSourceSettings = + IngestionDataSourceSettings.newBuilder().setAwsMsk(awsMsk).build(); + + Topic topic = + topicAdminClient.createTopic( + Topic.newBuilder() + .setName(topicName.toString()) + .setIngestionDataSourceSettings(ingestionDataSourceSettings) + .build()); + + System.out.println("Created topic with AWS MSK ingestion settings: " + topic.getAllFields()); + } + } +} +// [END pubsub_create_topic_with_aws_msk_ingestion] diff --git a/samples/snippets/src/main/java/pubsub/CreateTopicWithAzureEventHubsIngestionExample.java b/samples/snippets/src/main/java/pubsub/CreateTopicWithAzureEventHubsIngestionExample.java new file mode 100644 index 000000000..fb72a3e1d --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/CreateTopicWithAzureEventHubsIngestionExample.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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package pubsub; + +// [START pubsub_create_topic_with_azure_event_hubs_ingestion] + +import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.pubsub.v1.IngestionDataSourceSettings; +import com.google.pubsub.v1.Topic; +import com.google.pubsub.v1.TopicName; +import java.io.IOException; + +public class CreateTopicWithAzureEventHubsIngestionExample { + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String topicId = "your-topic-id"; + // Azure Event Hubs ingestion settings. + String resourceGroup = "resource-group"; + String namespace = "namespace"; + String eventHub = "event-hub"; + String clientId = "client-id"; + String tenantId = "tenant-id"; + String subscriptionId = "subscription-id"; + String gcpServiceAccount = "gcp-service-account"; + + createTopicWithAzureEventHubsIngestionExample( + projectId, + topicId, + resourceGroup, + namespace, + eventHub, + clientId, + tenantId, + subscriptionId, + gcpServiceAccount); + } + + public static void createTopicWithAzureEventHubsIngestionExample( + String projectId, + String topicId, + String resourceGroup, + String namespace, + String eventHub, + String clientId, + String tenantId, + String subscriptionId, + String gcpServiceAccount) + throws IOException { + try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { + TopicName topicName = TopicName.of(projectId, topicId); + + IngestionDataSourceSettings.AzureEventHubs azureEventHubs = + IngestionDataSourceSettings.AzureEventHubs.newBuilder() + .setResourceGroup(resourceGroup) + .setNamespace(namespace) + .setEventHub(eventHub) + .setClientId(clientId) + .setTenantId(tenantId) + .setSubscriptionId(subscriptionId) + .setGcpServiceAccount(gcpServiceAccount) + .build(); + IngestionDataSourceSettings ingestionDataSourceSettings = + IngestionDataSourceSettings.newBuilder().setAzureEventHubs(azureEventHubs).build(); + + Topic topic = + topicAdminClient.createTopic( + Topic.newBuilder() + .setName(topicName.toString()) + .setIngestionDataSourceSettings(ingestionDataSourceSettings) + .build()); + + System.out.println( + "Created topic with Azure Event Hubs ingestion settings: " + topic.getAllFields()); + } + } +} +// [END pubsub_create_topic_with_azure_event_hubs_ingestion] diff --git a/samples/snippets/src/main/java/pubsub/CreateTopicWithConfluentCloudIngestionExample.java b/samples/snippets/src/main/java/pubsub/CreateTopicWithConfluentCloudIngestionExample.java new file mode 100644 index 000000000..cd27a0ac9 --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/CreateTopicWithConfluentCloudIngestionExample.java @@ -0,0 +1,84 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package pubsub; + +// [START pubsub_create_topic_with_confluent_cloud_ingestion] + +import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.pubsub.v1.IngestionDataSourceSettings; +import com.google.pubsub.v1.Topic; +import com.google.pubsub.v1.TopicName; +import java.io.IOException; + +public class CreateTopicWithConfluentCloudIngestionExample { + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String topicId = "your-topic-id"; + // Confluent Cloud ingestion settings. + String bootstrapServer = "bootstrap-server"; + String clusterId = "cluster-id"; + String confluentTopic = "confluent-topic"; + String identityPoolId = "identity-pool-id"; + String gcpServiceAccount = "gcp-service-account"; + + createTopicWithConfluentCloudIngestionExample( + projectId, + topicId, + bootstrapServer, + clusterId, + confluentTopic, + identityPoolId, + gcpServiceAccount); + } + + public static void createTopicWithConfluentCloudIngestionExample( + String projectId, + String topicId, + String bootstrapServer, + String clusterId, + String confluentTopic, + String identityPoolId, + String gcpServiceAccount) + throws IOException { + try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { + TopicName topicName = TopicName.of(projectId, topicId); + + IngestionDataSourceSettings.ConfluentCloud confluentCloud = + IngestionDataSourceSettings.ConfluentCloud.newBuilder() + .setBootstrapServer(bootstrapServer) + .setClusterId(clusterId) + .setTopic(confluentTopic) + .setIdentityPoolId(identityPoolId) + .setGcpServiceAccount(gcpServiceAccount) + .build(); + IngestionDataSourceSettings ingestionDataSourceSettings = + IngestionDataSourceSettings.newBuilder().setConfluentCloud(confluentCloud).build(); + + Topic topic = + topicAdminClient.createTopic( + Topic.newBuilder() + .setName(topicName.toString()) + .setIngestionDataSourceSettings(ingestionDataSourceSettings) + .build()); + + System.out.println( + "Created topic with Confluent Cloud ingestion settings: " + topic.getAllFields()); + } + } +} +// [END pubsub_create_topic_with_confluent_cloud_ingestion] diff --git a/samples/snippets/src/main/java/pubsub/CreateTopicWithSmtExample.java b/samples/snippets/src/main/java/pubsub/CreateTopicWithSmtExample.java new file mode 100644 index 000000000..c96322015 --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/CreateTopicWithSmtExample.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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package pubsub; + +// [START pubsub_create_topic_with_smt] + +import com.google.api.gax.rpc.AlreadyExistsException; +import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.pubsub.v1.JavaScriptUDF; +import com.google.pubsub.v1.MessageTransform; +import com.google.pubsub.v1.Topic; +import com.google.pubsub.v1.TopicName; +import java.io.IOException; + +public class CreateTopicWithSmtExample { + + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String topicId = "your-topic-id"; + + createTopicWithSmtExample(projectId, topicId); + } + + public static void createTopicWithSmtExample(String projectId, String topicId) + throws IOException { + TopicName topicName = TopicName.of(projectId, topicId); + + // UDF that removes the 'ssn' field, if present + String code = + "function redactSSN(message, metadata) {" + + " const data = JSON.parse(message.data);" + + " delete data['ssn'];" + + " message.data = JSON.stringify(data);" + + " return message;" + + "}"; + String functionName = "redactSSN"; + + JavaScriptUDF udf = + JavaScriptUDF.newBuilder().setCode(code).setFunctionName(functionName).build(); + MessageTransform transform = MessageTransform.newBuilder().setJavascriptUdf(udf).build(); + try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { + + Topic topic = + topicAdminClient.createTopic( + Topic.newBuilder() + .setName(topicName.toString()) + // Add the UDF message transform + .addMessageTransforms(transform) + .build()); + + System.out.println("Created topic with SMT: " + topic.getName()); + } catch (AlreadyExistsException e) { + System.out.println(topicName + "already exists."); + } + } +} + // [END pubsub_create_topic_with_smt] diff --git a/samples/snippets/src/main/java/pubsub/OpenTelemetryPublisherExample.java b/samples/snippets/src/main/java/pubsub/OpenTelemetryPublisherExample.java index c812eed16..606c6fe36 100644 --- a/samples/snippets/src/main/java/pubsub/OpenTelemetryPublisherExample.java +++ b/samples/snippets/src/main/java/pubsub/OpenTelemetryPublisherExample.java @@ -49,8 +49,7 @@ public static void main(String... args) throws Exception { public static void openTelemetryPublisherExample(String projectId, String topicId) throws IOException, ExecutionException, InterruptedException { Resource resource = - Resource.getDefault() - .toBuilder() + Resource.getDefault().toBuilder() .put(ResourceAttributes.SERVICE_NAME, "publisher-example") .build(); diff --git a/samples/snippets/src/main/java/pubsub/OpenTelemetrySubscriberExample.java b/samples/snippets/src/main/java/pubsub/OpenTelemetrySubscriberExample.java index d46900b9b..f78c38d19 100644 --- a/samples/snippets/src/main/java/pubsub/OpenTelemetrySubscriberExample.java +++ b/samples/snippets/src/main/java/pubsub/OpenTelemetrySubscriberExample.java @@ -47,8 +47,7 @@ public static void main(String... args) throws Exception { public static void openTelemetrySubscriberExample(String projectId, String subscriptionId) { Resource resource = - Resource.getDefault() - .toBuilder() + Resource.getDefault().toBuilder() .put(ResourceAttributes.SERVICE_NAME, "subscriber-example") .build(); diff --git a/samples/snippets/src/main/java/pubsub/PublishAvroRecordsExample.java b/samples/snippets/src/main/java/pubsub/PublishAvroRecordsExample.java index aa7d571c9..763882d65 100644 --- a/samples/snippets/src/main/java/pubsub/PublishAvroRecordsExample.java +++ b/samples/snippets/src/main/java/pubsub/PublishAvroRecordsExample.java @@ -74,7 +74,7 @@ public static void publishAvroRecordsExample(String projectId, String topicId) switch (encoding) { case BINARY: System.out.println("Preparing a BINARY encoder..."); - encoder = EncoderFactory.get().directBinaryEncoder(byteStream, /*reuse=*/ null); + encoder = EncoderFactory.get().directBinaryEncoder(byteStream, /* reuse= */ null); break; case JSON: diff --git a/samples/snippets/src/main/java/pubsub/SubscribeWithAvroSchemaExample.java b/samples/snippets/src/main/java/pubsub/SubscribeWithAvroSchemaExample.java index 65b1937b8..68880d1d3 100644 --- a/samples/snippets/src/main/java/pubsub/SubscribeWithAvroSchemaExample.java +++ b/samples/snippets/src/main/java/pubsub/SubscribeWithAvroSchemaExample.java @@ -72,7 +72,7 @@ public static void subscribeWithAvroSchemaExample(String projectId, String subsc try { switch (encoding) { case "BINARY": - decoder = DecoderFactory.get().directBinaryDecoder(inputStream, /*reuse=*/ null); + decoder = DecoderFactory.get().directBinaryDecoder(inputStream, /* reuse= */ null); System.out.println("Receiving a binary-encoded message:"); break; case "JSON": diff --git a/samples/snippets/src/main/java/pubsub/SubscribeWithAvroSchemaRevisionsExample.java b/samples/snippets/src/main/java/pubsub/SubscribeWithAvroSchemaRevisionsExample.java index 204867006..9498bd020 100644 --- a/samples/snippets/src/main/java/pubsub/SubscribeWithAvroSchemaRevisionsExample.java +++ b/samples/snippets/src/main/java/pubsub/SubscribeWithAvroSchemaRevisionsExample.java @@ -118,7 +118,7 @@ public static void subscribeWithAvroSchemaRevisionsExample( try { switch (encoding) { case "BINARY": - decoder = DecoderFactory.get().directBinaryDecoder(inputStream, /*reuse=*/ null); + decoder = DecoderFactory.get().directBinaryDecoder(inputStream, /* reuse= */ null); System.out.println("Receiving a binary-encoded message:"); break; case "JSON": diff --git a/samples/snippets/src/main/java/pubsub/SubscribeWithErrorListenerExample.java b/samples/snippets/src/main/java/pubsub/SubscribeWithErrorListenerExample.java index a03c867a8..1e17afe68 100644 --- a/samples/snippets/src/main/java/pubsub/SubscribeWithErrorListenerExample.java +++ b/samples/snippets/src/main/java/pubsub/SubscribeWithErrorListenerExample.java @@ -62,15 +62,11 @@ public static void subscribeWithErrorListenerExample(String projectId, String su .setExecutorProvider(executorProvider) .build(); - // Listen for unrecoverable failures. Rebuild a subscriber and restart subscribing - // when the current subscriber encounters permanent errors. + // Listen for unrecoverable failures. subscriber.addListener( new Subscriber.Listener() { public void failed(Subscriber.State from, Throwable failure) { - System.out.println(failure.getStackTrace()); - if (!executorProvider.getExecutor().isShutdown()) { - subscribeWithErrorListenerExample(projectId, subscriptionId); - } + System.out.println("Unrecoverable subscriber failure:" + failure.getStackTrace()); } }, MoreExecutors.directExecutor()); diff --git a/samples/snippets/src/main/java/pubsub/SubscribeWithExactlyOnceConsumerWithResponseExample.java b/samples/snippets/src/main/java/pubsub/SubscribeWithExactlyOnceConsumerWithResponseExample.java index 8c85364c0..cf5ed3248 100644 --- a/samples/snippets/src/main/java/pubsub/SubscribeWithExactlyOnceConsumerWithResponseExample.java +++ b/samples/snippets/src/main/java/pubsub/SubscribeWithExactlyOnceConsumerWithResponseExample.java @@ -95,7 +95,14 @@ public static void subscribeWithExactlyOnceConsumerWithResponseExample( Subscriber subscriber = null; try { - subscriber = Subscriber.newBuilder(subscriptionName, receiverWithResponse).build(); + // Pub/Sub's exactly once delivery guarantee only applies when subscribers connect to the + // service in the same region. + // For list of locational endpoints for Pub/Sub, see + // https://cloud.google.com/pubsub/docs/reference/service_apis_overview#list_of_locational_endpoints + subscriber = + Subscriber.newBuilder(subscriptionName, receiverWithResponse) + .setEndpoint("us-west1-pubsub.googleapis.com:443") + .build(); // Start the subscriber. subscriber.startAsync().awaitRunning(); System.out.printf("Listening for messages on %s:\n", subscriptionName.toString()); diff --git a/samples/snippets/src/main/java/utilities/State.java b/samples/snippets/src/main/java/utilities/State.java index 503acf61f..60d869e23 100644 --- a/samples/snippets/src/main/java/utilities/State.java +++ b/samples/snippets/src/main/java/utilities/State.java @@ -46,7 +46,12 @@ public class State extends org.apache.avro.specific.SpecificRecordBase public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser() .parse( - "{\"type\":\"record\",\"name\":\"State\",\"namespace\":\"utilities\",\"doc\":\"A list of states in the United States of America.\",\"fields\":[{\"name\":\"name\",\"type\":\"string\",\"doc\":\"The common name of the state.\"},{\"name\":\"post_abbr\",\"type\":\"string\",\"doc\":\"The postal code abbreviation of the state.\"}]}"); + "{\"type\":\"record\",\"name\":\"State\",\"namespace\":\"utilities\",\"doc\":\"A list" + + " of states in the United States of" + + " America.\",\"fields\":[{\"name\":\"name\",\"type\":\"string\",\"doc\":\"The" + + " common name of the" + + " state.\"},{\"name\":\"post_abbr\",\"type\":\"string\",\"doc\":\"The postal" + + " code abbreviation of the state.\"}]}"); public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; @@ -113,6 +118,7 @@ public static State fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOExcep /** The common name of the state. */ private java.lang.CharSequence name; + /** The postal code abbreviation of the state. */ private java.lang.CharSequence post_abbr; @@ -140,6 +146,7 @@ public org.apache.avro.specific.SpecificData getSpecificData() { public org.apache.avro.Schema getSchema() { return SCHEMA$; } + // Used by DatumWriter. Applications should not call. public java.lang.Object get(int field$) { switch (field$) { @@ -247,6 +254,7 @@ public static class Builder extends org.apache.avro.specific.SpecificRecordBuild /** The common name of the state. */ private java.lang.CharSequence name; + /** The postal code abbreviation of the state. */ private java.lang.CharSequence post_abbr; diff --git a/samples/snippets/src/main/java/utilities/StateProto.java b/samples/snippets/src/main/java/utilities/StateProto.java index f43d6e092..388ba9b97 100644 --- a/samples/snippets/src/main/java/utilities/StateProto.java +++ b/samples/snippets/src/main/java/utilities/StateProto.java @@ -50,6 +50,7 @@ public interface StateOrBuilder * @return The name. */ java.lang.String getName(); + /** * string name = 1; * @@ -63,6 +64,7 @@ public interface StateOrBuilder * @return The postAbbr. */ java.lang.String getPostAbbr(); + /** * string post_abbr = 2; * @@ -70,12 +72,14 @@ public interface StateOrBuilder */ com.google.protobuf.ByteString getPostAbbrBytes(); } + /** Protobuf type {@code utilities.State} */ public static final class State extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:utilities.State) StateOrBuilder { private static final long serialVersionUID = 0L; + // Use State.newBuilder() to construct. private State(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -108,6 +112,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * string name = 1; * @@ -125,6 +130,7 @@ public java.lang.String getName() { return s; } } + /** * string name = 1; * @@ -147,6 +153,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object postAbbr_ = ""; + /** * string post_abbr = 2; * @@ -164,6 +171,7 @@ public java.lang.String getPostAbbr() { return s; } } + /** * string post_abbr = 2; * @@ -349,6 +357,7 @@ protected Builder newBuilderForType( Builder builder = new Builder(parent); return builder; } + /** Protobuf type {@code utilities.State} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder @@ -537,6 +546,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * string name = 1; * @@ -553,6 +563,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * string name = 1; * @@ -569,6 +580,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * string name = 1; * @@ -584,6 +596,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * string name = 1; * @@ -595,6 +608,7 @@ public Builder clearName() { onChanged(); return this; } + /** * string name = 1; * @@ -613,6 +627,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object postAbbr_ = ""; + /** * string post_abbr = 2; * @@ -629,6 +644,7 @@ public java.lang.String getPostAbbr() { return (java.lang.String) ref; } } + /** * string post_abbr = 2; * @@ -645,6 +661,7 @@ public com.google.protobuf.ByteString getPostAbbrBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * string post_abbr = 2; * @@ -660,6 +677,7 @@ public Builder setPostAbbr(java.lang.String value) { onChanged(); return this; } + /** * string post_abbr = 2; * @@ -671,6 +689,7 @@ public Builder clearPostAbbr() { onChanged(); return this; } + /** * string post_abbr = 2; * diff --git a/samples/snippets/src/test/java/pubsub/AdminIT.java b/samples/snippets/src/test/java/pubsub/AdminIT.java index e0c45e8e1..2d31e17f7 100644 --- a/samples/snippets/src/test/java/pubsub/AdminIT.java +++ b/samples/snippets/src/test/java/pubsub/AdminIT.java @@ -33,6 +33,7 @@ import com.google.cloud.bigquery.TableInfo; import com.google.cloud.pubsub.v1.SubscriptionAdminClient; import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.protobuf.Duration; import com.google.pubsub.v1.SubscriptionName; import com.google.pubsub.v1.TopicName; import java.io.ByteArrayOutputStream; @@ -55,10 +56,17 @@ public class AdminIT { private static final String kinesisIngestionTopicId = "kinesis-ingestion-topic-" + _suffix; private static final String cloudStorageIngestionTopicId = "cloud-storage-ingestion-topic-" + _suffix; + private static final String awsMskIngestionTopicId = "aws-msk-ingestion-topic-" + _suffix; + private static final String confluentCloudIngestionTopicId = + "confluent-cloud-ingestion-topic-" + _suffix; + private static final String azureEventHubsIngestionTopicId = + "azure-event-hubs-ingestion-topic-" + _suffix; + private static final String smtTopicId = "smt-topic-" + _suffix; private static final String pullSubscriptionId = "iam-pull-subscription-" + _suffix; private static final String pushSubscriptionId = "iam-push-subscription-" + _suffix; private static final String orderedSubscriptionId = "iam-ordered-subscription-" + _suffix; private static final String filteredSubscriptionId = "iam-filtered-subscription-" + _suffix; + private static final String smtSubscriptionId = "smt-subscription-" + _suffix; private static final String exactlyOnceSubscriptionId = "iam-exactly-once-subscription-" + _suffix; private static final String pushEndpoint = "https://my-test-project.appspot.com/push"; @@ -66,6 +74,15 @@ public class AdminIT { "java_samples_data_set" + _suffix.replace("-", "_"); private static final String bigquerySubscriptionId = "iam-bigquery-subscription-" + _suffix; private static final String bigqueryTableId = "java_samples_table_" + _suffix; + private static final String cloudStorageSubscriptionId = + "iam-cloud-storage-subscription-" + _suffix; + private static final String cloudStorageFilenamePrefix = "log_events_"; + private static final String cloudStorageFilenameSuffix = ".txt"; + private static final Duration cloudStorageMaxDuration = + Duration.newBuilder().setSeconds(300).build(); + private static final String gcpServiceAccount = + "fake-service-account@fake-gcp-project.iam.gserviceaccount.com"; + // AWS Kinesis ingestion settings. private static final String streamArn = "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name"; private static final String consumerArn = @@ -75,20 +92,42 @@ public class AdminIT { "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name/" + "consumer/consumer-2:2222222222"; private static final String awsRoleArn = "arn:aws:iam::111111111111:role/fake-role-name"; - private static final String gcpServiceAccount = - "fake-service-account@fake-gcp-project.iam.gserviceaccount.com"; + // GCS ingestion settings. private static final String cloudStorageBucket = "pubsub-cloud-storage-bucket"; private static final String cloudStorageInputFormat = "text"; private static final String cloudStorageTextDelimiter = ","; private static final String cloudStorageMatchGlob = "**.txt"; private static final String cloudStorageMinimumObjectCreateTime = "1970-01-01T00:00:01Z"; private static final String cloudStorageMinimumObjectCreateTimeSeconds = "seconds: 1"; + // AWS MSK ingestion settings. + String clusterArn = + "arn:aws:kafka:us-east-1:111111111111:cluster/fake-cluster-name/11111111-1111-1"; + String mskTopic = "fake-msk-topic-name"; + // Confluent Cloud ingestion settings. + String bootstrapServer = "fake-bootstrap-server-id.us-south1.gcp.confluent.cloud:9092"; + String clusterId = "fake-cluster-id"; + String confluentTopic = "fake-confluent-topic-name"; + String identityPoolId = "fake-pool-id"; + // Azure Event Hubs ingestion settings. + String resourceGroup = "fake-resource-group"; + String namespace = "fake-namespace"; + String eventHub = "fake-event-hub"; + String clientId = "11111111-1111-1111-1111-111111111111"; + String tenantId = "22222222-2222-2222-2222-222222222222"; + String subscriptionId = "33333333-3333-3333-3333-333333333333"; private static final TopicName topicName = TopicName.of(projectId, topicId); private static final TopicName kinesisIngestionTopicName = TopicName.of(projectId, kinesisIngestionTopicId); private static final TopicName cloudStorageIngestionTopicName = TopicName.of(projectId, cloudStorageIngestionTopicId); + private static final TopicName awsMskIngestionTopicName = + TopicName.of(projectId, awsMskIngestionTopicId); + private static final TopicName confluentCloudIngestionTopicName = + TopicName.of(projectId, confluentCloudIngestionTopicId); + private static final TopicName azureEventHubsIngestionTopicName = + TopicName.of(projectId, azureEventHubsIngestionTopicId); + private static final TopicName smtTopicName = TopicName.of(projectId, smtTopicId); private static final SubscriptionName pullSubscriptionName = SubscriptionName.of(projectId, pullSubscriptionId); private static final SubscriptionName pushSubscriptionName = @@ -99,6 +138,8 @@ public class AdminIT { SubscriptionName.of(projectId, filteredSubscriptionId); private static final SubscriptionName exactlyOnceSubscriptionName = SubscriptionName.of(projectId, exactlyOnceSubscriptionId); + private static final SubscriptionName smtSubscriptionName = + SubscriptionName.of(projectId, smtSubscriptionId); private static void requireEnvVar(String varName) { assertNotNull( @@ -288,6 +329,22 @@ public void testAdmin() throws Exception { assertThat(bout.toString()).contains("Created a BigQuery subscription:"); assertThat(bout.toString()).contains(bigqueryTablePath); + bout.reset(); + // Test create a Cloud Storage subscription. + CreateCloudStorageSubscriptionExample.createCloudStorageSubscription( + projectId, + topicId, + cloudStorageSubscriptionId, + cloudStorageBucket, + cloudStorageFilenamePrefix, + cloudStorageFilenameSuffix, + cloudStorageMaxDuration); + assertThat(bout.toString()).contains("Created a CloudStorage subscription:"); + assertThat(bout.toString()).contains(cloudStorageBucket); + assertThat(bout.toString()).contains(cloudStorageFilenamePrefix); + assertThat(bout.toString()).contains(cloudStorageFilenameSuffix); + assertThat(bout.toString()).contains(Long.toString(cloudStorageMaxDuration.getSeconds())); + bout.reset(); // Test delete subscription. DeleteSubscriptionExample.deleteSubscriptionExample(projectId, pullSubscriptionId); @@ -295,6 +352,7 @@ public void testAdmin() throws Exception { DeleteSubscriptionExample.deleteSubscriptionExample(projectId, orderedSubscriptionId); DeleteSubscriptionExample.deleteSubscriptionExample(projectId, exactlyOnceSubscriptionId); DeleteSubscriptionExample.deleteSubscriptionExample(projectId, bigquerySubscriptionId); + DeleteSubscriptionExample.deleteSubscriptionExample(projectId, cloudStorageSubscriptionId); assertThat(bout.toString()).contains("Deleted subscription."); bout.reset(); @@ -361,5 +419,86 @@ public void testAdmin() throws Exception { // Test delete Cloud Storage ingestion topic. DeleteTopicExample.deleteTopicExample(projectId, cloudStorageIngestionTopicId); assertThat(bout.toString()).contains("Deleted topic."); + + bout.reset(); + // Test create topic with AWS MSK ingestion settings. + CreateTopicWithAwsMskIngestionExample.createTopicWithAwsMskIngestionExample( + projectId, awsMskIngestionTopicId, clusterArn, mskTopic, awsRoleArn, gcpServiceAccount); + assertThat(bout.toString()) + .contains("google.pubsub.v1.Topic.name=" + awsMskIngestionTopicName.toString()); + assertThat(bout.toString()).contains(clusterArn); + assertThat(bout.toString()).contains(mskTopic); + assertThat(bout.toString()).contains(awsRoleArn); + assertThat(bout.toString()).contains(gcpServiceAccount); + + bout.reset(); + // Test delete AWS MSK ingestion topic. + DeleteTopicExample.deleteTopicExample(projectId, awsMskIngestionTopicId); + assertThat(bout.toString()).contains("Deleted topic."); + + bout.reset(); + // Test create topic with Confluent Cloud ingestion settings. + CreateTopicWithConfluentCloudIngestionExample.createTopicWithConfluentCloudIngestionExample( + projectId, + confluentCloudIngestionTopicId, + bootstrapServer, + clusterId, + confluentTopic, + identityPoolId, + gcpServiceAccount); + assertThat(bout.toString()) + .contains("google.pubsub.v1.Topic.name=" + confluentCloudIngestionTopicName.toString()); + assertThat(bout.toString()).contains(bootstrapServer); + assertThat(bout.toString()).contains(clusterId); + assertThat(bout.toString()).contains(confluentTopic); + assertThat(bout.toString()).contains(identityPoolId); + assertThat(bout.toString()).contains(gcpServiceAccount); + + bout.reset(); + // Test delete Confluent Cloud ingestion topic. + DeleteTopicExample.deleteTopicExample(projectId, confluentCloudIngestionTopicId); + assertThat(bout.toString()).contains("Deleted topic."); + + bout.reset(); + // Test create topic with Azure Event Hubs ingestion settings. + CreateTopicWithAzureEventHubsIngestionExample.createTopicWithAzureEventHubsIngestionExample( + projectId, + azureEventHubsIngestionTopicId, + resourceGroup, + namespace, + eventHub, + clientId, + tenantId, + subscriptionId, + gcpServiceAccount); + assertThat(bout.toString()) + .contains("google.pubsub.v1.Topic.name=" + azureEventHubsIngestionTopicName.toString()); + assertThat(bout.toString()).contains(resourceGroup); + assertThat(bout.toString()).contains(namespace); + assertThat(bout.toString()).contains(eventHub); + assertThat(bout.toString()).contains(clientId); + assertThat(bout.toString()).contains(tenantId); + assertThat(bout.toString()).contains(subscriptionId); + assertThat(bout.toString()).contains(gcpServiceAccount); + + bout.reset(); + // Test delete Azure Event Hubs ingestion topic. + DeleteTopicExample.deleteTopicExample(projectId, azureEventHubsIngestionTopicId); + assertThat(bout.toString()).contains("Deleted topic."); + + bout.reset(); + // Test create topic with an SMT. + CreateTopicWithSmtExample.createTopicWithSmtExample(projectId, smtTopicId); + assertThat(bout.toString()).contains("Created topic with SMT: " + smtTopicName.toString()); + + bout.reset(); + // Test create topic with an SMT. + CreateSubscriptionWithSmtExample.createSubscriptionWithSmtExample( + projectId, smtTopicId, smtSubscriptionId); + assertThat(bout.toString()).contains("Created subscription with SMT"); + assertThat(bout.toString()).contains(smtSubscriptionName.toString()); + assertThat(bout.toString()).contains("redactSSN"); + DeleteSubscriptionExample.deleteSubscriptionExample(projectId, smtSubscriptionId); + DeleteTopicExample.deleteTopicExample(projectId, smtTopicId); } } diff --git a/samples/snippets/src/test/java/pubsub/DeadLetterQueueIT.java b/samples/snippets/src/test/java/pubsub/DeadLetterQueueIT.java index 8a97d25f5..d85c27ad8 100644 --- a/samples/snippets/src/test/java/pubsub/DeadLetterQueueIT.java +++ b/samples/snippets/src/test/java/pubsub/DeadLetterQueueIT.java @@ -68,7 +68,7 @@ private static void publishSomeMessages() throws Exception { } @Rule public Timeout globalTimeout = Timeout.seconds(300); // 5 minute timeout - @Rule public MultipleAttemptsRule retryRule = new MultipleAttemptsRule(/*maxAttemptCount=*/ 3); + @Rule public MultipleAttemptsRule retryRule = new MultipleAttemptsRule(/* maxAttemptCount= */ 3); @BeforeClass public static void checkRequirements() { diff --git a/samples/snippets/src/test/java/pubsub/SchemaIT.java b/samples/snippets/src/test/java/pubsub/SchemaIT.java index 2874ae519..342a42c61 100644 --- a/samples/snippets/src/test/java/pubsub/SchemaIT.java +++ b/samples/snippets/src/test/java/pubsub/SchemaIT.java @@ -79,7 +79,7 @@ private static void requireEnvVar(String varName) { } @Rule public Timeout globalTimeout = Timeout.seconds(600); // 10 minute timeout - @Rule public MultipleAttemptsRule retryRule = new MultipleAttemptsRule(/*maxAttemptCount=*/ 3); + @Rule public MultipleAttemptsRule retryRule = new MultipleAttemptsRule(/* maxAttemptCount= */ 3); @Before public void setUp() { diff --git a/versions.txt b/versions.txt index 83ccf2fa9..55484585a 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-pubsub:1.134.2:1.134.2 -grpc-google-cloud-pubsub-v1:1.116.2:1.116.2 -proto-google-cloud-pubsub-v1:1.116.2:1.116.2 +google-cloud-pubsub:1.150.2:1.150.3-SNAPSHOT +grpc-google-cloud-pubsub-v1:1.132.2:1.132.3-SNAPSHOT +proto-google-cloud-pubsub-v1:1.132.2:1.132.3-SNAPSHOT